Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Help / Install New Software ..
  2. select: Galileo - http://download.eclipse.org/releases/galileoImage Removed
  3. select: Collaboration/Subversive SVN Team Provider

Note: to get the latest stable version you will better use the project's url. I had to do that because eclipse started to block on startups otherwise.

Note: There seems to be a version conflict with Subversive.  If you look at the table showing the content of the eclipse-helios-macosx-cocoa-64.zip bundle (in a preceding section, above) you will notice that it includes Subclipse, not Subversive.  If you have problems with Subversive you might try Subclipse instead.  http://subclipse.tigris.org/update_1.6.x

Connectors
You also have to install a connector. Subversive will prompt you on the first usage.

...

  1. Help -> Install New Software ..
  2. Add... (to add a new site)
  3. http://m2eclipse.sonatype.org/sites/m2eImage Removed

WTP Integration

  1. Help -> Install New Software ..
  2. Add... (to add a new site)
  3. http://m2eclipse.sonatype.org/sites/m2e-extrasImage Removed
  4. select: Maven Integration for WTP

...

  1. Help -> Install New Software ..
  2. Add... (to add a new site)
  3. http://www.polarion.org/projects/subversive/download/integrations/update-site/Image Removed
  4. select: Subversive Integration for M2Eclipse

...

Register the following URLs in Help / Software Updates

  1. http://download.jboss.org/jbosstools/updates/JBossTools-3.0.3.GAImage Removed
  2. select: FreeMarker IDE

...

Used for tab to space transformations and other cleanup on save

  1. http://andrei.gmxhome.de/eclipseImage Removed
  2. select: AnyEditTools

...

  1. open SVN Repository Exploring Perspective
  2. add repository location
  3. http://svn.magnolia-cms.com/svnImage Removed

Create/Checkout a Project

...

Edit web.xml and add the taglib definitions as follows. Note it is important to adde them before jsp-property-group

Code Block
xml
xml


<jsp-config>
   <taglib>
     <taglib-uri>cms-taglib</taglib-uri>
     <taglib-location>cms-taglib.tld</taglib-location>
   </taglib>
   <taglib>
     <taglib-uri>cms-util-taglib</taglib-uri>
     <taglib-location>cms-util-taglib.tld</taglib-location>
   </taglib>
   <taglib>
      <taglib-uri>cmsfn-taglib</taglib-uri>
      <taglib-location>cmsfn-taglib.tld</taglib-location>
    </taglib>

    <jsp-property-group>
      <url-pattern>*.jsp</url-pattern>
      <page-encoding>UTF-8</page-encoding>
    </jsp-property-group>
</jsp-config>

...

1. in the webapp folder execute:

Code Block
none
none

  mvn war:inplace

2. delete all jars except the taglib jars in src/main/webapp/WEB-INF/lib

3. minimize the taglib jar

Code Block
none
none

 zip -d magnolia-taglib-cms-4.1.1-SNAPSHOT.jar /info/*
 zip -d magnolia-taglib-utility-4.1.1-SNAPSHOT.jar /info/*

...

The important part of this configuration file is the declaration of the objects the auto completion should know. I think these four declarations I use make sense:

Code Block
xml
xml

<value key="mgnl" object-class="info.magnolia.module.templating.MagnoliaTemplatingUtilities"/>
<value key="ctx" object-class="info.magnolia.context.MgnlContext"/>
<value key="stk" object-class="info.magnolia.module.templatingkit.util.STKUtil"/>
<value key="state" object-class="info.magnolia.cms.core.AggregationState"/>

...

If the project can't build because of the following message (printed in Maven Console)

Code Block
none
none

[WARN] Rule 0: org.apache.maven.plugin.enforcer.RequireMavenVersion failed with message: Detected Maven Version: 2.1-SNAPSHOT is not in the allowed range [2.0.9,2.0.9].

The expected stacktrace on startup is:

Code Block
none
none

SEVERE: Exception sending context initialized event to listener instance of class info.magnolia.cms.servlets.MgnlServletContextListener
java.lang.NullPointerException
	at info.magnolia.cms.beans.config.PropertiesInitializer.loadAllModuleProperties(PropertiesInitializer.java:92)
	at info.magnolia.cms.beans.config.PropertiesInitializer.loadAllProperties(PropertiesInitializer.java:79)
	at info.magnolia.cms.servlets.MgnlServletContextListener.contextInitialized(MgnlServletContextListener.java:176)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)

You can either add the following to the pluginManagement section in your main project pom to disable the enforcer plugin or select the eclipse profile:

Code Block
xml
xml

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-enforcer-plugin</artifactId>
  <configuration>
    <skip>true</skip>
  </configuration>
</plugin>

...

Symptom:

Code Block
none
none

SEVERE: Exception starting filter magnoliaFilterChain
java.lang.ClassCastException: info.magnolia.cms.filters.MgnlMainFilter
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:255)
	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

Solution: exclude the servlet api jar. Verify that you don't have the servlet api jar in your maven dependencies.

Example:

Code Block
xml
xml

<dependency>
	<groupId>info.magnolia</groupId>
	<artifactId>magnolia-empty-webapp</artifactId>
	<version>4.0.1</version>
	<type>pom</type>
	<exclusions>
		<exclusion>
		        <groupId>javax.servlet</groupId>
		        <artifactId>servlet-api</artifactId>
		</exclusion>
	</exclusions>
</dependency>

...