[
http://jira.codehaus.org/browse/MNG-2220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_118999
]
Venelin Mitov commented on MNG-2220:
------------------------------------
Hello All,
I used the attached buglet.zip project to reproduce the problem on versions
2.0.5, 2.0.7 and 2.0.8 of maven. Here is the output I got when executing mvn
clean test.
$ /cygdrive/c/maven/maven-2.0.8/bin/mvn clean test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - maven:buglet:jar:01.01-SNAPSHOT
[INFO] task-segment: [clean, test]
[INFO] ------------------------------------------------------------------------
[INFO] artifact org.apache.maven.plugins:maven-clean-plugin: checking for
updates from internal
[INFO] [clean:clean]
[INFO] Deleting directory c:\adhoc\buglet\target
[INFO] Deleting directory c:\adhoc\buglet\target\classes
[INFO] Deleting directory c:\adhoc\buglet\target\test-classes
[INFO] artifact org.apache.maven.plugins:maven-resources-plugin: checking for
updates from internal
[INFO] artifact org.apache.maven.plugins:maven-compiler-plugin: checking for
updates from internal
[INFO] artifact org.apache.maven.plugins:maven-surefire-plugin: checking for
updates from internal
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to c:\adhoc\buglet\target\test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: c:\adhoc\buglet\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running BugletTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.187 sec <<<
FAILURE!
Results :
Tests in error:
testOne(BugletTest)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Mon Jan 07 11:43:01 CET 2008
[INFO] Final Memory: 6M/13M
[INFO] ------------------------------------------------------------------------
And this is the test error:
[EMAIL PROTECTED] /cygdrive/c/adhoc/buglet
$ less target/surefire-reports/*.txt
-------------------------------------------------------------------------------
Test set: BugletTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.109 sec <<<
FAILURE!
testOne(BugletTest) Time elapsed: 0 sec <<< ERROR!
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:74)
at java.io.InputStreamReader.<init>(InputStreamReader.java:118)
at java.util.Properties.load(Properties.java:298)
at BugletTest.testOne(BugletTest.java:10)
at BugletTest.testOne(BugletTest.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
This is the jvm I use:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM Windows 32 build cn142-20060421 (SR5)
(JIT enabled: jitc))
Kind regards,
Venelin Mitov
> ${pom.build.sourceDirectory} and ${pom.build.testSourceDirectory} no longer
> recognized
> --------------------------------------------------------------------------------------
>
> Key: MNG-2220
> URL: http://jira.codehaus.org/browse/MNG-2220
> Project: Maven 2
> Issue Type: Bug
> Components: POM
> Affects Versions: 2.0.4
> Environment: n/a
> Reporter: Marcel Schutte
> Attachments: buglet.zip
>
>
> The properties ${pom.build.sourceDirectory} and
> ${pom.build.testSourceDirectory} (and perhaps others as well) are no longer
> recognized in pom.xml. The following pom fragment had the desired effect of
> copying resources from the sourceDirectory in version 2.0.3, but doesn't work
> in 2.0.4:
> <build>
> <sourceDirectory>src</sourceDirectory>
> <testSourceDirectory>src-test</testSourceDirectory>
> <resources>
> <resource>
> <directory>${pom.build.sourceDirectory}</directory>
> <includes>
> <include>**/*.properties</include>
> </includes>
> </resource>
> </resources>
> <testResources>
> <testResource>
> <directory>${pom.build.testSourceDirectory}</directory>
> <includes>
> <include>**/mockfiles/</include>
> </includes>
> </testResource>
> </testResources>
> The attached project will fail on a 'mvn test' under maven 2.0.4 and succeed
> under 2.0.3
--
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