Jar finalName to m2 repository
Hey, I am trying to get a jar to be uploaded in the maven repository (local as well as our online repo) under a different name than its default ${project.build.finalName}. I tried changing the finalName under the build tag as well as under the configuration of the maven-jar-plugin. These attempts did change the name of the jar in my project/target directory, however when it's being uploaded it gets its default name again. ... artifactIdcommon/artifactId packagingjar/packaging ... build finalNameedp/finalName ... plugin artifactIdmaven-jar-plugin/artifactId version2.3.1/version configuration finalNameedp/finalName /configuration /plugin ... output in consule when doing the install/deploy phase: ... Installing C:\projectsmaven\common\target\edp.jar to C:\...\.m2\repository\...\common\0.0.1\common-0.0.1.jar ... When I build wars which depend on this artifact I need the jar to be called edp-0.0.1.jar in WEB-INF/libs. Now it's still called common-0.0.1.jar I don't want to use the assembly plugin with descriptor file for this. My client doesn't know a lot about Maven and they are going to get confused. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639096.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
maven set wrong JRE version
Hello, i am using m2eclipse and have installed latest openjdk 1.6. My project are created with m2eclipse, maven download the dependencies successfully but after that, eclipse complains with: = Build path specifies execution environment J2SE-1.4. There are no JREs installed in the workspace that are strictly compatible with this environment. = I can manually switch in the project settings the JRE, but m2eclipse overwrites it after a while. How to fix it? Thanks in advance -- Daniel Rindt dri...@visetics.com Visetics signature.asc Description: This is a digitally signed message part
Re: maven set wrong JRE version
I've not used openjdk for a while, but worth checking your Eclipse setting for Java - JREs - Execution Environments (typed from memory) and make sure that your 1.6 openjdk JDK is registered/linked as an execution environment JRE for 1.6. Brett On 8/18/10, Daniel Rindt dri...@visetics.com wrote: Hello, i am using m2eclipse and have installed latest openjdk 1.6. My project are created with m2eclipse, maven download the dependencies successfully but after that, eclipse complains with: = Build path specifies execution environment J2SE-1.4. There are no JREs installed in the workspace that are strictly compatible with this environment. = I can manually switch in the project settings the JRE, but m2eclipse overwrites it after a while. How to fix it? Thanks in advance -- Daniel Rindt dri...@visetics.com Visetics -- Sent from my mobile device - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven set wrong JRE version
Hi Daniel, i am using m2eclipse and have installed latest openjdk 1.6. My project are created with m2eclipse, maven download the dependencies successfully but after that, eclipse complains with: = Build path specifies execution environment J2SE-1.4. There are no JREs installed in the workspace that are strictly compatible with this environment. = I can manually switch in the project settings the JRE, but m2eclipse overwrites it after a while. How to fix it? See here: http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html Regards Thorsten PGP.sig Description: Signierter Teil der Nachricht
Re: maven set wrong JRE version
Am Mittwoch, den 18.08.2010, 12:21 +0200 schrieb Thorsten Heit: See here: http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html Thanks for cluing me. I haven't recognized this section. Brett the solution to switch it in eclipse project settings is not solving the problem. Because maven is immediately resitting it on a workspace rebuild. Thanks -- Daniel Rindt dri...@visetics.com Visetics signature.asc Description: This is a digitally signed message part
Re: maven set wrong JRE version
I think this is more of a question for the m2e user list, but the target and source param of the compiler plugin do work (I use it on both Windows and MacOS with Eclipse 3.5.x). For the latest versions of the plugin, 1.5 is even the default. Do you have the latest version of m2e? /Anders On Wed, Aug 18, 2010 at 12:45, Daniel Rindt dri...@visetics.com wrote: Am Mittwoch, den 18.08.2010, 12:21 +0200 schrieb Thorsten Heit: See here: http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html Thanks for cluing me. I haven't recognized this section. Brett the solution to switch it in eclipse project settings is not solving the problem. Because maven is immediately resitting it on a workspace rebuild. Thanks -- Daniel Rindt dri...@visetics.com Visetics
Re: Jar finalName to m2 repository
Don't fight Maven! Maven uses its convention for naming artifacts in repositories (i.e. Maven repositories). You cannot change that. /Anders On Wed, Aug 18, 2010 at 10:58, fhomasp thomas.peet...@realdolmen.comwrote: Hey, I am trying to get a jar to be uploaded in the maven repository (local as well as our online repo) under a different name than its default ${project.build.finalName}. I tried changing the finalName under the build tag as well as under the configuration of the maven-jar-plugin. These attempts did change the name of the jar in my project/target directory, however when it's being uploaded it gets its default name again. ... artifactIdcommon/artifactId packagingjar/packaging ... build finalNameedp/finalName ... plugin artifactIdmaven-jar-plugin/artifactId version2.3.1/version configuration finalNameedp/finalName /configuration /plugin ... output in consule when doing the install/deploy phase: ... Installing C:\projectsmaven\common\target\edp.jar to C:\...\.m2\repository\...\common\0.0.1\common-0.0.1.jar ... When I build wars which depend on this artifact I need the jar to be called edp-0.0.1.jar in WEB-INF/libs. Now it's still called common-0.0.1.jar I don't want to use the assembly plugin with descriptor file for this. My client doesn't know a lot about Maven and they are going to get confused. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639096.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: Jar finalName to m2 repository
I can change it if I use the assembly plugin instead of the maven-jar-plugin :-) However it would be nice to be able to actually do this using the jar plugin. I know my client is going to want this library to be called edp-version.jar. Anders Hammar wrote: Don't fight Maven! Maven uses its convention for naming artifacts in repositories (i.e. Maven repositories). You cannot change that. /Anders On Wed, Aug 18, 2010 at 10:58, fhomasp thomas.peet...@realdolmen.comwrote: Hey, I am trying to get a jar to be uploaded in the maven repository (local as well as our online repo) under a different name than its default ${project.build.finalName}. I tried changing the finalName under the build tag as well as under the configuration of the maven-jar-plugin. These attempts did change the name of the jar in my project/target directory, however when it's being uploaded it gets its default name again. ... artifactIdcommon/artifactId packagingjar/packaging ... build finalNameedp/finalName ... plugin artifactIdmaven-jar-plugin/artifactId version2.3.1/version configuration finalNameedp/finalName /configuration /plugin ... output in consule when doing the install/deploy phase: ... Installing C:\projectsmaven\common\target\edp.jar to C:\...\.m2\repository\...\common\0.0.1\common-0.0.1.jar ... When I build wars which depend on this artifact I need the jar to be called edp-0.0.1.jar in WEB-INF/libs. Now it's still called common-0.0.1.jar I don't want to use the assembly plugin with descriptor file for this. My client doesn't know a lot about Maven and they are going to get confused. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639096.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 -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639278.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: Jar finalName to m2 repository
Sure, change the artifactId to edp. It's that simple! /Anders On Wed, Aug 18, 2010 at 14:28, fhomasp thomas.peet...@realdolmen.comwrote: I can change it if I use the assembly plugin instead of the maven-jar-plugin :-) However it would be nice to be able to actually do this using the jar plugin. I know my client is going to want this library to be called edp-version.jar. Anders Hammar wrote: Don't fight Maven! Maven uses its convention for naming artifacts in repositories (i.e. Maven repositories). You cannot change that. /Anders On Wed, Aug 18, 2010 at 10:58, fhomasp thomas.peet...@realdolmen.comwrote: Hey, I am trying to get a jar to be uploaded in the maven repository (local as well as our online repo) under a different name than its default ${project.build.finalName}. I tried changing the finalName under the build tag as well as under the configuration of the maven-jar-plugin. These attempts did change the name of the jar in my project/target directory, however when it's being uploaded it gets its default name again. ... artifactIdcommon/artifactId packagingjar/packaging ... build finalNameedp/finalName ... plugin artifactIdmaven-jar-plugin/artifactId version2.3.1/version configuration finalNameedp/finalName /configuration /plugin ... output in consule when doing the install/deploy phase: ... Installing C:\projectsmaven\common\target\edp.jar to C:\...\.m2\repository\...\common\0.0.1\common-0.0.1.jar ... When I build wars which depend on this artifact I need the jar to be called edp-0.0.1.jar in WEB-INF/libs. Now it's still called common-0.0.1.jar I don't want to use the assembly plugin with descriptor file for this. My client doesn't know a lot about Maven and they are going to get confused. Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639096.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 -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639278.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: Jar finalName to m2 repository
On Wednesday 18 August 2010 fhomasp wrote: I can change it if I use the assembly plugin instead of the maven-jar-plugin You can change the name of the JAR in the local or remote repository with the assembly plugin? I doubt this! You can change the name of the JAR in your targt folder, but that's something completely different and you did this already with the finalName option. Changing the internal data storage of maven (the repository) is a bad idea and therefore not easy to achieve! hth, - martin signature.asc Description: This is a digitally signed message part.
Re: maven 3 and the enforcer plugin
Le 16 août 2010 19:21:14 UTC+2, EJ Ciramella ecirame...@casenetinc.com a écrit : Hello list - I've noticed during upgrade testing that maven 3 and the enforcer plugin (1.0-beta-1) is starting to fail a jdk enforcement test. I've set it up to accept 1.5.0_18 and beyond (nothing earlier) but now it's failing even though I'm running that exact jdk. Did you try running mvn -X or -e ? This will print stack trace and provide you with more informations. Please post this output here. Cheers -- Baptiste Batmat MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
Re: Jar finalName to m2 repository
Well that's out of the question. But ok, at least I'll be able to tell them why it is the way it is ^^ Thanks -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639309.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
Hudson Maven
Looking for advice on configuring Maven/Hudson build and deploying artifacts. This might be better suited for the Hudson list, but I hoped folks here might be able to help. I'm setting up a Maven build in Hudson. I can use the Maven deploy goal to deploy the artifacts; but Hudson has a Post-build task to deploy artifacts. Are there pros/cons to doing either? Or is it a non-issue? Is anyone else doing this and do either of the approaches cause problems? Any advice would be much appreciated. -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Jar finalName to m2 repository
No, I build the jar using an xml script and call it whatever I want. What and how I insert it into the repository is another thing :-) Martin Höller wrote: On Wednesday 18 August 2010 fhomasp wrote: I can change it if I use the assembly plugin instead of the maven-jar-plugin You can change the name of the JAR in the local or remote repository with the assembly plugin? I doubt this! You can change the name of the JAR in your targt folder, but that's something completely different and you did this already with the finalName option. Changing the internal data storage of maven (the repository) is a bad idea and therefore not easy to achieve! hth, - martin -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639323.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: Hudson Maven
Greetings, On Wed, Aug 18, 2010 at 9:02 AM, Greg Akins angryg...@gmail.com wrote: I'm setting up a Maven build in Hudson. I can use the Maven deploy goal to deploy the artifacts; but Hudson has a Post-build task to deploy artifacts. That plugin describes why it exists, and I believe it to be still valid. Are there pros/cons to doing either? Or is it a non-issue? Is anyone else doing this and do either of the approaches cause problems? I use simple deploy goal but with some additional setup in Hudson which turns the issue the plugin solves into a non-issue. All of my multi-module Maven projects are split up using a 1 Hudson job per Maven module strategy. This lets me achieve high job throughput, high rates of parallelism using Hudson's own executors, or taking advantage of slave nodes. It also is advantageous when you have lots of little in-house libraries which are used scattershot throughout your modules, in conjunction with -SNAPSHOT dependencies, additionally in conjuction with Hudson's build when upstream projects are successful. Since only what should recompile will, and you'll likely flush out issues quicker and closer to where they affect downstream. Lots of little jobs all building quickly gets you status fast. And it scales quite well.. especially when you combine this with a MRM like Nexus. Good luck, -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Jar finalName to m2 repository
Hi again! On Wednesday 18 August 2010 fhomasp wrote: However it would be nice to be able to actually do this using the jar plugin. I know my client is going to want this library to be called edp-version.jar. Eventually you could find some solution with the maven-dependency-plugins' goal dependency:copy-dependencies in combination with the antrun-plugin. However, it seems you are doing something strange here, which is likely to cause more problems later on. - martin signature.asc Description: This is a digitally signed message part.
Re: Hudson Maven
On Wed, Aug 18, 2010 at 9:20 AM, Jesse Farinacci jie...@gmail.com wrote: That plugin describes why it exists, and I believe it to be still valid. Sorry.. I didn't even bother reading the Hudson info beside that plugin. I'm trying to follow your advice, re: many smaller modules, but this would help me in the short term on a couple projects. Thanks for taking the time to explain. -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Jar finalName to m2 repository
Actually I didn't say i was going to do any of that. It would be a solution, but not nearly good enough. Nah, I'll see if they can live with a different artifactId or with the current name of the jar in the repo and in the lib folder of the wars. Martin Höller wrote: Hi again! On Wednesday 18 August 2010 fhomasp wrote: However it would be nice to be able to actually do this using the jar plugin. I know my client is going to want this library to be called edp-version.jar. Eventually you could find some solution with the maven-dependency-plugins' goal dependency:copy-dependencies in combination with the antrun-plugin. However, it seems you are doing something strange here, which is likely to cause more problems later on. - martin -- View this message in context: http://maven.40175.n5.nabble.com/Jar-finalName-to-m2-repository-tp2639096p2639374.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: maven 3 and the enforcer plugin
Mvn version output: Apache Maven 3.0-beta-2 (r983206; 2010-08-07 07:00:51-0400) Java version: 1.5.0_18 Java home: C:\Program Files (x86)\Java\jdk1.5.0_18\jre Default locale: en_US, platform encoding: Cp1252 OS name: windows xp version: 5.2 arch: x86 Family: windows 'cmd' is not recognized as an internal or external command, operable program or batch file. Plugin Config: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-enforcer-plugin/artifactId version1.0-beta-1/version executions execution idenforce-versions/id goals goalenforce/goal /goals configuration rules requireJavaVersion version[1.5.0_18,)/version message[ERROR] The currently supported version of java is 1.5.0_18 or higher/message /requireJavaVersion /rules /configuration /execution /executions /plugin Stacktraces: [DEBUG] === [INFO] [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) @ foo --- [DEBUG] Created new class realm pluginorg.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1 [DEBUG] Created new class realm maven.api [DEBUG] Populating class realm pluginorg.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1 [DEBUG] Included: org.apache.maven.plugins:maven-enforcer-plugin:maven-plugin:1.0-beta-1 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.8 [DEBUG] Included: org.apache.maven.reporting:maven-reporting-api:jar:2.0.9 [DEBUG] Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-10 [DEBUG] Included: commons-cli:commons-cli:jar:1.0 [DEBUG] Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 [DEBUG] Included: commons-lang:commons-lang:jar:2.3 [DEBUG] Included: org.apache.maven.enforcer:enforcer-api:jar:1.0-beta-1 [DEBUG] Included: org.apache.maven.enforcer:enforcer-rules:jar:1.0-beta-1 [DEBUG] Included: org.beanshell:bsh:jar:2.0b4 [DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.9 [DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 [DEBUG] Excluded: classworlds:classworlds:jar:1.1 [DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-core:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-monitor:jar:2.0.9 [DEBUG] Configuring mojo org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce from plugin realm ClassRealm[pluginorg .apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1, parent: ClassRealm[maven.api, parent: null]] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce' with basic configurator -- [DEBUG] (s) fail = true [DEBUG] (s) failFast = false [DEBUG] (f) ignoreCache = false [DEBUG] (s) project = MavenProject: foo @ foo [DEBUG] (s) version = [1.5.0_18,) [DEBUG] (f) message = [ERROR] The currently supported version of java is 1.5.0_18 or higher [DEBUG] (s) rules = [org.apache.maven.plugins.enforcer.requirejavavers...@d72200] [DEBUG] (s) session = org.apache.maven.execution.mavensess...@1a80aea [DEBUG] (s) skip = false [DEBUG] -- end configuration -- [DEBUG] Executing rule: org.apache.maven.plugins.enforcer.RequireJavaVersion [DEBUG] Rule org.apache.maven.plugins.enforcer.RequireJavaVersion is cacheable. [DEBUG] Detected Java String: 1.5.0_18 [DEBUG] Normalized Java String: 1.5.0-18 [DEBUG] Parsed Version: Major: 1 Minor: 5 Incremental: 0 Build: 18 Qualifier: null [DEBUG] Adding failure due to exception org.apache.maven.enforcer.rule.api.EnforcerRuleException: [ERROR] The currently supported version of java is 1.5.0_18 or higher at org.apache.maven.plugins.enforcer.AbstractVersionEnforcer.enforceVersion(AbstractVersionEnforcer.java:101) at org.apache.maven.plugins.enforcer.RequireJavaVersion.execute(RequireJavaVersion.java:65) at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:185) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144) at
[ANN] Maven WAR Plugin 2.1 Released
The Maven team is pleased to announce the release of the Maven WAR Plugin, version 2.1 The WAR Plugin is responsible for collecting all artifact dependencies, classes and resources of the web application and packaging them into a web application archive. http://maven.apache.org/plugins/maven-war-plugin/ You should specify the version in your project's plugin configuration: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.1/version /plugin Release Notes - Maven 2.x WAR Plugin - Version 2.1 ** Bug * [MWAR-158] - Overlaying breaks configuration of webXml with a fatal error * [MWAR-184] - FATAL ERROR - XPP3 pull parser library not present. Specify another driver. * [MWAR-197] - war:manifest does not add manifestEntries to generated manifest * [MWAR-221] - Concurrency issue with XStream when running with parallel m3 ** Improvement * [MWAR-212] - Allow optional @classifier@ in outputFileNameMapping * [MWAR-226] - Make war plugin @threadSafe ** Task * [MWAR-231] - Disable webapp cache by default Enjoy, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Property surprises in published POMS
-Original Message- From: Benson Margulies [mailto:bimargul...@gmail.com] Apache CXF has several poms that follow this pattern: properties jetty.version6.1.24/jetty.version /properties ... dependencies dependency groupIdg/groupId artifactIda/artifactId version${jetty.version}/version /dependency /dependencies I was very surprised to learn, recently, that the release publication process leaves the property reference in the POM. Then, if some project of mine lists one of these projects as a dependency, and then sets jetty.version to something else, CXFs dependencies follow along. Oops. I somehow expected that the release process would resolve these props and replace them with fixed values. Maven doesn't have the concept of a difference between the pom used to build the artifact, and the pom used to deploy it. Many people (myself included) have run into this problem, and there doesn't seem to be good solution. For limited things like the version of your artifact (not dependencies, as in your example above) you can use the maven-release-plugin to rewrite your pom(s) every time some version change, but I don't think that'll replace arbitrary property references. IMO, maven should probably create a resolved pom as part of the build process and deploy that along with the artifact, but I don't have time to figure out how to make it do that. eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Property surprises in published POMS
IMO, maven should probably create a resolved pom as part of the build process and deploy that along with the artifact, but I don't have time to figure out how to make it do that. This was done (briefly) in a few Maven versions and it caused a lot of problems, so it was pulled out/disabled. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven 3 and the enforcer plugin
I don't know this plugin/rule well, but looking at your output, could it relate to the underscore versus hyphen in the detected versus normalized JDK version string? Maybe try a hyphen in your version rule. Brett On 8/19/10, EJ Ciramella ecirame...@casenetinc.com wrote: Mvn version output: Apache Maven 3.0-beta-2 (r983206; 2010-08-07 07:00:51-0400) Java version: 1.5.0_18 Java home: C:\Program Files (x86)\Java\jdk1.5.0_18\jre Default locale: en_US, platform encoding: Cp1252 OS name: windows xp version: 5.2 arch: x86 Family: windows 'cmd' is not recognized as an internal or external command, operable program or batch file. Plugin Config: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-enforcer-plugin/artifactId version1.0-beta-1/version executions execution idenforce-versions/id goals goalenforce/goal /goals configuration rules requireJavaVersion version[1.5.0_18,)/version message[ERROR] The currently supported version of java is 1.5.0_18 or higher/message /requireJavaVersion /rules /configuration /execution /executions /plugin Stacktraces: [DEBUG] === [INFO] [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) @ foo --- [DEBUG] Created new class realm pluginorg.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1 [DEBUG] Created new class realm maven.api [DEBUG] Populating class realm pluginorg.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1 [DEBUG] Included: org.apache.maven.plugins:maven-enforcer-plugin:maven-plugin:1.0-beta-1 [DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.8 [DEBUG] Included: org.apache.maven.reporting:maven-reporting-api:jar:2.0.9 [DEBUG] Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-10 [DEBUG] Included: commons-cli:commons-cli:jar:1.0 [DEBUG] Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 [DEBUG] Included: commons-lang:commons-lang:jar:2.3 [DEBUG] Included: org.apache.maven.enforcer:enforcer-api:jar:1.0-beta-1 [DEBUG] Included: org.apache.maven.enforcer:enforcer-rules:jar:1.0-beta-1 [DEBUG] Included: org.beanshell:bsh:jar:2.0b4 [DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.9 [DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 [DEBUG] Excluded: classworlds:classworlds:jar:1.1 [DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-core:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9 [DEBUG] Excluded: org.apache.maven:maven-monitor:jar:2.0.9 [DEBUG] Configuring mojo org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce from plugin realm ClassRealm[pluginorg .apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1, parent: ClassRealm[maven.api, parent: null]] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce' with basic configurator -- [DEBUG] (s) fail = true [DEBUG] (s) failFast = false [DEBUG] (f) ignoreCache = false [DEBUG] (s) project = MavenProject: foo @ foo [DEBUG] (s) version = [1.5.0_18,) [DEBUG] (f) message = [ERROR] The currently supported version of java is 1.5.0_18 or higher [DEBUG] (s) rules = [org.apache.maven.plugins.enforcer.requirejavavers...@d72200] [DEBUG] (s) session = org.apache.maven.execution.mavensess...@1a80aea [DEBUG] (s) skip = false [DEBUG] -- end configuration -- [DEBUG] Executing rule: org.apache.maven.plugins.enforcer.RequireJavaVersion [DEBUG] Rule org.apache.maven.plugins.enforcer.RequireJavaVersion is cacheable. [DEBUG] Detected Java String: 1.5.0_18 [DEBUG] Normalized Java String: 1.5.0-18 [DEBUG] Parsed Version: Major: 1 Minor: 5 Incremental: 0 Build: 18 Qualifier: null [DEBUG] Adding failure due to exception org.apache.maven.enforcer.rule.api.EnforcerRuleException: [ERROR] The currently supported version of java is 1.5.0_18 or higher at org.apache.maven.plugins.enforcer.AbstractVersionEnforcer.enforceVersion(AbstractVersionEnforcer.java:101) at
Re: maven 3 and the enforcer plugin
Greetings, On Wed, Aug 18, 2010 at 7:46 PM, Brett Randall javabr...@gmail.com wrote: I don't know this plugin/rule well, but looking at your output, could it relate to the underscore versus hyphen in the detected versus normalized JDK version string? Maybe try a hyphen in your version rule. Try adding an execution of enforcer:display-info to see the normalized version of the JDK which you should feed to the enforcement rule. Here's an example from my system: [INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info (display-info) @ isvt --- [INFO] Maven Version: 3.0-beta-2 [INFO] JDK Version: 1.6.0_21 normalized as: 1.6.0-21 [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 2.6.32.18 -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Build Flex in a Headless Environment
Hi! I'm very new to Maven and trying to build a flex client in a headless environment. As long as I export my display, I get no issues. However, I need to be able to do this headless so that it can be done in an automated fasion. I'm running: [r...@newark rossPrototype-client]# mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600) Java version: 1.6.0_20 Java home: /usr/java/jdk1.6.0_20/jre Default locale: en_US, platform encoding: UTF-8 OS name: linux version: 2.6.9-89.el arch: i386 Family: unix With Flex 3 and flashplayer 10. I've tried setting MAVEN_OPTS: -Djava.awt.headless=true I've tried adding to my pom file: testRunner launcher allowHeadlessModetrue/allowHeadlessMode /launcher /testRunner Neither of these things changed anything. Here is the error I'm getting without my display exported based on the command MAVEN_OPTS=-Djava.awt.headless=true mvn install -X: [WARNING] [LAUNCHER] Using xvfb-run to launch headless tests [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to launch Flash Player. Probably java was not able to find flashplayer. Make sure flashplayer is available on PATH or use -DflashPlayer.command=${flashplayer executable} Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests Embedded error: Failed to launch Flash Player in headless environment. java.io.IOException: error=2, No such file or directory [INFO] [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Failed to launch Flash Player. Probably java was not able to find flashplayer. Make sure flashplayer is available on PATH or use -DflashPlayer.command=${flashplayer executable} Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to launch Flash Player. Probably java was not able to find flashplayer. Make sure flashplayer is available on PATH or use -DflashPlayer.command=${flashplayer executable} Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests at org.sonatype.flexmojos.test.FlexUnitMojo.run(FlexUnitMojo.java:274) at org.sonatype.flexmojos.test.FlexUnitMojo.execute(FlexUnitMojo.java:156) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.sonatype.flexmojos.test.launcher.LaunchFlashPlayerException: Failed to launch Flash Player in headless environment. at org.sonatype.flexmojos.test.launcher.AsVmLauncher.runFlashplayerHeadless(AsVmLauncher.java:149) at org.sonatype.flexmojos.test.launcher.AsVmLauncher.start(AsVmLauncher.java:77) at org.sonatype.flexmojos.test.DefaultTestRunner.run(DefaultTestRunner.java:53) at
Re: release:prepare issue with Mercurial SCM
Hi Andrew, Do you mind if I ask you a question? How do you provide the scm+hg maven plugin with your push credentials (username+password)? I'm assuming this is something in the settings.xml? I am trying to get this sourceforge project released http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/54921eaf7464/pom.xml http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openlayers/file/54921eaf7464/pom.xmlThanks in advance, Andrew On Tue, Jul 27, 2010 at 2:24 AM, Andrew Westberg and...@simplifiedlogic.com wrote: I'm trying to deploy my first release build of a project to my nexus server. My scm configuration looks like this: scm connectionscm:hg:ssh://fortis//data/mercurial/projects/JarEncryptor/connection developerConnectionscm:hg:ssh://fortis//data/mercurial/projects/JarEncryptor/developerConnection /scm I need the extra / after fortis since the repository is on the /data partition of the remote filesystem. The problem is that when I use the maven release:prepare plugin, it ALWAYS strips out the extra slash when doing the push command and then I get the following error message: [INFO] Checking in modified POMs... [INFO] EXECUTING: cmd.exe /X /C hg commit --message [maven-release-plugin] prepare release jar-enc ryptor-aggregator-1.0 C:\Development\workspace\MyProject\pom.xml C:\Development\workspace\MyPro ject\nitrolm-encryptx\pom.xml C:\Development\workspace\JarEncryptor\nitrolm-encryptx-maven-plugin\ pom.xml C:\Development\workspace\JarEncryptor\nitrolm-encryptx-ant\pom.xml [INFO] EXECUTING: cmd.exe /X /C hg push ssh://fortis/data/mercurial/projects/JarEncryptor [ERROR] EXECUTION FAILED Execution of cmd : push failed with exit code: -1. Working directory was: C:\Development\workspace\JarEncryptor Your Hg installation seems to be valid and complete. Hg version: 1.5.2 (OK) Any ideas on how to get around this? I already tried putting four slashes in my scm configuration, but it stripped out all but one. -- Andrew Westberg
maven-antrun-plugin
Hi,All Use maven-antrun-plugin,But -${timestamp} display: * [echo] signon-1.0-1282184699068 source code:.* *Everybody,Help me?* code: profile idbuild_server/id build plugins plugin artifactIdmaven-antrun-plugin/artifactId version1.4/version executions execution idcompile/id phasevalidate/phase goals goalrun/goal /goals /execution /executions configuration tasks property name=sourceDir value=./ property name=outputDir value=./ tstamp format property=timestamp pattern=yyMMdd-HHmm/ format property=today pattern=yyMMdd/ /tstamp echo${artifactId}-${version}-${timestamp} source code:${sourceDir}/echo !--delete dir=${basedir}/tmp/-- /tasks /configuration /plugin /plugins /build /profile /profile Best Regards, --Cody.Zhang
Re: Build Flex in a Headless Environment
Ok, I figured it out. Here are the steps I had to take to get this going in RedHat: 1. Install FlashPlayer10 2. Add FlashPLayer to your path 3. Install Xvfb by entering: up2date -i xorg-x11-Xvfb 4. Get xvfb-run.sh from: http://www.flexthinker.com/2009/09/building-a-flex-project-with-maven-using-hudson-on-centos/xvfb-run-sh/ and copy it to /usr/local/bin (remove the .sh extension) 5. chmod 755 /usr/local/bin/xvfb 6. Edit /etc/ld.so.conf.d/flashplayer10-i386.conf to add: /usr/evolution28/lib 7. Run ldconfig 8. Add the following to your profile: MAVEN_OPTS=-Djava.awt.headless=true 9. cd to the directory containing your pom file 10. mvn install I hope this saves someone the pain I've gone through in the past few days. Thanks, Eric From: Eric Fetzer elstonk...@yahoo.com To: users@maven.apache.org Sent: Wed, August 18, 2010 7:39:16 PM Subject: Build Flex in a Headless Environment Hi! I'm very new to Maven and trying to build a flex client in a headless environment. As long as I export my display, I get no issues. However, I need to be able to do this headless so that it can be done in an automated fasion. I'm running: [r...@newark rossPrototype-client]# mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600) Java version: 1.6.0_20 Java home: /usr/java/jdk1.6.0_20/jre Default locale: en_US, platform encoding: UTF-8 OS name: linux version: 2.6.9-89.el arch: i386 Family: unix With Flex 3 and flashplayer 10. I've tried setting MAVEN_OPTS: -Djava.awt.headless=true I've tried adding to my pom file: testRunner launcher allowHeadlessModetrue/allowHeadlessMode /launcher /testRunner Neither of these things changed anything. Here is the error I'm getting without my display exported based on the command MAVEN_OPTS=-Djava.awt.headless=true mvn install -X: [WARNING] [LAUNCHER] Using xvfb-run to launch headless tests [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to launch Flash Player. Probably java was not able to find flashplayer. Make sure flashplayer is available on PATH or use -DflashPlayer.command=${flashplayer executable} Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests Embedded error: Failed to launch Flash Player in headless environment. java.io.IOException: error=2, No such file or directory [INFO] [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Failed to launch Flash Player. Probably java was not able to find flashplayer. Make sure flashplayer is available on PATH or use -DflashPlayer.command=${flashplayer executable} Read more at: https://docs.sonatype.org/display/FLEXMOJOS/Running+unit+tests at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to launch Flash Player. Probably java was not able to find flashplayer.
Re: Plugin download not working
You might also want to check that you have the pluginRepository tag defined as well in your settings.xml or Pom.xml. But I think Wayne is correct as well you should try to specify the version number for the plugin regards, Javed On Mon, Aug 16, 2010 at 7:55 PM, Wayne Fay wayne...@gmail.com wrote: build urgently it sounds like we'd essentially be screwed. How does one configure Maven to build anyway regardless of whether some plugin happens to have a more recent update that isn't available from somewhere yet? Specify your plugin version numbers in the pom file. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Running a specific plugin goal from the command line in a sub-module of a multi-module reactor project
Hi Brian, assuming you have the following dependency structure: Root | |Module A |Module B Say Root contains your Parent Pom and module A and B are child sub modules for the Parent and that you've defined Root as a parent pom for both Module A and Module B. If you are going to run a command on say Module B , then maven will look for the Root module's meta data from your local repository , if you haven't previously built the Root module then it will try to download Root Pom from the repositories configured in Module B's pom or from your repositories configured within your settings.xml. So in theory you can perfectly be able to run your commands on your sub modules provided that all the dependencies for the submodule is available in you local repository or on your remote repositories. However the cleanest build is always the one your do from the parent POM that is Root . kind regards, Javed On Wed, Aug 11, 2010 at 7:11 PM, Brian Ferris bdfer...@gmail.com wrote: I'm looking for a general technique here, but let's give a specific example. I have a multi-module project and I'd like to run the exec:java plugin from the command-line against one of the sub-modules of my project. I know one approach is that I can run mvn install on the whole project and then just go into the sub-module directory, run the exec:java command from the command line, and have artifacts resolved to my local repository. But running mvn install all the time gets pretty tedious. What I'd really like is the ability to run exec:java against the Maven reactor, where the classpath is constructed from the active modules of the project in the Maven reactor. The problem is that I'm not sure this is possible. A naive approach is to run the exec:java goal from the root of the project, but this tries to run the plugin against every module in the project, as opposed to the target module I'm interested in. Any idea? I know my motivating example was exec:java, but really there are a number of single plugin goals that I'd like to run against my project from time to time outside of the scope of the full build lifecycle. Thanks, Brian
Re: maven-antrun-plugin
Every Body, root cause: I define date formart on parent pom。 code: plugin groupIdorg.codehaus.mojo/groupId artifactIdbuildnumber-maven-plugin/artifactId version1.0-beta-3/version configuration format{0,date,MMdd-HHmm} /format items itemtimestamp/item doUpdatetrue/doUpdate /items /configuration executions execution phasevalidate/phase goals goalcreate/goal /goals /execution /executions /plugin Best Regards, --Cody.Zhang 在 2010年8月19日 上午10:26,Cody Zhang codyzhang.w...@gmail.com写道: Hi,All Use maven-antrun-plugin,But -${timestamp} display: * [echo] signon-1.0-1282184699068 source code:.* *Everybody,Help me?* code: profile idbuild_server/id build plugins plugin artifactIdmaven-antrun-plugin/artifactId version1.4/version executions execution idcompile/id phasevalidate/phase goals goalrun/goal /goals /execution /executions configuration tasks property name=sourceDir value=./ property name=outputDir value=./ tstamp format property=timestamp pattern=yyMMdd-HHmm/ format property=today pattern=yyMMdd/ /tstamp echo${artifactId}-${version}-${timestamp} source code:${sourceDir}/echo !--delete dir=${basedir}/tmp/-- /tasks /configuration /plugin /plugins /build /profile /profile Best Regards, --Cody.Zhang