How do I exclude resources for tests-jar only?
Hello, I know of tests-jar goal in maven-jar-plugin that would generate both my-artifact.jar and my-artifact-tests.jar. But what if I want to exclude some properties resources ONLY for the my-artifact-tests.jar? I tried the following, but it exclude from both of the jars, which is not what I want. Can anyone give me a tip on how to do this? plugin artifactIdmaven-jar-plugin/artifactId version2.4/version executions execution goals goaltest-jar/goal /goals configuration excludes exclude**/*.properties/exclude /excludes /configuration /execution /executions /plugin Many thanks, Zemian Deng -- View this message in context: http://maven.40175.n5.nabble.com/How-do-I-exclude-resources-for-tests-jar-only-tp5644452p5644452.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: How do I exclude resources for tests-jar only?
Hi Wayne, D'oh, that's too bad. It seems like a good feature to have though (for those who care about their tests jar anyway.) I am converting a Ant based project over to Maven, and it's for legacy purpose that I need to keep our deployment (jar and classpath) in tact without much changes. The original build generate a test jar without any properties files in it, and it's used on some standalone performance test tool. If it's not excluded then it will load the incorrect resources files during run, which what I tried to avoid. Zemian -- View this message in context: http://maven.40175.n5.nabble.com/How-do-I-exclude-resources-for-tests-jar-only-tp5644452p5644574.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: How do I exclude resources for tests-jar only?
Ah, yes it works indeed with Maven3! Thank you Anders for confirming this. I think I have confused myself when I explored different config that my resources was excluded at one point from the main jar. It's good to know that this is working as expected now. Thanks also to Wayne for the link. Cheers! Zemian -- View this message in context: http://maven.40175.n5.nabble.com/How-do-I-exclude-resources-for-tests-jar-only-tp5644452p5644923.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
Surefire plugin single test not working on 2.12
Hi there, When using `maven-surefire-plugin` version 2.12, running single test command such as mvn test -Dtest=MyTest would always result empty tests to run. Reverting back to version 2.11 works fine! Has anyone else noticed this? ~ Zemian -- View this message in context: http://maven.40175.n5.nabble.com/Surefire-plugin-single-test-not-working-on-2-12-tp5561256p5561256.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: How to specify full path of a executable for a scm vendor?
Thanks for the tip Wayne. I agree that using PATH is more portable. However I do have a small issue to deal with, and I thought explicit path might help a bit. I am using Maven + Cygwin + Mercurial (a cygwin pkg). This works fine for all my development, except during release. To run 'mvn release:prepapre', I have to use explicit Windows version of the Mercurial and setup PATH. The cygwin package version of Mercurial will not work by default. To avoid installing multiple version of Mercurial, I am hoping that the release plugin would allow me to try setting a explicit path of hg such as C:\cygwin\bin\bash.exe -c hg. Has anyone done this and would like to share? Much thanks, Zemian -- View this message in context: http://maven.40175.n5.nabble.com/How-to-specify-full-path-of-a-executable-for-a-scm-vendor-tp5463712p5486481.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
How to specify full path of a executable for a scm vendor?
Hi list, If I have multiple executables for a scm vendor (eg: /usr/bin/hg and /usr/local/bin/hg), how can I configure this in pom to tell it to always use a specific version of hg? Many Thanks, Zemian Deng -- View this message in context: http://maven.40175.n5.nabble.com/How-to-specify-full-path-of-a-executable-for-a-scm-vendor-tp5463712p5463712.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
Insert currentDate with archetype templates
Hello maven-archetype-plugin users, I am looking to insert a current datetime stamp into file generated by my own archetype. I found an old ticket http://jira.codehaus.org/browse/ARCHETYPE-63 said it's been implemented since alpha-1, but $currentDate still doesn't work on my alpha-4 version. Any idea how I can do this? If there is a list of dynamic properties available, can these be documented somewhere? Thanks, /Zemian Deng - Zemian Deng -- View this message in context: http://old.nabble.com/Insert-currentDate-with-archetype-templates-tp27945081p27945081.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