[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: aop-mc-int tests with maven
kabir.khan@jboss.com
do-not-reply at jboss.com
Wed Apr 25 06:13:10 EDT 2007
OK, I found the magic -X option
I am using
| <plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-surefire-plugin</artifactId>
| <executions>
| <execution>
| <id>weave</id>
| <phase>test</phase>
| <goals>
| <goal>test</goal>
| </goals>
| <configuration>
| <skip>false</skip>
| <includes>
| <include>org/jboss/test/**/*TestCase.java</include>
| </includes>
| <argLine>-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader</argLine>
| <forkMode>always</forkMode>
| <systemProperties>
| <property>
| <name>jboss.aop.exclude</name>
| <value>org.jboss.,org.apache.</value>
| </property>
| <property>
| <name>jboss.aop.include</name>
| <value>org.jboss.test.</value>
| </property>
| <property>
| <name>jboss-junit-configuration</name>
| <value>weave</value>
| </property>
| <property>
| <name>build.testlog</name>
| <value>target/log</value>
| </property>
| <property>
| <name>jboss.aop.verbose</name>
| <value>true</value>
| </property>
| </systemProperties>
| <!--
| <redirectTestOutputToFile>true</redirectTestOutputToFile>
| -->
| </configuration>
| </execution>
|
| $ mvn -X
| + Error stacktraces are turned on.
| Maven version: 2.0.5
| ....
| [DEBUG] Test Classpath :
| [DEBUG] C:\cygwin\home\Kabir\sourcecontrol\microcontainer-mvn\aop-mc-int\target\classes
| [DEBUG] C:\cygwin\home\Kabir\sourcecontrol\microcontainer-mvn\aop-mc-int\target\test-classes
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-vfs\2.0.4.snapshot\jboss-vfs-2.0.4.snapshot.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-common-core\2.0.4.GA\jboss-common-core-2.0.4.GA.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-common-logging-spi\2.0.4.GA\jboss-common-logging-spi-2.0.4.GA.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.0.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\javassist\javassist\3.5-SNAPSHOT\javassist-3.5-SNAPSHOT.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\apache-xerces\xercesImpl\2.7.1\xercesImpl-2.7.1.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-kernel\2.0.0-SNAPSHOT\jboss-kernel-2.0.0-SNAPSHOT.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-dependency\2.0.0-SNAPSHOT\jboss-dependency-2.0.0-SNAPSHOT.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\sun-jaf\activation\1.0.2\activation-1.0.2.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\wutka-dtdparser\dtdparser121\1.2.1\dtdparser121-1.2.1.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-logging-log4j\2.0.2.GA\jboss-logging-log4j-2.0.2.GA.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\org\apache\ant\ant-junit\1.7.0\ant-junit-1.7.0.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\qdox\qdox\1.6\qdox-1.6.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-kernel\2.0.0-SNAPSHOT\jboss-kernel-2.0.0-SNAPSHOT-tests.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-logging-spi\2.0.2.GA\jboss-logging-spi-2.0.2.GA.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\trove\trove\2.1.1\trove-2.1.1.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jbossxb\2.0.0.CR3\jbossxb-2.0.0.CR3.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\apache-log4j\log4j\1.2.8\log4j-1.2.8.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\apache-xerces\xml-apis\2.7.1\xml-apis-2.7.1.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-test\1.0.3.GA\jboss-test-1.0.3.GA.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\oswego-concurrent\concurrent\1.3.4\concurrent-1.3.4.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\profiler\jvmti\jboss-profiler-jvmti\1.0.0.CR5\jboss-profiler-jvmti-1.0.0.CR5.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\apache-slide\webdavlib\2.0\webdavlib-2.0.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\apache-httpclient\commons-httpclient\2.0.2\commons-httpclient-2.0.2.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-aop\2.0.0-SNAPSHOT\jboss-aop-2.0.0-SNAPSHOT.jar
| [DEBUG] C:\Java\jdk\jdk1.5.0_10\jre\..\lib\tools.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\jboss\jboss-container\2.0.0-SNAPSHOT\jboss-container-2.0.0-SNAPSHOT.jar
| [DEBUG] C:\Documents and Settings\Kabir\.m2\repository\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar
| [DEBUG] Setting system property [jboss-junit-configuration]=[weave]
| [DEBUG] Setting system property [build.testlog]=[target/log]
| [DEBUG] Setting system property [jboss.aop.verbose]=[true]
| [DEBUG] Setting system property [localRepository]=[C:\Documents and Settings\Kabir\.m2\repository]
| [DEBUG] Setting system property [jboss.aop.include]=[org.jboss.test.]
| [DEBUG] Setting system property [jboss.aop.exclude]=[org.jboss.,org.apache.]
| [DEBUG] Setting system property [basedir]=[C:\cygwin\home\Kabir\sourcecontrol\microcontainer-mvn\aop-mc-int]
| [DEBUG] Using JVM: C:\Java\jdk\jdk1.5.0_10\jre\bin\java
| [INFO] Surefire report directory: C:\cygwin\home\Kabir\sourcecontrol\microcontainer-mvn\aop-mc-int\target\surefire-reports
| Forking command line: C:\Java\jdk\jdk1.5.0_10\jre\bin\java -Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader -classpath "C:\Documents and Settings\Kabir\.m2\repository\org\codehaus\plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar;C:\Documents and Settings\Kabir\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\Documents and Settings\Kabir\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-8\plexus-container-default-1.0-alpha-8.jar;C:\Documents and Settings\Kabir\.m2\repository\org\apache\maven\surefire\surefire-api\2.3\surefire-api-2.3.jar;C:\Documents and Settings\Kabir\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar;C:\Documents and Settings\Kabir\.m2\repository\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;C:\Documents and Settings\Kabir\.m2\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar;C:\Documents and Settings\Kabir\.m2\repository\org\apache\maven\surefire\surefire-booter\2.3\surefire-booter-2.3.jar" org.apache.maven.surefire.booter.SurefireBooter C:\DOCUME~1\Kabir\LOCALS~1\Temp\surefire3057tmp C:\DOCUME~1\Kabir\LOCALS~1\Temp\surefire3058tmp
| Error occurred during initialization of VM
| java.lang.Error: java.lang.ClassNotFoundException: org.jboss.aop.standalone.SystemClassLoader
|
Digging into this a bit, one of the tmp files contains the test classpath. So it seems that the surefire plugin is meant to instantiate the test with the reall classpath, and the-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader system property is being used "too early" (when creating the SureFireBooter rather than when instantiating the test)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040508#4040508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040508
More information about the jboss-dev-forums
mailing list