deploying WAR from maven with different configurations
I'm using Cargo to deploy my WAR to a testing server. The idea is that the CI build will push the app over to a testing server. When deployed to this testing environment, my Spring configuration wires mock business objects into the app. The spring config resides inside my WAR. It's unclear to me how I should handle the creation of this testing version of the spring config . . . I think I understand that it's very bad have my build produce an alternative version of the WAR artifact for testing. I know that I could use a maven profile, triggered in the build job I use to deploy the war to the testing server, to filter the spring config for the testing settings. The obvious drawback here seems to be the fact that the same maven artifact, my war, would sometimes have testing config inside it and sometimes the real config. How do I get around this? Do I need to restructure the way I do my whole build, externalizing the config to another artifact? Is there someway to just safeguard against the testing artifact escaping into the real world ( i.e. a maven repo ) where it could be confused with the real one? Should I make two versions of the WAR from my build? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: deploying WAR from maven with different configurations
I think I understand that it's very bad have my build produce an alternative version of the WAR artifact for testing. It is not a best practice, as far as most of us here are concerned. Best practice says to use the exact same (unchanged) artifact for QA and PROD. I know that I could use a maven profile, triggered in the build job I use to deploy the war to the testing server, to filter the spring config for the testing settings. No b/c you'd end up with a different war for QA/testing than you'd use for PROD. Thus this is not the best approach. Do I need to restructure the way I do my whole build, externalizing the config to another artifact? This is one (good) way to do it. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: deploying WAR from maven with different configurations
Do I need to restructure the way I do my whole build, externalizing the config to another artifact? This is one (good) way to do it. What then are the options for handling this externalized configuration at build time? At first glance, I'm thinking it requires a whole extra build project for doing the testing deployment, complete with src that includes a copy of the test configuration. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: deploying WAR from maven with different configurations
What then are the options for handling this externalized configuration at build time? At first glance, I'm thinking it requires a whole extra build project for doing the testing deployment, complete with src that includes a copy of the test configuration. Sounds about right to me. Alternatively you can build one single WAR with all possible configurations stored within, and then use some environment variable which tells your WAR or Appserver which config file to load at runtime. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Overriding a property from a profile
If a profile has a property value set, -D from the command-line does not win, the profile wins. Does this surprise anyone else? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Overriding a property from a profile
Yes (I think). Did you test with both Maven 3 and 2? /Anders On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies bimargul...@gmail.com wrote: If a profile has a property value set, -D from the command-line does not win, the profile wins. Does this surprise anyone else? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Overriding a property from a profile
How are the profiles being activated? Command line -P or via activations, or a mix? About 6 months ago I had issues using -P and -D and fix it by getting all -D options we might need to use into profiles and then just remembering specific orders of profiles. John On 29 October 2012 16:33, Anders Hammar and...@hammar.net wrote: Yes (I think). Did you test with both Maven 3 and 2? /Anders On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies bimargul...@gmail.com wrote: If a profile has a property value set, -D from the command-line does not win, the profile wins. Does this surprise anyone else? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Maven Maven Project Info Reports Plugin 2.6 Released
The Maven team is pleased to announce the release of the Maven Project Info Reports Plugin, version 2.6 This version fixed an annoying bug in the 2.5.x range, where the plugin was actually downloading a noticeable part of the internet. It also adds image/gravatar.com avatar support to the team list The Maven Project Info Reports Plugin is a plugin that generates standard reports for the specified project. http://maven.apache.org/plugins/maven-project-info-reports-plugin You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId version2.6/version /plugin Release Notes - Maven 2.x Project Info Reports Plugin - Version 2.6 ** Bug * [MPIR-233] - dependency-management is checking for SNAPSHOT updates * [MPIR-255] - DependencyManagement report reads every artifact from repository ** Improvement * [MPIR-176] - Support picture URLs in team report Enjoy, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven Dependency Type
uyou can have a look at http://maven.apache.org/ref/3.1-SNAPSHOT/maven- core/artifact-handlers.html for a reference of default types and classifiers Regards, Hervé Le jeudi 25 octobre 2012 20:09:58 John Kramer a écrit : Hey guys, I have a question regarding the maven dependencies section. In order to put a dependency on a test jar, is it correct to specify typetest-jar/type or typetest/type? I specified a dependency on project bar from project foo using typetesttest in a dependency section and the maven eclipse plugin ran successfully and eclipse set up my projects so that the module recognizes, but mvn package gives the following error: [ERROR] Failed to execute goal on project statistics: Could not resolve dependencies for project com.mojiva:foo:jar:1.9.0-SNAPSHOT: Could not find artifact com.mojiva:bar:test:1.9.0-SNAPSHOT in mojiva If I change it, to test-jar, the error goes away. I know I have used typetest/type in the past and not had an issue. Did it change? Also, I can't find the documentation on this. A pointer to the docs would be helpful. Thanks to all! John Kramer email: jkra...@mojiva.commailto:jkra...@mojiva.com mobile: 314.435.2370 skype: kramer.mojiva twitter: @KramerKnowsTechhttps://twitter.com/KramerKnowsTech 0xCAFEBABE0032 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven Dependency Type
Thank you. That's exactly what I was looking for. John Kramer email: jkra...@mojiva.com mobile: 314.435.2370 skype: kramer.mojiva twitter: @KramerKnowsTech https://twitter.com/KramerKnowsTech 0xCAFEBABE0032 On 10/29/12 13:54 PM, Hervé BOUTEMY herve.bout...@free.fr wrote: uyou can have a look at http://maven.apache.org/ref/3.1-SNAPSHOT/maven- core/artifact-handlers.html for a reference of default types and classifiers Regards, Hervé Le jeudi 25 octobre 2012 20:09:58 John Kramer a écrit : Hey guys, I have a question regarding the maven dependencies section. In order to put a dependency on a test jar, is it correct to specify typetest-jar/type or typetest/type? I specified a dependency on project bar from project foo using typetesttest in a dependency section and the maven eclipse plugin ran successfully and eclipse set up my projects so that the module recognizes, but mvn package gives the following error: [ERROR] Failed to execute goal on project statistics: Could not resolve dependencies for project com.mojiva:foo:jar:1.9.0-SNAPSHOT: Could not find artifact com.mojiva:bar:test:1.9.0-SNAPSHOT in mojiva If I change it, to test-jar, the error goes away. I know I have used typetest/type in the past and not had an issue. Did it change? Also, I can't find the documentation on this. A pointer to the docs would be helpful. Thanks to all! John Kramer email: jkra...@mojiva.commailto:jkra...@mojiva.com mobile: 314.435.2370 skype: kramer.mojiva twitter: @KramerKnowsTechhttps://twitter.com/KramerKnowsTech 0xCAFEBABE0032 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: deploying WAR from maven with different configurations
On 29/10/2012 10:33 AM, Davis, Chad wrote: Do I need to restructure the way I do my whole build, externalizing the config to another artifact? This is one (good) way to do it. What then are the options for handling this externalized configuration at build time? At first glance, I'm thinking it requires a whole extra build project for doing the testing deployment, complete with src that includes a copy of the test configuration. Sound about right. No use fighting Maven forever when you can get it fixed with a trivial project - POM and a configuration file. Ron - 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: Overriding a property from a profile
With two profiles that disagreed, the order of the profiles names after -Pa,b (or b,a) did not matter. -Pa -Dbletch=false respected the 'true' in a, not the false from the command line. On Mon, Oct 29, 2012 at 12:47 PM, John Patrick nhoj.patr...@gmail.com wrote: How are the profiles being activated? Command line -P or via activations, or a mix? About 6 months ago I had issues using -P and -D and fix it by getting all -D options we might need to use into profiles and then just remembering specific orders of profiles. John On 29 October 2012 16:33, Anders Hammar and...@hammar.net wrote: Yes (I think). Did you test with both Maven 3 and 2? /Anders On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies bimargul...@gmail.com wrote: If a profile has a property value set, -D from the command-line does not win, the profile wins. Does this surprise anyone else? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Maven Invoker 2.1 Released
The Maven team is pleased to announce the release of the Maven Invoker, version 2.1 With this component it is possible to programmatically invoke Maven. http://maven.apache.org/shared/maven-invoker/ To use the Maven Invoker, add the following dependency to your project: dependency groupIdorg.apache.maven.shared/groupId artifactIdmaven-invoker/artifactId version2.1/version /dependency Release Notes - Maven Shared Components - Version maven-invoker-2.1 ** Bug * [MSHARED-153] - Upgrade plexus-utils to avoid potential deadlocks in versions prior to 2.0.5 ** Improvement * [MSHARED-187] - Added option to execute a maven build with alsoMake and alsoMakeDependents * [MSHARED-246] - Add option for T / threads * [MSHARED-247] - Add option for global-settings * [MSHARED-248] - Add option for toolchains * [MSHARED-251] - Option to change from mvn executable to mvnDebug executable * [MSHARED-254] - Use plexus annotations to generate components descriptor ** Task * [MSHARED-249] - Add option for --resume-from Enjoy, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Overriding a property from a profile
With two profiles that disagreed, the order of the profiles names after -Pa,b (or b,a) did not matter. Correct. The declared order in the pom or settings.xml is the one that counts. -Pa -Dbletch=false respected the 'true' in a, not the false from the command line. I think this surprises me. Did you verify with Maven 2? /Anders On Mon, Oct 29, 2012 at 12:47 PM, John Patrick nhoj.patr...@gmail.com wrote: How are the profiles being activated? Command line -P or via activations, or a mix? About 6 months ago I had issues using -P and -D and fix it by getting all -D options we might need to use into profiles and then just remembering specific orders of profiles. John On 29 October 2012 16:33, Anders Hammar and...@hammar.net wrote: Yes (I think). Did you test with both Maven 3 and 2? /Anders On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies bimargul...@gmail.com wrote: If a profile has a property value set, -D from the command-line does not win, the profile wins. Does this surprise anyone else? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Help Plugin Not Reporting All Profiles
Hi, I have a pom with a parent pom. Both poms have profiles, some of which are active and some of which are not. The parent pom has a profile that is activated by the existence of a file, as below. However, when I run mvn help:active-profiles on the _child_ pom I do not get this profile to show up - despite the profile being inevitably executed when mvn clean install is run. The same thing happens, I think, with property–based profiles. project profiles profile idtest/id activation file existsmarker/exists /file /activation Is this a limitation of the plugin or am I using it incorrectly? Thank you, Daniel Winsor Associate, IT Architecture - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Help Plugin Not Reporting All Profiles
You've hit MPH-79 [1] I think. /Anders [1] http://jira.codehaus.org/browse/MPH-79 On Mon, Oct 29, 2012 at 9:01 PM, Winsor, Daniel daniel.win...@etrade.com wrote: Hi, I have a pom with a parent pom. Both poms have profiles, some of which are active and some of which are not. The parent pom has a profile that is activated by the existence of a file, as below. However, when I run mvn help:active-profiles on the _child_ pom I do not get this profile to show up - despite the profile being inevitably executed when mvn clean install is run. The same thing happens, I think, with property–based profiles. project profiles profile idtest/id activation file existsmarker/exists /file /activation Is this a limitation of the plugin or am I using it incorrectly? Thank you, Daniel Winsor Associate, IT Architecture - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Overriding a property from a profile
On Mon, Oct 29, 2012 at 4:26 PM, Anders Hammar and...@hammar.net wrote: With two profiles that disagreed, the order of the profiles names after -Pa,b (or b,a) did not matter. Correct. The declared order in the pom or settings.xml is the one that counts. -Pa -Dbletch=false respected the 'true' in a, not the false from the command line. I think this surprises me. Did you verify with Maven 2? No, all my projects now require M3. I guess I need to build a test case and JIRA. /Anders On Mon, Oct 29, 2012 at 12:47 PM, John Patrick nhoj.patr...@gmail.com wrote: How are the profiles being activated? Command line -P or via activations, or a mix? About 6 months ago I had issues using -P and -D and fix it by getting all -D options we might need to use into profiles and then just remembering specific orders of profiles. John On 29 October 2012 16:33, Anders Hammar and...@hammar.net wrote: Yes (I think). Did you test with both Maven 3 and 2? /Anders On Mon, Oct 29, 2012 at 4:22 PM, Benson Margulies bimargul...@gmail.com wrote: If a profile has a property value set, -D from the command-line does not win, the profile wins. Does this surprise anyone else? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
need help
Hello, I am use maven-3.0.4 to build up the Apache Giraph, and my cluster hadoop environment is cdh3u4, but I meet the error What can I do for it? Looking forward to your reply! Best regards. 王佳伟 (Jiawei Wang) Bioinformatic tech lab HPC developer, BGI, Shenzhen China
RE: [maven] need help
Please post as text the error you are receiving. From: wangjiawei [mailto:wangjia...@genomics.cn] Sent: Monday, October 29, 2012 10:38 To: users Subject: [maven] need help Hello, I am use maven-3.0.4 to build up the Apache Giraph, and my cluster hadoop environment is cdh3u4, but I meet the error What can I do for it? Looking forward to your reply! Best regards. 王佳伟 (Jiawei Wang) Bioinformatic tech lab HPC developer, BGI, Shenzhen China - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org