[jira] Created: (ARCHETYPE-152) sources in archetype.xml will not work outside of src/main/java dir.
sources in archetype.xml will not work outside of src/main/java dir. Key: ARCHETYPE-152 URL: http://jira.codehaus.org/browse/ARCHETYPE-152 Project: Maven Archetype Issue Type: Bug Components: Archetypes Affects Versions: 2.0-alpha-2 Environment: MacOSX and WindowsXP Reporter: Zemian Deng If source is not in src/main/java with ".java" files, the or elements in META-INF/archetype.xml will cause errors of "files not found" when run. This used to work on 1.0-alpha-7. Example of failed Testcase in the META-INF/archetype.xml file: src/main/scala/App.scala src/test/scala/AppTest.scala -- 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
[jira] Commented: (ARCHETYPE-150) New maven-archetype-plugin ignores the remoteRepositories system property
[ http://jira.codehaus.org/browse/ARCHETYPE-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=128435#action_128435 ] Zemian Deng commented on ARCHETYPE-150: --- This bug can be reproduce by running mvn archetype:create \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=0.6 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftone -DartifactId=liftone The error seems to suggest remoteRepository is not found. We know it's working if we use older version of this plugin: mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-basic \ -DarchetypeVersion=0.6 \ -DremoteRepositories=http://scala-tools.org/repo-releases \ -DgroupId=com.liftone -DartifactId=liftone > New maven-archetype-plugin ignores the remoteRepositories system property > -- > > Key: ARCHETYPE-150 > URL: http://jira.codehaus.org/browse/ARCHETYPE-150 > Project: Maven Archetype > Issue Type: Bug >Affects Versions: 2.0-alpha-2 >Reporter: Bruce Snyder > > When executing the latest maven-archetype-plugin using the archetype:create > goal with the -DremoteRepositories system property, the remoteRepositories > property is ignored. See an example of this below with full debug output: > $ mvn -X archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling > -DarchetypeArtifactId=servicemix-service-unit -DarchetypeVersion=3.3.0.7-fuse > -DgroupId=com.mycompany -DartifactId=my-su > -DremoteRepositories=http://repo.open.iona.com/maven2/ > + Error stacktraces are turned on. > Maven version: 2.0.8 > Java version: 1.5.0_13 > OS name: "mac os x" version: "10.4.11" arch: "i386" Family: "unix" > [DEBUG] Building Maven user-level plugin registry from: > '/Users/bsnyder/.m2/plugin-registry.xml' > [DEBUG] Building Maven global-level plugin registry from: > '/Users/bsnyder/apache-maven-2.0.8/conf/plugin-registry.xml' > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'archetype'. > [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins > [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo > [DEBUG] maven-archetype-plugin: resolved to version 2.0-alpha-2 from > repository central > [DEBUG] Retrieving parent-POM: > org.apache.maven.archetype:maven-archetype::2.0-alpha-2 for project: > org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:null from the > repository. > [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::7 for project: > org.apache.maven.archetype:maven-archetype:pom:2.0-alpha-2 from the > repository. > [DEBUG] Retrieving parent-POM: org.apache:apache::4 for project: > org.apache.maven:maven-parent:pom:7 from the repository. > [DEBUG] Adding managed dependencies for > org.apache.maven.plugins:maven-archetype-plugin > [DEBUG] junit:junit:jar:3.8.1:test > [DEBUG] commons-io:commons-io:jar:1.3.1 > [DEBUG] commons-collections:commons-collections:jar:3.2 > [DEBUG] org.apache.maven.wagon:wagon-file:jar:1.0-alpha-6:test > [DEBUG] org.apache.maven:maven-model:jar:2.0.8 > [DEBUG] dom4j:dom4j:jar:1.6.1 > [DEBUG] org.codehaus.plexus:plexus-velocity:jar:1.1.3 > [DEBUG] > org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 > [DEBUG] org.apache.maven:maven-project:jar:2.0.8 > [DEBUG] org.apache.maven:maven-core:jar:2.0.8 > [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.8 > [DEBUG] jdom:jdom:jar:1.0 > [DEBUG] org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-5 > [DEBUG] > org.apache.maven.shared:maven-plugin-testing-harness:jar:1.0-beta-1:test > [DEBUG] velocity:velocity:jar:1.4 > [DEBUG] net.sourceforge.jchardet:jchardet:jar:1.0 > [DEBUG] org.apache.maven.archetype:archetype-common:jar:2.0-alpha-2 > [DEBUG] org.codehaus.plexus:plexus-utils:jar:1.4.6 > [INFO] > > [INFO] Building Maven Default Project > [INFO]task-segment: [archetype:create] (aggregator-style) > [INFO] > > [DEBUG] > org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-2:runtime > (selected for runtime) > [DEBUG] Adding managed dependencies for unknown:archetype-common > [DEBUG] junit:junit:jar:3.8.1:test > [DEBUG] commons-io:commons-io:jar:1.3.1 > [DEBUG] commons-collections:commons-collections:jar:3.2 > [DEBUG] org.apache.maven.wagon:wagon-file:jar:1.0-alpha-6:test > [DEBUG] org.apache.maven:maven-model:j
[jira] Created: (MNG-4956) Cygwin mvn script modifies CLASSPATH environment variable
Cygwin mvn script modifies CLASSPATH environment variable - Key: MNG-4956 URL: http://jira.codehaus.org/browse/MNG-4956 Project: Maven 2 & 3 Issue Type: Bug Components: Command Line Affects Versions: 3.0 Environment: Cygwin on Windowx Reporter: Zemian Deng When running in Cygwin, the apache-maven-3.0/bin/mvn script actually changed the user env CLASSPATH to an invalid Java classpath value, which is unexpected! To repeat this, try the following on Cygwin: Create this simple pom.xml in an project: {code:xml} http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 deng mvn-examples jar 1.0-SNAPSHOT org.apache.maven.plugins maven-antrun-plugin 1.6 {code:xml} {code} $ /apps/apache-maven-3.0/bin/mvn -v Apache Maven 3.0 (r1004208; 2010-10-04 07:50:56-0400) Java version: 1.6.0_19 Java home: C:\apps\jdk1.6.0_19\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" $ export CLASSPATH="C:\\my-classes;C:\\my-lib\app.jar" $ echo $CLASSPATH C:\my-classes;C:\my-lib\app.jar $ /apps/apache-maven-3.0/bin/mvn antrun:run [INFO] Scanning for projects... [INFO] [INFO] [INFO] Building mvn-examples 1.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-antrun-plugin:1.6:run (default-cli) @ mvn-examples --- [INFO] Executing tasks main: [echo] Maven env.CLASSPATH: /cygdrive/c/my-classes:/cygdrive/c/my-lib/app.jar [INFO] Executed tasks [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 0.843s [INFO] Finished at: Wed Dec 29 23:37:41 EST 2010 [INFO] Final Memory: 2M/15M [INFO] {code} NOTE 1: The CLASSPATH value has been modified with cygwin path prefix, which become an invalid Java classpath value! NOTE 2: If I use mvn.bat in cygwin shell, it will work as expected. So this only affect the mvn shell script only. NOTE 3: This only affect the variable "CLASSPATH", b/c if I use JAVA_CLASSPATH, the value didn't change. -- 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
[jira] (SUREFIRE-848) NPE in org.apache.maven.plugin.surefire.report.AbstractTextReporter
[ https://jira.codehaus.org/browse/SUREFIRE-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301255#comment-301255 ] Zemian Deng commented on SUREFIRE-848: -- I get this same error intermittently on our java project build. We are using maven-surefire-plugin:2.11 with maven-3.0.4. When this happens our build seems to take same amount of time, but the test counts and output are way off. Exception in thread "ThreadedStreamConsumer" java.lang.NullPointerException at org.apache.maven.surefire.report.AbstractFileReporter.testSetCompleted(AbstractFileReporter.java:111) at org.apache.maven.surefire.report.MulticastingReporter.testSetCompleted(MulticastingReporter.java:51) at org.apache.maven.surefire.report.TestSetRunListener.testSetCompleted(TestSetRunListener.java:121) at org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:97) at org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) at java.lang.Thread.run(Thread.java:619) > NPE in org.apache.maven.plugin.surefire.report.AbstractTextReporter > --- > > Key: SUREFIRE-848 > URL: https://jira.codehaus.org/browse/SUREFIRE-848 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.x support, Maven Surefire Plugin >Affects Versions: 2.12 >Reporter: Stephan Schroevers > Attachments: example.tbz > > > The combination Surefire/JUnit 4 causes a {{NullPointerException}} in > {{org.apache.maven.plugin.surefire.report.AbstractTextReporter}} if one has a > {{RunListener}} configured which (for whatever reason) throws an exception > in its {{#testRunStarted(Description)}} method. > I have [attached|^example.tbz] a dummy project; run {{`mvn test`}} to see the > problem. The cause of this issue is that {{AbstractTextReporter}} initializes > its {{testResults}} field when > {{AbstractTextReporter#testSetStarting(ReportEntry)}} is called, which (it > seems) doesn't happen until JUnit invokes > {{RunNotifier#fireTestStarted(Description)}}. This is too late, because an > exception during the invocation of > {{RunNotifier#fireTestRunStarted(Description)}} causes > {{AbstractTextReporter#testError(ReportEntry, String, String)}} to be > invoked. The result is an NPE on line 103. > Stacktrace: > {noformat} > Exception in thread "ThreadedStreamConsumer" java.lang.NullPointerException > at > org.apache.maven.plugin.surefire.report.AbstractTextReporter.testError(AbstractTextReporter.java:103) > at > org.apache.maven.plugin.surefire.report.MulticastingReporter.testError(MulticastingReporter.java:87) > at > org.apache.maven.plugin.surefire.report.TestSetRunListener.testError(TestSetRunListener.java:150) > at > org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:115) > at > org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67) > at java.lang.Thread.run(Thread.java:619) > {noformat} > Note that this issue seems to have been the root cause of SUREFIRE-157; the > [last > comment|jira.codehaus.org/browse/SUREFIRE-157?focusedCommentId=197215#comment-197215] > to that ticket also pointed to the late initialisation of the > {{testResults}} field. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira