We're updating the issue view to help you get more done. 

Extra dependencies wrongly put on container execution classpath

Description

Extra dependencies in the Maven2 plugin are put on the container execution classpath causing classloader problems like class not found errors.

Adding this to the cargo maven plugin container element:

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</dependency>
</dependencies>

results in this in the JBoss log:

'-Xmx512m'
'-Djava.endorsed.dirs=c:\apps\cargo-installs\jboss-4.0.2\jboss-4.0.2\lib\endorsed'
'-Djboss.home.dir=c:\apps\cargo-installs\jboss-4.0.2\jboss-4.0.2'
'-Djboss.server.home.dir=c:\ad\admin\ejb\target\jboss4x'
'-Djboss.server.home.url=file:/c:/ad/admin/ejb/target/jboss4x/'
'-Djboss.server.name=jboss4x'
'-Djboss.server.lib.url=file:/c:/apps/cargo-installs/jboss-4.0.2/jboss-4.0.2/server/default/lib/'
'-classpath'
'C:\Documents and Settings\jeroen\.m2\repository\org\springframework\spring\2.0\spring-2.0.jar;C:\apps\cargo-installs\jboss-4.0.2\jboss-4.0.2\bin\run.jar;C:\jdk1.5.0\lib\tools.jar'
'org.jboss.Main'
'--configuration=jboss4x'

The ' characters around the executable and arguments are
not part of the command.

As you can see, Spring is put on the classpath.

Ideally you would like to have these added dependencies in $JBOSS_HOME/server/[your config]/lib dir

Status

Assignee

Vincent Massol

Reporter

Jeroen Verhagen

Components

Affects versions

0.8

Priority

Major