[ http://jira.codehaus.org/browse/MEAR-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_102112 ]
Stephane Nicoll commented on MEAR-70: ------------------------------------- I told it ten thousands times. The current implementation supports a simple, naive loader-repository config. See my comments in the related issue. Playing with CDATA is not convenient, no plugin is designed that way. > loader-repository node for jboss configuration > ---------------------------------------------- > > Key: MEAR-70 > URL: http://jira.codehaus.org/browse/MEAR-70 > Project: Maven 2.x Ear Plugin > Issue Type: Bug > Affects Versions: 2.3.1 > Reporter: Mark Kettner > > I added the patch MEAR-50.patch to the 2.3 version of the maven-ear-plugin. > However, after the patch I still couldn't generate a correct jboss-app.xml > file when the pom.xml contained the following definition: > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-ear-plugin</artifactId> > <version>2.3.1</version> > <configuration> > <jboss> > <version>4</version> > <loader-repository> > nl.ictu.spg.bsn:loader=afslagbsn > > <loader-repository-config>java2ParentDelegation=false</loader-repository-config> > </loader-repository> > </jboss> > </configuration> > </plugin> > </plugins> > </build> > This is because in the file AbstractEarMojo the > final String loaderRepository = jboss.getChild( > JbossConfiguration.LOADER_REPOSITORY ).getValue(); > is null when a subtag is added to the loaderRepository tag. > This can be solved by changing the definition in the pom.xml file to the > following: > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-ear-plugin</artifactId> > <version>2.3.1</version> > <configuration> > <jboss> > <version>4</version> > <loader-repository><![CDATA[ > nl.ictu.spg.bsn:loader=afslagbsn > > <loader-repository-config>java2ParentDelegation=false</loader-repository-config>]]> > </loader-repository> > </jboss> > </configuration> > </plugin> > </plugins> > </build> > and change the "write" method in the JbossAppXmlWriter class to the following: > // classloader repository > if ( jbossConfiguration.getLoaderRepository() != null ) > { > writer.startElement( JbossConfiguration.LOADER_REPOSITORY ); > writer.writeMarkup( jbossConfiguration.getLoaderRepository() ); > writer.endElement(); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira