Re: Why does Maven fail to compile my project occasionally?
On 20 February 2014 01:58, LevskiWeng levskiw...@gmail.com wrote: Wayne Fay wrote Maven calls out to your system JDK to do the compilation step. With the [ERROR] lines you provided previously, Maven is simply passing along the error that was reported by javac. I bet, if you constructed the proper javac call (which can be seen in Maven's logs if you use -X for debug mode), you would see the same error produced without involving Maven (or Jenkins) at all. IIRC you had some cannot find symbol errors. What do you expect Maven to do about code defects reported by the Java compiler? Why are you blaming Maven for this? After digging into the dependency tree described in each module's pom.xml for several days, I found that you're right. It's my fault, not Maven's. It's because my code depends some other modules which I didn't put it into pom.xml explicitly. And I'm adding them into the corresponding pom.xml. Thank you for directing me back to the right track! However, I'm curious that I succeed to compile the project after several compilation failure. How does it happen? I've passed the parameter 'clean install -Dmaven.test.skip=true --update-snapshots --batch-mode --fail-fast --debug -Dmaven.compiler.forceJavacCompilerUse=true -Dmaven.compiler.verbose=true' to Maven, but it doesn't get the same error when I compile the project the second time. And it mislead me to blame Maven ;-) Could anyone explain the somewhat weird behavior of Maven? Thanks. Do you happen to have eclipse open while doing your tests? If the answer is yes, then eclipse could be doing some background compilation and just happen to write the files in place during your second time on the cli -- View this message in context: http://maven.40175.n5.nabble.com/Why-does-Maven-fail-to-compile-my-project-occasionally-tp5784849p5785441.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why does Maven fail to compile my project occasionally?
On 20/02/2014 4:38 AM, Stephen Connolly wrote: On 20 February 2014 01:58, LevskiWeng levskiw...@gmail.com wrote: Wayne Fay wrote Maven calls out to your system JDK to do the compilation step. With the [ERROR] lines you provided previously, Maven is simply passing along the error that was reported by javac. I bet, if you constructed the proper javac call (which can be seen in Maven's logs if you use -X for debug mode), you would see the same error produced without involving Maven (or Jenkins) at all. IIRC you had some cannot find symbol errors. What do you expect Maven to do about code defects reported by the Java compiler? Why are you blaming Maven for this? After digging into the dependency tree described in each module's pom.xml for several days, I found that you're right. It's my fault, not Maven's. It's because my code depends some other modules which I didn't put it into pom.xml explicitly. And I'm adding them into the corresponding pom.xml. Thank you for directing me back to the right track! However, I'm curious that I succeed to compile the project after several compilation failure. How does it happen? I've passed the parameter 'clean install -Dmaven.test.skip=true --update-snapshots --batch-mode --fail-fast --debug -Dmaven.compiler.forceJavacCompilerUse=true -Dmaven.compiler.verbose=true' to Maven, but it doesn't get the same error when I compile the project the second time. And it mislead me to blame Maven ;-) Could anyone explain the somewhat weird behavior of Maven? Thanks. Do you happen to have eclipse open while doing your tests? If the answer is yes, then eclipse could be doing some background compilation and just happen to write the files in place during your second time on the cli Eclipse can resolve missing dependencies by looking at other projects in your workspace. It is a good idea to turn this off so you don't make projects that only work in your workspace. You can look at project properties to see where Eclipse is getting your dependencies This can help track down the case where it builds in Eclipse or shows no errors in the imports while editing but will not build outside Eclipse. Ron -- View this message in context: http://maven.40175.n5.nabble.com/Why-does-Maven-fail-to-compile-my-project-occasionally-tp5784849p5785441.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why does Maven fail to compile my project occasionally?
It's because my code depends some other modules which I didn't put it into pom.xml explicitly. And I'm adding them into the corresponding pom.xml. Thank you for directing me back to the right track! Glad you sorted that out! :) However, I'm curious that I succeed to compile the project after several compilation failure. How does it happen? I've passed the parameter 'clean install -Dmaven.test.skip=true --update-snapshots --batch-mode --fail-fast --debug -Dmaven.compiler.forceJavacCompilerUse=true -Dmaven.compiler.verbose=true' to Maven, but it doesn't get the same error when I compile the project the second time. And it mislead me to blame Maven I rarely use any parameters as you have done here. Can you try a simple mvn clean install and see how that goes? Also -U and -X may be useful shortcuts for you to know about. And I agree with Stephen and Ron - Eclipse sometimes does helpful things which produce hard to explain results. I would suggest either using Eclipse or Maven CLI but not both simultaneously on the same project (close Eclipse just use Maven CLI, or just use Eclipse). Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Help[please]: maven-surefire-plugin with TestNG group dependencies not working....
Anyone have similar issues running tests w/ group dependencies? On Tue, Feb 18, 2014 at 5:52 PM, Jeff predato...@gmail.com wrote: I'm having a frustrating test dependency issue and I don't know if it is my configuration or a problem. I've got two test classes in my maven project using testng:6.8.7 and maven-surefire-plugin:2.16. The first test class has the following annotation on the test *class* which should be inherited by the test methods: * @Test(groups={ functional })* * public class FuncTest{...}* on the other test *class*, I have: * @Test(groups={ load }, dependsOnGroups = { functional })* * public class LoadTest {...}* When I run the following: *mvn test* I get the error: *[ERROR] DependencyMap::Method LoadTest depends on nonexistent group functional* If I REMOVE the dependsOnGroups... it works. If I do any of the following but keep the dependsOnGroups option: * mvn test -Dtest=LoadTest,FuncTest* * mvn test -Dgroups=functional,load* * mvn test -Dgroups=functional,load **-Dtest=LoadTest,FuncTest* it fails with the error above. If I run it outside of Maven by calling org.testng.TestNG directly, it works fine. I also tried moving the group definitions/dependencies to the test method directly, but that didn't change. *What am I missing? * Thanks! -- Jeff Vincent See my LinkedIn profile at: http://www.linkedin.com/in/rjeffreyvincent -- Jeff Vincent See my LinkedIn profile at: http://www.linkedin.com/in/rjeffreyvincent