[ https://jira.codehaus.org/browse/MEAR-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=285028#comment-285028 ]
Lukasz Szelag commented on MEAR-70: ----------------------------------- The issue described here is still not resolved in 2.6. I also tried older versions (2.5, 2.3.2) and still cannot get the descriptor generated correctly, as long as I specify the <loader-repository> tag (without any attributes), i.e: <jboss> <version>4.2</version> <loader-repository> com.test:archive=${project.groupId}-${project.version}.ear <loader-repository-config> java2ParentDelegation=false </loader-repository-config> </loader-repository> </jboss> Below configuration works: <jboss> <version>4.2</version> <loader-repository-config> java2ParentDelegation=false </loader-repository-config> </jboss> > loader-repository node for jboss configuration > ---------------------------------------------- > > Key: MEAR-70 > URL: https://jira.codehaus.org/browse/MEAR-70 > Project: Maven 2.x Ear Plugin > Issue Type: Bug > Affects Versions: 2.3 > Reporter: Mark Kettner > Assignee: Stephane Nicoll > Fix For: 2.3.2 > > > 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. For more information on JIRA, see: http://www.atlassian.com/software/jira