[ANN] Maven Compiler Plugin 2.4 Released
Hi, The Maven team is pleased to announce the release of the Maven Compiler Plugin, version 2.4 The Compiler Plugin is used to compile the sources of your project. The default compiler is javac and is used to compile Java sources. http://maven.apache.org/plugins/maven-compiler-plugin You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId version2.4/version /plugin Release Notes - Maven 2.x Compiler Plugin - Version 2.4 ** Improvement * [MCOMPILER-137] - Plugin documentation refers to Maven 2 * [MCOMPILER-147] - The usage page should use pluginManagement for configuring the plugin * [MCOMPILER-166] - Use plexus-compiler 1.8.6 for performance improvement ** Bug * [MCOMPILER-64] - mvn clean install crashes with java.lang.OutOfMemoryError: PermGen space after update to java 1.6.0_04 * [MCOMPILER-94] - compiler sets artifact file to target/classes, even if nothing is compiled * [MCOMPILER-99] - Spaces in for external executable are not accepted * [MCOMPILER-120] - Javac compiler plugin doesn't support -Werror * [MCOMPILER-130] - compilerArgument option doesn't work with maxerrs option, compilerArguments does * [MCOMPILER-135] - Passing multiple parameters to Java 6 annotation processors with javac does not work * [MCOMPILER-136] - The description of the skip parameter of the testCompile mojo is incorrect * [MCOMPILER-148] - Misleading documentation on configurationencoding * [MCOMPILER-149] - Java compiler warning is masking a javac exception, which the compiler plugin doesn't know how to parse * [MCOMPILER-167] - Incorrect default for generatedTestSourcesDirectory Have Fun! -- The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Surefire unable to find bar test method when passed -Dtest=Foo#bar
I have a test class; let's call it TestCaseFoo. When I run surefire:test with no value for the test property, this class is found and all of its test methods execute. I would like to run just one of those methods. So I tried invoking Maven like this: mvn clean test -Dtest=TestCaseFoo#testBar ...where my test case has a method like this: @Test public void testBar() { // here is where the magic happens } I get this error: initializationError(org.junit.runner.manipulation.Filter) Time elapsed: 0.004 sec ERROR! java.lang.Exception: No tests found matching Method testBar(com.fizbaw.TestCaseFoo) from org.junit.internal.requests.ClassRequest@624b035d at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:37) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:227) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) Note in particular the odd method signature, or at least the output that says testBar(com.fizbaw.TestCaseFoo). JUnit methods must have zero parameters. I'm not sure what's going on here. I am using JUnit 4.10 and Surefire 2.12. Best, Laird -- http://about.me/lairdnelson
Re: Surefire unable to find bar test method when passed -Dtest=Foo#bar
ahem... are you running on a unix system? you do know # is the comment start marker for most unix shells you'd need to escape it with \ or quote the entire -D On 1 May 2012 16:24, Laird Nelson ljnel...@gmail.com wrote: I have a test class; let's call it TestCaseFoo. When I run surefire:test with no value for the test property, this class is found and all of its test methods execute. I would like to run just one of those methods. So I tried invoking Maven like this: mvn clean test -Dtest=TestCaseFoo#testBar ...where my test case has a method like this: @Test public void testBar() { // here is where the magic happens } I get this error: initializationError(org.junit.runner.manipulation.Filter) Time elapsed: 0.004 sec ERROR! java.lang.Exception: No tests found matching Method testBar(com.fizbaw.TestCaseFoo) from org.junit.internal.requests.ClassRequest@624b035d at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:37) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:227) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) Note in particular the odd method signature, or at least the output that says testBar(com.fizbaw.TestCaseFoo). JUnit methods must have zero parameters. I'm not sure what's going on here. I am using JUnit 4.10 and Surefire 2.12. Best, Laird -- http://about.me/lairdnelson
Re: Surefire unable to find bar test method when passed -Dtest=Foo#bar
On Tue, May 1, 2012 at 12:31 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: you'd need to escape it with \ or quote the entire -D Yes, I am running on MacOS. Sorry; didn't indicate that I had done that (single-quoted the string). Here was the totality of my command line, in case there are other interactions involved: mvn clean install -fae -Pminlog -Dtest='TestCaseFoo#testBar' (minlog is a profile that I defined that sets a few properties, nothing else). Thanks for your prompt and professional response. Best, Laird -- http://about.me/lairdnelson
Re: Surefire unable to find bar test method when passed -Dtest=Foo#bar
On Tue, May 1, 2012 at 12:36 PM, Laird Nelson ljnel...@gmail.com wrote: mvn clean install -fae -Pminlog -Dtest='TestCaseFoo#testBar' I also tried -Dtest='TestCaseFoo#testB*' which failed with the same error, so that told me that it was indeed able to find the name of the test method, as the error message indicates testBar. Best, Laird -- http://about.me/lairdnelson
[ANN] Maven Site Plugin 3 3.1 Released
The Maven team is pleased to announce the release of the Maven Site Plugin 3, version 3.1 The Maven Site Plugin is a plugin that generates a site for the current project. http://maven.apache.org/plugins/maven-site-plugin You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-site-plugin/artifactId version3.1/version /plugin Release Notes - Maven Site Plugin 3 - Version 3.1 Bug * [MSITE-638] site.xml custom parameter and template variables not documented * [MSITE-633] Doco: reference to ${currentVersion} should be ${currentStableVersion} in creating-content.html#Filtering * [MSITE-624] Usage page has incorrect information on the id used by site:stage-deploy * [MSITE-621] empty outputDirectory causes mvn clean to delete whole tree * [MSITE-620] Fix documentation of attach-descriptor according to Maven3 Compatibility Notes * [MSITE-610] No doc for reportPlugins in main goal docs * [MSITE-609] site:deploy is broken * [MSITE-607] no documentation for breadcrumbs in the doc of site.xml * [MSITE-603] ClassNotFoundException on site:site when validating XML input documents * [MSITE-602] The staged site is deployed to the wrong place * [MSITE-600] site plugin 3.0 does not permit a child to fully override parent site deployment URL * [MSITE-549] Not possible to easily customise footer * [MSITE-402] Execution order of report plugins is arbitrary if inheritance is involved New Feature * [MSITE-582] Make it possible to remove breadcrumbs in child projects again Task * [MSITE-641] Require Maven 2.2.1 * [MSITE-637] Upgrade to doxia-sitetools-1.3 * [MSITE-636] Upgrade to doxia-1.3 * [MSITE-627] Upgrade to reporting-exec 1.0.2 * [MSITE-625] Please add an 'archive' parameter to the 'jar' goal of the 'maven-site-plugin'. Enjoy, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to include WAR dependency in project
What are you trying to do? It is unusual for a WAR to be a dependency. Even more unusual for a WebService to be a dependency. What are you testing? Ron On 01/05/2012 2:44 PM, Daivish Shah wrote: Hi, I have following dependency declared in my UNIT Testing module project. dependency groupIdsample-project-ws/groupId artifactIdsample-project-ws/artifactId version${project.version}/version typewar/type scopetest/scope /dependency And i also have following entry in my unit testing module project which is different then my web service project. plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration overlays overlay/ overlay groupIdsample-project-ws/groupId artifactIdyour-project-artifactId/artifactId /overlay /overlays /configuration /plugin And i am using Webservice depedency classes, in my JUNIT module which is build under that WAR project. But i am not able to add it, Please help me out on this. Thanks. -- 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: How to include WAR dependency in project
I have some integration UNIT test cases. Which require me to include those JAVA files in my integration unit test module, And this module is designed to include all UNIT test case for that parent project. I hope you got it. But do you have any solution of my question ? On Tue, May 1, 2012 at 11:59 AM, Ron Wheeler rwhee...@artifact-software.com wrote: What are you trying to do? It is unusual for a WAR to be a dependency. Even more unusual for a WebService to be a dependency. What are you testing? Ron On 01/05/2012 2:44 PM, Daivish Shah wrote: Hi, I have following dependency declared in my UNIT Testing module project. dependency groupIdsample-project-ws/**groupId artifactIdsample-project-ws**/artifactId version${project.version}/**version typewar/type scopetest/scope /dependency And i also have following entry in my unit testing module project which is different then my web service project. plugins plugin groupIdorg.apache.maven.**plugins/groupId artifactIdmaven-war-plugin/**artifactId configuration overlays overlay/ overlay groupIdsample-project-ws/**groupId artifactIdyour-project-**artifactId/artifactId /overlay /overlays /configuration /plugin And i am using Webservice depedency classes, in my JUNIT module which is build under that WAR project. But i am not able to add it, Please help me out on this. Thanks. -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 --**--**- To unsubscribe, e-mail: users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to include WAR dependency in project
Break the WAR project into 2 projects. One with code that makes a JAR and one without code to make a WAR. You could put your unit tests in the jar project which is what most people do or make a third project that has some test routines that test your code. Ron On 01/05/2012 3:12 PM, Daivish Shah wrote: I have some integration UNIT test cases. Which require me to include those JAVA files in my integration unit test module, And this module is designed to include all UNIT test case for that parent project. I hope you got it. But do you have any solution of my question ? On Tue, May 1, 2012 at 11:59 AM, Ron Wheelerrwhee...@artifact-software.com wrote: What are you trying to do? It is unusual for a WAR to be a dependency. Even more unusual for a WebService to be a dependency. What are you testing? Ron On 01/05/2012 2:44 PM, Daivish Shah wrote: Hi, I have following dependency declared in my UNIT Testing module project. dependency groupIdsample-project-ws/**groupId artifactIdsample-project-ws**/artifactId version${project.version}/**version typewar/type scopetest/scope /dependency And i also have following entry in my unit testing module project which is different then my web service project. plugins plugin groupIdorg.apache.maven.**plugins/groupId artifactIdmaven-war-plugin/**artifactId configuration overlays overlay/ overlay groupIdsample-project-ws/**groupId artifactIdyour-project-**artifactId/artifactId /overlay /overlays /configuration /plugin And i am using Webservice depedency classes, in my JUNIT module which is build under that WAR project. But i am not able to add it, Please help me out on this. Thanks. -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 --**--**- To unsubscribe, e-mail: users-unsubscribe@maven.**apache.orgusers-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: How to include WAR dependency in project
Tue, 1 May 2012 11:44:27 -0700, /Daivish Shah/: I have following dependency declared in my UNIT Testing module project. dependency groupIdsample-project-ws/groupId artifactIdsample-project-ws/artifactId version${project.version}/version typewar/type scopetest/scope /dependency [...] If you control the POM of sample-project-ws you could produce additional 'classes' jar artifact: http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses which you could then refer to as dependency from other modules: dependency groupIdsample-project-ws/groupId artifactIdsample-project-ws/artifactId version${project.version}/version classifierclasses/classifier scopetest/scope /dependency -- Stanimir - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to include WAR dependency in project
Thanks Stanimir, I modified my code like this. JUNIT Module POM.XML dependency groupIdsample-project-ws/groupId artifactIdsample-project-ws/artifactId version${project.version}/version classifierclasses/classes scopetest/scope /dependency My sample-project-ws POM.XML plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration attachClassestrue/attachClasses /configuration /plugin Thanks a lot for your help. On Tue, May 1, 2012 at 1:08 PM, Stanimir Stamenkov s7a...@netscape.netwrote: Tue, 1 May 2012 11:44:27 -0700, /Daivish Shah/: I have following dependency declared in my UNIT Testing module project. dependency groupIdsample-project-ws/**groupId artifactIdsample-project-ws**/artifactId version${project.version}/**version typewar/type scopetest/scope /dependency [...] If you control the POM of sample-project-ws you could produce additional 'classes' jar artifact: http://maven.apache.org/**plugins/maven-war-plugin/war-** mojo.html#attachClasseshttp://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses which you could then refer to as dependency from other modules: dependency groupIdsample-project-ws/**groupId artifactIdsample-project-ws**/artifactId version${project.version}/**version classifierclasses/**classifier scopetest/scope /dependency -- Stanimir --**--**- To unsubscribe, e-mail: users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Surefire unable to find bar test method when passed -Dtest=Foo#bar
On 1 May 2012 17:36, Laird Nelson ljnel...@gmail.com wrote: On Tue, May 1, 2012 at 12:31 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: you'd need to escape it with \ or quote the entire -D Yes, I am running on MacOS. Sorry; didn't indicate that I had done that (single-quoted the string). Here was the totality of my command line, in case there are other interactions involved: mvn clean install -fae -Pminlog -Dtest='TestCaseFoo#testBar' there is your #fail mvn clean install -fae -Pminlog '-Dtest=TestCaseFoo#testBar' (minlog is a profile that I defined that sets a few properties, nothing else). Thanks for your prompt and professional response. Best, Laird -- http://about.me/lairdnelson
Re: Surefire unable to find bar test method when passed -Dtest=Foo#bar
On Tue, May 1, 2012 at 5:30 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: there is your #fail mvn clean install -fae -Pminlog '-Dtest=TestCaseFoo#testBar' Thanks again for your prompt response. I don't see how the quoting of the -Dtest= part would help, but I did it just the same, and I get the same error: mvn -o clean install '-Dtest=TestCaseFoo#testBar' [snip] --- T E S T S --- Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8 Running com.foobar.TestCaseFoo Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.096 sec FAILURE! initializationError(org.junit.runner.manipulation.Filter) Time elapsed: 0.005 sec ERROR! java.lang.Exception: No tests found matching Method testCRUD(com.foobar.TestCaseFoo) from org.junit.internal.requests.ClassRequest@7cf1bb78 at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:37) I'll research further. Thanks again. Help like yours is really quite valuable. Best, Laird -- http://about.me/lairdnelson
Re: Surefire unable to find bar test method when passed -Dtest=Foo#bar
On 1 May 2012 22:43, Laird Nelson ljnel...@gmail.com wrote: On Tue, May 1, 2012 at 5:30 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: there is your #fail mvn clean install -fae -Pminlog '-Dtest=TestCaseFoo#testBar' Thanks again for your prompt response. I don't see how the quoting of the -Dtest= part would help, but I did it just the same, and I get the same error: for reasons I have never quite understood, quoting has only ever worked for me when the quote is at the very start of the -D, i.e. -D or '-D mvn -o clean install '-Dtest=TestCaseFoo#testBar' [snip] --- T E S T S --- Picked up _JAVA_OPTIONS: -Dfile.encoding=UTF-8 Running com.foobar.TestCaseFoo Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.096 sec FAILURE! initializationError(org.junit.runner.manipulation.Filter) Time elapsed: 0.005 sec ERROR! java.lang.Exception: No tests found matching Method testCRUD(com.foobar.TestCaseFoo) from org.junit.internal.requests.ClassRequest@7cf1bb78 at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:37) I'll research further. Thanks again. Help like yours is really quite valuable. Looks like something is going wrong alright Best, Laird -- http://about.me/lairdnelson
Re: Surefire unable to find bar test method when passed -Dtest=Foo#bar
On Tue, May 1, 2012 at 5:56 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: Looks like something is going wrong alright The part I don't understand is why it appears that the method description indicates that the method takes a parameter. I wonder if this is a problem in JUnit 4.10 and not anything to do with Surefire? Before I go code spelunking, is there an obvious place to look for where Surefire's JUnit provider calls whatever mechanism inside JUnit that is responsible for running the given test method? Best, Laird -- http://about.me/lairdnelson
Dependency in an assembly (zip file)
Hi, I have a project A with multiple modules, one of the modules called alfa has jar packaging that produces a JAR file but it also produces a ZIP file through the maven-asembly-plugin. In my Nexus repository I get the JAR and ZIP file as alfa-X.Y.Z.jar alfa-X.Y.Z-alfa.zip I have a second project B where I need to specify the ZIP file as a dependency, but I can't figure how to specify this dependency. I tried: dependency groupIdcom.example.projectA/groupId artifactIdalfa/artifactId typezip/type versionX.Y.Z/version /dependency but as I expected that looks for alfa-X.Y.Z.zip , not alfa.X.Y.Z-alfa.zip How do I modify project A or project B to be able to specify the dependency in the ZIP file ? Does project A should be of pom packaging rather than jar ? -Jorge - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Dependency in an assembly (zip file)
Never mind, adding the classifier with the id of the assembly from project A does the trick: dependency groupIdcom.example.projectA/groupId artifactIdalfa/artifactId typezip/type classifieralfa/classifier versionX.Y.Z/version /dependency On Tue, May 1, 2012 at 4:05 PM, Jorge Medina cerebrotecnolog...@gmail.com wrote: Hi, I have a project A with multiple modules, one of the modules called alfa has jar packaging that produces a JAR file but it also produces a ZIP file through the maven-asembly-plugin. In my Nexus repository I get the JAR and ZIP file as alfa-X.Y.Z.jar alfa-X.Y.Z-alfa.zip I have a second project B where I need to specify the ZIP file as a dependency, but I can't figure how to specify this dependency. I tried: dependency groupIdcom.example.projectA/groupId artifactIdalfa/artifactId typezip/type versionX.Y.Z/version /dependency but as I expected that looks for alfa-X.Y.Z.zip , not alfa.X.Y.Z-alfa.zip How do I modify project A or project B to be able to specify the dependency in the ZIP file ? Does project A should be of pom packaging rather than jar ? -Jorge - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven-scm-plugin example/help
I was looking at possibly using the maven-scm-plugin to tag my releases in scm. A couple quick questions. Does anyone have a quick example of creating a tag from an scm trunk inside of a maven build, maybe a profile? What about only running the scm:tag goal if the version I am deploying is not a SNAPSHOT. IE I don't want to tag my snapshots, only releases deployed that are not SNAPSHOTs. Thanks! - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org