Re: Maven eclipse:multiproject question
You will have to dig into ancient issues if you really insist on using 1.1, this one's 5 years old: http://jira.codehaus.org/browse/MPECLIPSE-71 -Lukas laredotornado wrote: Hi, I'm using Maven 1.1. In my root project folder, I have several sub-projects, including service, model, and test folders. If I am in the root project level directory and run maven eclipse:multiproject .classpath and .project files are created in each sub-directory, which is good. However if I open Eclipse, open the root level project folder, then choose a source folder from one of the sub-projects, right click that folder, select Build Path and Use as Source Folder, everything breaks. That is, a .classpath file gets created at the root project level directory and Eclipse seems to ignore the sub-project .classpath level fiels that get created. I know this because Eclipse starts giving me compile errors for my import statements, complaining that it cannot resolve certain package names. Any idea how to get Eclipse to read both .classpath files -- the one in the root and the one in the sub-project? Or, is there a command I can run to build all classpath entries into the root project level .classpath file instead of one in each of the sub-project folders? Thanks, - Dave - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Doubt about packaging using profiles
If I create only one build, how can I select the prod or test file? (only inside the build I can do the include/exclude file option). Then, I need two builds, one for selecting prod file and one for test (one for profile) Could you add an example of how to do what you say? /Paco -Mensaje original- De: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] En nombre de Anders Hammar Enviado el: viernes, 13 de noviembre de 2009 8:31 Para: Maven Users List Asunto: Re: Doubt about packaging using profiles First, having different builds for different environments are generally a bad idea. That's, IMHO, a general Java rule so I won't go into that any further but I wanted to mention that. The, I think you should solve your issue by configuring the resources plugin in to only include the right log4j files. I would set up my pom so that the prod file is being used. And then create a profile for development use where the dev log4j file is being used instead. Regarding deleting the already existing files in the output folder, one could argue that that should be taken care of by executing mvn clean. Here's how you configure the resources plugin to include/exclude: http://maven.apache.org/plugins/maven-resources-plugin/examples/include-excl ude.html What's going on in your current case is that the resources plugin will copy all log4j files. The resources plugin is bound to the lifecycle by default (for a jar project for instance). That's why you see all log4j (actually all files in the resources folder) end up in the output directory. /Anders On Fri, Nov 13, 2009 at 08:04, Exposito Aguilera, Francisco francisco.expos...@es.issworld.com wrote: My pom.xml file has two profiles which must delete and copy files in a place. If I want the war for production, I need the log4j_prod.xml and if I want the war for test I need the log4j.xml file. I show the test profile: profiles profile idtest/id build resources /resources filters /filters plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasetest/phase goals goalrun/goal /goals configuration tasks delete file=${project.build.outputDirectory}/log4j.xml / delete file=${project.build.outputDirectory}/log4j_prod.xml / copy file=src/main/resources/log4j.xml tofile=${project.build.outputDirectory}/log4j.xml / /tasks /configuration /execution /executions /plugin plugin artifactIdmaven-surefire-plugin/artifactId configuration skiptrue/skip /configuration /plugin plugin artifactIdmaven-war-plugin/artifactId executions execution phasepackage/phase goals goalwar/goal /goals configuration classifiertest/classifier /configuration /execution /executions /plugin /plugins /build /profile /profiles Then I go to Run as -- Run configurations and I create a new Maven build with these options: Base directory: I select the project root Goals: package Profiles: test And when I execute, in target classes the file tasks are done, but inside the war file both log4j xml files are copied. Any help, please? - 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: Doubt about packaging using profiles
Environment specific files should be read from the class path. Then keep them out of your bundle (ear for instance) and add them to the environment (app server for instance) in such a way that they end up on the classpath. /Anders On Fri, Nov 13, 2009 at 09:40, Exposito Aguilera, Francisco francisco.expos...@es.issworld.com wrote: If I create only one build, how can I select the prod or test file? (only inside the build I can do the include/exclude file option). Then, I need two builds, one for selecting prod file and one for test (one for profile) Could you add an example of how to do what you say? /Paco -Mensaje original- De: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] En nombre de Anders Hammar Enviado el: viernes, 13 de noviembre de 2009 8:31 Para: Maven Users List Asunto: Re: Doubt about packaging using profiles First, having different builds for different environments are generally a bad idea. That's, IMHO, a general Java rule so I won't go into that any further but I wanted to mention that. The, I think you should solve your issue by configuring the resources plugin in to only include the right log4j files. I would set up my pom so that the prod file is being used. And then create a profile for development use where the dev log4j file is being used instead. Regarding deleting the already existing files in the output folder, one could argue that that should be taken care of by executing mvn clean. Here's how you configure the resources plugin to include/exclude: http://maven.apache.org/plugins/maven-resources-plugin/examples/include-excl ude.htmlhttp://maven.apache.org/plugins/maven-resources-plugin/examples/include-excl%0Aude.html What's going on in your current case is that the resources plugin will copy all log4j files. The resources plugin is bound to the lifecycle by default (for a jar project for instance). That's why you see all log4j (actually all files in the resources folder) end up in the output directory. /Anders On Fri, Nov 13, 2009 at 08:04, Exposito Aguilera, Francisco francisco.expos...@es.issworld.com wrote: My pom.xml file has two profiles which must delete and copy files in a place. If I want the war for production, I need the log4j_prod.xml and if I want the war for test I need the log4j.xml file. I show the test profile: profiles profile idtest/id build resources /resources filters /filters plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasetest/phase goals goalrun/goal /goals configuration tasks delete file=${project.build.outputDirectory}/log4j.xml / delete file=${project.build.outputDirectory}/log4j_prod.xml / copy file=src/main/resources/log4j.xml tofile=${project.build.outputDirectory}/log4j.xml / /tasks /configuration /execution /executions /plugin plugin artifactIdmaven-surefire-plugin/artifactId configuration skiptrue/skip /configuration /plugin plugin artifactIdmaven-war-plugin/artifactId executions execution phasepackage/phase goals goalwar/goal /goals configuration classifiertest/classifier /configuration /execution /executions /plugin /plugins /build /profile /profiles Then I go to Run as -- Run configurations and I create a new Maven build with these options: Base directory: I select the project root Goals: package Profiles: test And when I execute, in target classes the file tasks are done, but inside the war file both log4j xml files are copied. Any help, please? - 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: Doubt about packaging using profiles
Hi This is easly solved using filters and profiles. Define your environment specific variables in your filter and subsitute that into your log4j file. I do this all the time, because the disk drive and path to the log4j files are different from test to productio. Hermod -Original Message- From: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] On Behalf Of Anders Hammar Sent: Friday, November 13, 2009 10:04 AM To: Maven Users List Subject: Re: Doubt about packaging using profiles Environment specific files should be read from the class path. Then keep them out of your bundle (ear for instance) and add them to the environment (app server for instance) in such a way that they end up on the classpath. /Anders On Fri, Nov 13, 2009 at 09:40, Exposito Aguilera, Francisco francisco.expos...@es.issworld.com wrote: If I create only one build, how can I select the prod or test file? (only inside the build I can do the include/exclude file option). Then, I need two builds, one for selecting prod file and one for test (one for profile) Could you add an example of how to do what you say? /Paco -Mensaje original- De: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] En nombre de Anders Hammar Enviado el: viernes, 13 de noviembre de 2009 8:31 Para: Maven Users List Asunto: Re: Doubt about packaging using profiles First, having different builds for different environments are generally a bad idea. That's, IMHO, a general Java rule so I won't go into that any further but I wanted to mention that. The, I think you should solve your issue by configuring the resources plugin in to only include the right log4j files. I would set up my pom so that the prod file is being used. And then create a profile for development use where the dev log4j file is being used instead. Regarding deleting the already existing files in the output folder, one could argue that that should be taken care of by executing mvn clean. Here's how you configure the resources plugin to include/exclude: http://maven.apache.org/plugins/maven-resources-plugin/examples/includ e-excl ude.htmlhttp://maven.apache.org/plugins/maven-resources-plugin/exampl es/include-excl%0Aude.html What's going on in your current case is that the resources plugin will copy all log4j files. The resources plugin is bound to the lifecycle by default (for a jar project for instance). That's why you see all log4j (actually all files in the resources folder) end up in the output directory. /Anders On Fri, Nov 13, 2009 at 08:04, Exposito Aguilera, Francisco francisco.expos...@es.issworld.com wrote: My pom.xml file has two profiles which must delete and copy files in a place. If I want the war for production, I need the log4j_prod.xml and if I want the war for test I need the log4j.xml file. I show the test profile: profiles profile idtest/id build resources /resources filters /filters plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasetest/phase goals goalrun/goal /goals configuration tasks delete file=${project.build.outputDirectory}/log4j.xml / delete file=${project.build.outputDirectory}/log4j_prod.xml / copy file=src/main/resources/log4j.xml tofile=${project.build.outputDirectory}/log4j.xml / /tasks /configuration /execution /executions /plugin plugin artifactIdmaven-surefire-plugin/artifactId configuration skiptrue/skip /configuration /plugin plugin artifactIdmaven-war-plugin/artifactId executions execution phasepackage/phase goals goalwar/goal /goals configuration classifiertest/classifier /configuration /execution /executions /plugin /plugins /build /profile /profiles Then I go to Run as -- Run configurations and I create a new Maven build with these options: Base directory: I select the project root Goals: package Profiles: test And when I execute, in target classes the file tasks are done, but inside the war file both log4j xml files are copied. Any help, please? - 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus
[Maven Assembly Plugin] Deploy assembly
Hello, we have the following pom: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdgisdistribution/groupId artifactIdgisdistribution/artifactId namegisdistribution/name version0.0.2/version descriptiondistribution archive of the mirgis/description packagingpom/packaging parent groupIdmirgis/groupId artifactIdmirgis/artifactId version1.11/version /parent build plugins plugin artifactIdmaven-assembly-plugin/artifactId configuration descriptors descriptorsrc/main/assembly/distribution.xml/descriptor /descriptors /configuration executions execution idmake-assembly/id phasepackage/phase goals goalassembly/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdgiskernel/groupId artifactIdgiskernel/artifactId version0.0.4/version /dependency /dependencies scm /scm /project And the following distribution.xml: ?xml version='1.0' encoding='UTF-8'? assembly idassembly/id formats formatzip/format /formats dependencySets dependencySet outputDirectorylib/outputDirectory useProjectArtifacttrue/useProjectArtifact /dependencySet /dependencySets /assembly Maven now creates the gisdistribution-0.0.2-assembly.zip but it doesn't deploy it. We tried to use packaging jar but only empty jars are deployed. In which way can we deploy the assembly? Yours Rüdiger -- View this message in context: http://old.nabble.com/-Maven-Assembly-Plugin--Deploy-assembly-tp26333720p26333720.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 Assembly Plugin] Deploy assembly
A quick Internet search gives the answer: http://old.nabble.com/Maven-assembly-plug-in-and-deploy-not-happening--td18161292.html /Anders On Fri, Nov 13, 2009 at 10:35, rgubler2 rgub...@init-ka.de wrote: Hello, we have the following pom: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdgisdistribution/groupId artifactIdgisdistribution/artifactId namegisdistribution/name version0.0.2/version descriptiondistribution archive of the mirgis/description packagingpom/packaging parent groupIdmirgis/groupId artifactIdmirgis/artifactId version1.11/version /parent build plugins plugin artifactIdmaven-assembly-plugin/artifactId configuration descriptors descriptorsrc/main/assembly/distribution.xml/descriptor /descriptors /configuration executions execution idmake-assembly/id phasepackage/phase goals goalassembly/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdgiskernel/groupId artifactIdgiskernel/artifactId version0.0.4/version /dependency /dependencies scm /scm /project And the following distribution.xml: ?xml version='1.0' encoding='UTF-8'? assembly idassembly/id formats formatzip/format /formats dependencySets dependencySet outputDirectorylib/outputDirectory useProjectArtifacttrue/useProjectArtifact /dependencySet /dependencySets /assembly Maven now creates the gisdistribution-0.0.2-assembly.zip but it doesn't deploy it. We tried to use packaging jar but only empty jars are deployed. In which way can we deploy the assembly? Yours Rüdiger -- View this message in context: http://old.nabble.com/-Maven-Assembly-Plugin--Deploy-assembly-tp26333720p26333720.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 Assembly Plugin] Deploy assembly
Anders Hammar wrote: A quick Internet search gives the answer: http://old.nabble.com/Maven-assembly-plug-in-and-deploy-not-happening--td18161292.html /Anders Hmm, I changed execution idmake-assembly/id phasepackage/phase goals goalassembly/goal /goals /execution to execution idmake-assembly/id phasepackage/phase goals goalattach/goal /goals /execution and get now the following error: 'attach' was specified in an execution, but not found in the plugin What's wrong? Yours Rüdiger -- View this message in context: http://old.nabble.com/-Maven-Assembly-Plugin--Deploy-assembly-tp26333720p26333970.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 Assembly Plugin] Deploy assembly
http://maven.apache.org/plugins/maven-assembly-plugin/plugin-info.html Regards, Stevo. On Fri, Nov 13, 2009 at 10:51 AM, rgubler2 rgub...@init-ka.de wrote: Anders Hammar wrote: A quick Internet search gives the answer: http://old.nabble.com/Maven-assembly-plug-in-and-deploy-not-happening--td18161292.html /Anders Hmm, I changed execution idmake-assembly/id phasepackage/phase goals goalassembly/goal /goals /execution to execution idmake-assembly/id phasepackage/phase goals goalattach/goal /goals /execution and get now the following error: 'attach' was specified in an execution, but not found in the plugin What's wrong? Yours Rüdiger -- View this message in context: http://old.nabble.com/-Maven-Assembly-Plugin--Deploy-assembly-tp26333720p26333970.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 Assembly Plugin] Deploy assembly
Yes, read the docs. My earlier link points at info about the deprecated goal (attached). There is a new one. My apologizes. /Anders On Fri, Nov 13, 2009 at 10:55, Stevo Slavić ssla...@gmail.com wrote: http://maven.apache.org/plugins/maven-assembly-plugin/plugin-info.html Regards, Stevo. On Fri, Nov 13, 2009 at 10:51 AM, rgubler2 rgub...@init-ka.de wrote: Anders Hammar wrote: A quick Internet search gives the answer: http://old.nabble.com/Maven-assembly-plug-in-and-deploy-not-happening--td18161292.html /Anders Hmm, I changed execution idmake-assembly/id phasepackage/phase goals goalassembly/goal /goals /execution to execution idmake-assembly/id phasepackage/phase goals goalattach/goal /goals /execution and get now the following error: 'attach' was specified in an execution, but not found in the plugin What's wrong? Yours Rüdiger -- View this message in context: http://old.nabble.com/-Maven-Assembly-Plugin--Deploy-assembly-tp26333720p26333970.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 RPM plugin changes all file permissions to 644
Hello, I'm using the Maven RPM plugin for creating rpms. It's working fine, but it overwrites the permissions of all files to 664. So for example, an executable file becomes non-executable. I've added these tags to the configuration: defaultFilemode-/defaultFilemode defaultDirmode-/defaultDirmode defaultUsernameroot/defaultUsername defaultGroupnameroot/defaultGroupname And the generates spec file is ok, it indeed adds %defattrs(-,root,root,-) However, the problem is that the files it uses, which are based in target/rpm/buildroot are all 664. I'm guessing the plugin copies the required files into this directory, and during it the permissions are lost. I'll look at the source code to be sure. Is there any way to fix this? Thanks, Csaba - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Doubt about packaging using profiles
Great solution!!! Thanks both I someone has the same issue, visit: http://www.manydesigns.com/documentation/tutorials/using-maven-profiles-and- resource-filtering.html -Mensaje original- De: hermod.opstv...@dnbnor.no [mailto:hermod.opstv...@dnbnor.no] Enviado el: viernes, 13 de noviembre de 2009 10:15 Para: users@maven.apache.org Asunto: RE: Doubt about packaging using profiles Hi This is easly solved using filters and profiles. Define your environment specific variables in your filter and subsitute that into your log4j file. I do this all the time, because the disk drive and path to the log4j files are different from test to productio. Hermod -Original Message- From: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] On Behalf Of Anders Hammar Sent: Friday, November 13, 2009 10:04 AM To: Maven Users List Subject: Re: Doubt about packaging using profiles Environment specific files should be read from the class path. Then keep them out of your bundle (ear for instance) and add them to the environment (app server for instance) in such a way that they end up on the classpath. /Anders On Fri, Nov 13, 2009 at 09:40, Exposito Aguilera, Francisco francisco.expos...@es.issworld.com wrote: If I create only one build, how can I select the prod or test file? (only inside the build I can do the include/exclude file option). Then, I need two builds, one for selecting prod file and one for test (one for profile) Could you add an example of how to do what you say? /Paco -Mensaje original- De: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] En nombre de Anders Hammar Enviado el: viernes, 13 de noviembre de 2009 8:31 Para: Maven Users List Asunto: Re: Doubt about packaging using profiles First, having different builds for different environments are generally a bad idea. That's, IMHO, a general Java rule so I won't go into that any further but I wanted to mention that. The, I think you should solve your issue by configuring the resources plugin in to only include the right log4j files. I would set up my pom so that the prod file is being used. And then create a profile for development use where the dev log4j file is being used instead. Regarding deleting the already existing files in the output folder, one could argue that that should be taken care of by executing mvn clean. Here's how you configure the resources plugin to include/exclude: http://maven.apache.org/plugins/maven-resources-plugin/examples/includ e-excl ude.htmlhttp://maven.apache.org/plugins/maven-resources-plugin/exampl es/include-excl%0Aude.html What's going on in your current case is that the resources plugin will copy all log4j files. The resources plugin is bound to the lifecycle by default (for a jar project for instance). That's why you see all log4j (actually all files in the resources folder) end up in the output directory. /Anders On Fri, Nov 13, 2009 at 08:04, Exposito Aguilera, Francisco francisco.expos...@es.issworld.com wrote: My pom.xml file has two profiles which must delete and copy files in a place. If I want the war for production, I need the log4j_prod.xml and if I want the war for test I need the log4j.xml file. I show the test profile: profiles profile idtest/id build resources /resources filters /filters plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasetest/phase goals goalrun/goal /goals configuration tasks delete file=${project.build.outputDirectory}/log4j.xml / delete file=${project.build.outputDirectory}/log4j_prod.xml / copy file=src/main/resources/log4j.xml tofile=${project.build.outputDirectory}/log4j.xml / /tasks /configuration /execution /executions /plugin plugin artifactIdmaven-surefire-plugin/artifactId configuration skiptrue/skip /configuration /plugin plugin artifactIdmaven-war-plugin/artifactId executions execution phasepackage/phase goals goalwar/goal /goals configuration classifiertest/classifier /configuration /execution /executions /plugin /plugins /build /profile /profiles Then I go to Run as -- Run configurations and I create a new Maven build with these options: Base directory: I select the project root Goals: package Profiles: test And when I execute, in target classes the file tasks are done, but inside the war file both log4j xml files are copied. Any help, please? - 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:
Re: Maven RPM plugin changes all file permissions to 644
OK as far as I can see, the problem is that the RPM Plugin uses Plexus Archiver version 1.0-alpha-5, which copes files by opening and output stream and writing to it, and no chmod is done. This is fixed in version 1.0-alpha-12, where the Plexus Archiver explicitly executes the chmod command from the console. But changing the RPM Plugin's pom.xml to the newer version makes the JUnit tests fail. I'll try and see if it creates the rpm correctly though... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven RPM plugin changes all file permissions to 644
I ran the RPM Plugin with the patched version of the archiver, and it works. However, the tests fail, so I had to run it with the -Dmaven.test.skip=true parameter. Gajo Csaba wrote: OK as far as I can see, the problem is that the RPM Plugin uses Plexus Archiver version 1.0-alpha-5, which copes files by opening and output stream and writing to it, and no chmod is done. This is fixed in version 1.0-alpha-12, where the Plexus Archiver explicitly executes the chmod command from the console. But changing the RPM Plugin's pom.xml to the newer version makes the JUnit tests fail. I'll try and see if it creates the rpm correctly though... - 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
Compile error in mvn package
Hello, Every time I make a mvn clean and tghen an mvn package, I receive this error: [INFO] [compiler:compile] [INFO] Compiling 7 source files to C:\Workspaces\ISSExtranet\ExtranetFrontEnd\target\classes [ERROR] Mojo: org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile FAILED for project: ExtranetFrontEnd:ExtranetFrontEnd:war:0.0.1-SNAPSHOT Reason: C:\Workspaces\ISSExtranet\ExtranetFrontEnd\src\main\java\com\issworld\es\ext ranet\frontend\util\LocaleBean.java:[6,36] package com.issworld.es.icefaces.util does not exist C:\Workspaces\ISSExtranet\ExtranetFrontEnd\src\main\java\com\issworld\es\ext ranet\frontend\util\DownloadServlet.java:[7,42] package com.issworld.es.extranet.model.util does not exist Then, in order to solve it, I must modify and save all classes which appear in the below error trace. Then I can do the mvn package without any problem. Any idea? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
possible maven3 resource filtering problem
Hi, i've tried maven3. it works very well and is faster than previous version :) great works! i've found a little problem using resource plugin. In particular filtering resource doesn't work. I don't know if this is right place where comunicate the problem.. anyway. I've prepared a simple project that compile and run with maven2 and maven3. Below is the output of the code: $ /opt/apache-maven-2.0.9/bin/mvn -Denv=profile1 compile cat target/classes/application.properties ... [INFO] [resources:resources] [INFO] [compiler:compile] ... env=profile2 attr1=profile2-value1 attr2=profile2-value2 $ /opt/apache-maven-3.0-SNAPSHOT/bin/mvn -Denv=profile1 compile cat target/classes/application.properties [INFO] Scanning for projects... [INFO] [INFO] [INFO] Building maven3-resource-regression 1.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ maven3-resource-regression --- [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ maven3-resource-regression --- [INFO] No sources to compile [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 1.393s [INFO] Finished at: Fri Nov 13 10:15:11 CET 2009 [INFO] Final Memory: 3M/77M [INFO] env=profile1 attr1=${attr1} attr2=${attr2} Let me known if could be useful send you zip project to reproduce the problem. Regards, Luca - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
[ANN] Apache Maven 3.0-alpha-3 Released
The Maven team is pleased to announce the release of Apache Maven 3.0-alpha-3. Maven is a project comprehension and build tool, designed to simplify the process of maintaining a healthy development lifecycle for your project. You can read more here: http://maven.apache.org/ Downloads of source and binary distributions are already available on the central Maven repository and various Apache download mirrors and will be listed soon in our download section once the updated site gets synced to the live server: http://maven.apache.org/download.html A major goal of Maven 3.0 is to be compatible with existing plugins and projects designed for Maven 2.x. Users interested in testing this alpha release should have a glance at the compatibility notes for known differences between Maven 3.0 and Maven 2.x: http://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html As of this writing, we already know about one regression in Maven 3.0-alpha-3 that prevents the forced update of SNAPSHOT POMs via the command line flag -U. If you encounter unexpected problems while using Maven 3.0-alpha-3, please feel free to contact us via the Maven developer list: http://maven.apache.org/mail-lists.html Release Notes - Maven 2 - Version 3.0-alpha-3 ** Sub-task * [MNG-3013] - The plugin manager incorrectly caches plugin versions between embedder calls * [MNG-3862] - Remove all plugin configuration manipulation from the plugin manager * [MNG-3932] - Remove all mirror, authentication, and proxy handling out of WagonManager and into a neutral Maven implementation * [MNG-4163] - Deprecate all methods in MavenProject that relate to reporting. * [MNG-4215] - Review and fix hashCode/equals methods of ArtifactRepository implementations ** Bug * [MNG-1943] - MavenProject::getParent() returns a MavenProject that is NOT interpolated * [MNG-2098] - Artifact resolver incorrectly selects repository which doesn't contain the selected version * [MNG-2140] - Mojo in forked lifecycle invoked in reactor build cannot find reactor dependency * [MNG-2174] - pluginManagementpluginsplugindependencies do not propogate to child POM plugins (potentially scoped to only affecting child POM plugins that live within a profile) * [MNG-2363] - profileactivationfileexists/ does not work in a multi-project build * [MNG-2693] - Error executing post-site: java.util.MissingResourceException: Can't find bundle for base name site-plugin, locale en * [MNG-2720] - Multiproject dependencies not accurate for project.compileClasspathElements when run from root project * [MNG-3018] - pluginManagement configurations are not honoured when plugin is silently included * [MNG-3043] - Allow 'mvn test' to work with test-jar dependencies in a reactor * [MNG-3139] - The skin does not exist: Unable to determine the release version * [MNG-3260] - 2.1: aggregating plugins in submodules of the reactor return all projects causing a chicken/egg issue * [MNG-3265] - maven-model Extension.equals causes NPE when any field is uninitialized * [MNG-3281] - Revisit backwards compat of extensions (IT 0114) * [MNG-3391] - StackOverflowError in DefaultMavenProjectBuilder * [MNG-3401] - Plugin parameters must be specified outside an execution block when they are invoked from the command line * [MNG-3483] - merging managed dependencies should ONLY work when scope == import explicitly * [MNG-3543] - readProjectWithDependencies take very long time for some projects * [MNG-3567] - pluginManagement from parent POM not used in child * [MNG-3607] - Class loaders employed by Maven return invalid URLs to resources * [MNG-3641] - Lack of error checks on profiles * [MNG-3683] - [regression] Help plugin does not work * [MNG-3732] - [regression] project.getActiveProfiles() has not the same behaviour * [MNG-3757] - Setting M2_HOME to nothing and running ant delets contents of the current folder * [MNG-3803] - [regression] System properties not working any more * [MNG-3807] - Maven is not interpolatin Properties at plugin configuration * [MNG-3814] - Reactor builds fail due to erroneous cycle in project sorting which does not consider versions * [MNG-3819] - [regression] Plugins that don't declare dependency on plexus-utils no longer get plexus-utils:1.1 * [MNG-3836] - [regression] Inherited collection from plugin configuration is merged with configuration from child whereas child config should completely override collection * [MNG-3848] - [regression] Inheritance of project/site/scm URLs does not take child's relative location to parent into account * [MNG-3853] - [regression] Distribution Management injected by profile is not reflected by MavenProject * [MNG-3872] - Profiles not being activated for relocated POMs * [MNG-3877] - Reporting output directory not basedir aligned when queried from
obtain latest snapshot to put on website for auto-update?
Hello, I have some auto-update functionality built into an application, but I am looking to integrate it a bit with maven. I'd like to be able to export the latest snapshot to a location on our website where the updater can download it. I use nexus as my repo manager, but I have that locked down to require a login and I don't want to open this up. I want a simple public download URL. Any suggestions on how I accomplish this? Can I just do a 'wget' against nexus to grab the latest snapshot and copy this to webserver? Is there a special latest snapshot link available in nexus or must I download the process the metadata to determine the latest one? Perhaps I should just setup a simple no artifacts pom file which lists the artifact as a dependency and let that maven grab it for me? Thanks! -jr - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Compile error in mvn package
ranet\frontend\util\LocaleBean.java:[6,36] package com.issworld.es.icefaces.util does not exist C:\Workspaces\ISSExtranet\ExtranetFrontEnd\src\main\java\com\issworld\es\ext ranet\frontend\util\DownloadServlet.java:[7,42] package com.issworld.es.extranet.model.util does not exist The best practice in Maven is to put your Java code in a Jar project and then depend on it from your War project. Can you perhaps split things up and then use dependencies etc to tie it all back together? Having said that, I have no idea why your compile is failing. I've been using Maven for a long time and never run into this problem. You don't really provide enough info in your email to figure out why it is happening, either... Perhaps try again with mvn -X clean package and see what happens? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: SNAPSHOT comparison between local and remote repositories
Is maven comparing the some kind of timestamps ? ( If true then it has to assume that the clocks of both machines are in sync ) Yes, that's what happens. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: SNAPSHOT comparison between local and remote repositories
This is a big assumption, as most of the machines will have their times differing by some amount. ( Maybe it is a good enough assumption as artifacts need not be compared with a millisecond accuracy ) --sony On Fri, Nov 13, 2009 at 9:58 AM, Wayne Fay wayne...@gmail.com wrote: Is maven comparing the some kind of timestamps ? ( If true then it has to assume that the clocks of both machines are in sync ) Yes, that's what happens. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven test dependency in multi module project
I use maven to build a multi module project. My module 2 depends on Module 1 source at compile scope and module 1 tests in test scope. Module 2 - dependency groupIdblah/groupId artifactIdMODULE1/artifactId versionblah/version classifiertests/classifier scopetest/scope /dependency This works fine. Say my module 3 depends on Module1 source and tests at compile time. Module 3 - dependency groupIdblah/groupId artifactIdMODULE1/artifactId versionblah/version classifiertests/classifier scopecomplie/scope /dependency When I run mvn clean install, my build runs till module 3, fails at module 3 as it couldnt resolve the module 1 test dependency. Then I do a mvn install on module 3 alone, go back and run mvn install on my parent pom to make it build. How can i fix this? Thanks.
Re: mvn package + SAR + EAR
First, excellent practice of you to provide a test case project! I think this is a reactor bug in Maven 2.x. I tested with Maven 2.2.1 and it doesn't work (it tries to get the sar from the local repo). However, it does work with the new Maven 3.0-alpha-3 release. /Anders On Thu, Nov 12, 2009 at 20:36, Wittmann, Eric eric.wittm...@yale.eduwrote: Hey everyone, I have been trying to include a SAR inside an EAR, following the wiki entry here: http://docs.codehaus.org/display/MAVENUSER/Creating+JBoss+SAR+(Service+ARchive)+Artifactshttp://docs.codehaus.org/display/MAVENUSER/Creating+JBoss+SAR+%28Service+ARchive%29+Artifacts Almost everything works as expected, except that “mvn package” fails with (depending on the mvn version) one of: “Transitive dependency resolution for scope: test has failed for your project.” OR “Failed to resolve artifact.” I have attached the simplest project I can come up with to test this out. Running “mvn clean package” will fail with one of the above messages. However, “mvn clean package install” will succeed. And it succeeds presumably because install will install the SAR into the local repository, allowing the ear plugin to pick it up. This seems like a bug to me, but perhaps I’m just doing something wrong? Regards, Eric Wittmann ITS, Yale University - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multi Module Project Assembly plugin
Added inheritance=true and phase=install, still install doesnt build the assemblies. I read about the same issue in some forum last week, did not understand the explanation correctly. Now trying to find the link, couldnt find it. But there was some reference about parent pom referring to child, child having reference to parent and that doesnt work well with assemblies. There was some suggestion about writing a separate pom for assemblies alone. I have a sample project which can depict this problem. Will sending that help? Thanks. On Fri, Nov 13, 2009 at 1:00 AM, Anders Hammar and...@hammar.net wrote: I think what you're missing is making the plugin inherited. You set that like this: inheritedtrue/inherited Check the pom schema (or this page: http://maven.apache.org/guides/introduction/introduction-to-the-pom.html) for exact syntax. Also, I noticed that you don't have no id defined for the execution. I'm not sure if it's required though. To see the effective pom, execute mvn help:effective-pom This is very helpful to see what the child pom will be including inheritance and everything. Use that and to make sure that the plugin binding really exists in the child module. /Anders On Thu, Nov 12, 2009 at 20:47, Stephanie Johnson jstephani...@gmail.com wrote: I have attached my parent pom.xml and one of my modules pom.xml. Please take a look. Thanks. On 11/12/09, Anders Hammar and...@hammar.net wrote: You mus be doing something wrong. If the plugin is bound correctly, it will be executed. If you post the pom snippet we might spot the issue. /Anders On Thu, Nov 12, 2009 at 19:25, Stephanie Johnson jstephani...@gmail.comwrote: Thanks for your suggestion Anders. But that doesnt seem to work. If I associate my assembly plugin to package phase or install phase and run mvn install or mvn package - it does not build my assemblies. I tried running mvn install first and then running mvn assembly:assembly. This generates following error. [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Artifact: blaw blaw (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated. This is weird because all the dependencies are built installed and ready to use. Thanks. On 11/11/09, Anders Hammar and...@hammar.net wrote: You should bind the assembly plugin to an appropriate phase (such as 'package'). The, you only need to run mvn install /Anders On Tue, Nov 10, 2009 at 22:33, Stephanie Johnson jstephani...@gmail.comwrote: All, I am using Maven 2.0.9 to build a multi module project. I have defined the assembly plugin in my parent pom. I can get my assemblies built using mvn install assembly:assemly This command runs the tests twice, once during install phase and another during assembly. I tried assembly:single but it throws an error. Any help to fix get my assemblies built without running the tests twice is much appreciated. Thanks. - 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: obtain latest snapshot to put on website for auto-update?
nexus to grab the latest snapshot and copy this to webserver? Is there a ... special latest snapshot link available in nexus or must I download the You do know about the Nexus User list, right? As a percentage of users, maybe 15% of the Maven Users know anything about Nexus, vs ~100% of those on Nexus Users list. Perhaps I should just setup a simple no artifacts pom file which lists the artifact as a dependency and let that maven grab it for me? Sounds like a reasonable solution. Otherwise this sounds like a good feature request for Nexus. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: mvn package + SAR + EAR
Thanks for the response Anders. Since mvn install works, it's not too high a priority for us, and I'm glad that it's probably a bug and not my misunderstanding of how it's supposed to work. It's a little weird for our build/release server to do an install to its local maven repo - but not a huge deal. Regards, Eric -Original Message- From: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] On Behalf Of Anders Hammar Sent: Friday, November 13, 2009 10:14 AM To: Maven Users List Subject: Re: mvn package + SAR + EAR First, excellent practice of you to provide a test case project! I think this is a reactor bug in Maven 2.x. I tested with Maven 2.2.1 and it doesn't work (it tries to get the sar from the local repo). However, it does work with the new Maven 3.0-alpha-3 release. /Anders On Thu, Nov 12, 2009 at 20:36, Wittmann, Eric eric.wittm...@yale.eduwrote: Hey everyone, I have been trying to include a SAR inside an EAR, following the wiki entry here: http://docs.codehaus.org/display/MAVENUSER/Creating+JBoss+SAR+(Service+ARchive)+Artifactshttp://docs.codehaus.org/display/MAVENUSER/Creating+JBoss+SAR+%28Service+ARchive%29+Artifacts Almost everything works as expected, except that mvn package fails with (depending on the mvn version) one of: Transitive dependency resolution for scope: test has failed for your project. OR Failed to resolve artifact. I have attached the simplest project I can come up with to test this out. Running mvn clean package will fail with one of the above messages. However, mvn clean package install will succeed. And it succeeds presumably because install will install the SAR into the local repository, allowing the ear plugin to pick it up. This seems like a bug to me, but perhaps I'm just doing something wrong? Regards, Eric Wittmann ITS, Yale University - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.425 / Virus Database: 270.14.62/2499 - Release Date: 11/13/09 07:54:00 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Direct Invoked Plugin POM profiles not taking effect at runtime
I am in the process of porting all of our custom release tools to maven. I have written a maven-plugin that I intend to invoke directly from the CLI. Part of its dependencies are profiled (the Starteam SDK, to be exact), in order to adapt to what binary version the user has installed on its machine. This works fine at compile time and I can deploy the plugin without problem. The plugin is not referenced by any of our other projects, as it is meant to be used in a standalone fashion (mvn -Dparam=value group:artifact:goal). Unfortunately, the profiles dont seem to take effect at runtime in the case of a direct invocation, whether they are part of the activeProfiles in the settings.xml or specified through mvn -P profile. The dependencies are not downloaded nor are they put on the classpath, which invariably results in a ClassNotFound exception. I've also tried to put the dependencies as static entries (non-profiled), with the version ID defined by a ${variable}, with the value defined in the profile, but this didn't work either. If the dependency is all static (no profiles used, bound to a specific version), it works without a hitch. My first intention was to have a dependency on the DLL themselves, which I would have resided in our repository. But since Maven does not (yet?) support binary dependencies, this would have required the use of a DLL-in-JAR/dependency:unpack hack, which to faces a similar problem of not being able to run the unpack prior to the execution of the plugin in a direct invocation scenario. If anybody can think of way to make this work (either the profiled or DLL dependency), I'd be interested to hear it! Francis Lalonde Services de trésorerie CGI 514-228-8800 poste 2795 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Snapshot Deployment Best Practices
I have figured out how to deploy all my artifacts to my local Nexus repository, and I have even set up my CI tool (TeamCity in my case) to deploy the snapshot artifacts every night. Because I am not at the release stage yet, I have just been deploying snapshot after snapshot. This means that my snapshot page on Nexus for this artifact is getting loaded with entries down the page. My questions relate to the best practices associated with this sort of practice: *Is it OK and desirable to build up artifacts between releases? *If not, is there a way to replace the previous snapshot artifacts with the latest ones? *Are there any steps I am missing? Thanks for your insight.
maven-shade-plugin and pom packaging type (for parent poms)
I have a parent pom in my company that defines uber-jars. It was using the assembly plugin, but I have switched it to use the shade plugin, so we can combine the spring related files (META-INF/spring.handlers and META-INF/spring.schemas). The shade plugin is only used when a profile is active, in this case production. Here is the relevant parts of the pom: profiles profile idproduction/id activation property nameproduction/name /property /activation plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-shade-plugin/artifactId executions execution phasepackage/phase goals goalshade/goal /goals configuration transformers transformer implementation=org.apache.maven.plugins.shade.resource.AppendingTransformer resourceMETA-INF/spring.handlers/resource /transformer transformer implementation=org.apache.maven.plugins.shade.resource.AppendingTransformer resourceMETA-INF/spring.schemas/resource /transformer /transformers /configuration /execution /executions /plugin /plugins /build /profile /profiles Due to other parent pom inclusions, when I go to do a mvn:release on this pom, the production profile is active. I get the following error in the output: INFO] [shade:shade {execution: default}] [ERROR] The project main artifact does not exist. This could have the following [ERROR] reasons: [ERROR] - You have invoked the goal directly from the command line. This is not [ERROR] supported. Please add the goal to the default lifecycle via an [ERROR] execution element in your POM and use mvn package to have it run. [ERROR] - You have bound the goal to a lifecycle phase before package. Please [ERROR] remove this binding from your POM such that the goal will be run in [ERROR] the proper phase. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create shaded artifact. I understand the need for this error on a pom which produces no artifact to be shaded. But in this case, this parent pom has its packaging set to pom, so no jar is created. I don't want to set the packaging to jar, which goes against what a parent pom should be. Any help is appreciated. I've done a few searches, and so far turned up nothing. -- Larry - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Snapshot Deployment Best Practices
Nexus has a Purge Snapshots job you can schedule. It is pretty flexible. You can decide how many snapshots you wish to keep around. Ideally, you should normally only need the latest, but on the rare occasion you may want to point to an older one. In our environment, the job runs every night and only leaves the last 2 snapshots. Although we are now considering only keeping the latest since I don't think anyone has ever wanted to point to the second latest. --- Todd Thiessen -Original Message- From: Neil Chaudhuri [mailto:nchaudh...@potomacfusion.com] Sent: Friday, November 13, 2009 12:21 PM To: users@maven.apache.org Subject: Snapshot Deployment Best Practices I have figured out how to deploy all my artifacts to my local Nexus repository, and I have even set up my CI tool (TeamCity in my case) to deploy the snapshot artifacts every night. Because I am not at the release stage yet, I have just been deploying snapshot after snapshot. This means that my snapshot page on Nexus for this artifact is getting loaded with entries down the page. My questions relate to the best practices associated with this sort of practice: *Is it OK and desirable to build up artifacts between releases? *If not, is there a way to replace the previous snapshot artifacts with the latest ones? *Are there any steps I am missing? Thanks for your insight. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: obtain latest snapshot to put on website for auto-update?
Wayne, Thanks for your reply. I had thought the repo spec was fairly standardized by maven, so regardless of repo manager I might be able to accomplish this. I will post it on the nexus user list though for more input. I think maybe the simplest solution would be to write a script to authenticate against nexus (the HTTP based repo really), fetch the maven-metadata.xml file which appears to have info on the latest snapshot for a specific artifact and fetch it from there. -jr On Nov 13, 2009, at 11:12 AM, Wayne Fay wrote: nexus to grab the latest snapshot and copy this to webserver? Is there a ... special latest snapshot link available in nexus or must I download the You do know about the Nexus User list, right? As a percentage of users, maybe 15% of the Maven Users know anything about Nexus, vs ~100% of those on Nexus Users list. Perhaps I should just setup a simple no artifacts pom file which lists the artifact as a dependency and let that maven grab it for me? Sounds like a reasonable solution. Otherwise this sounds like a good feature request for Nexus. Wayne - 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: Snapshot Deployment Best Practices
Also, avoid deploying snapshots if nothing's changes. This is easier to accomplish if you have a truly modular build with sub-modules following their independent release cycles rather than a one monolithic multi-module buid. It'll certainly work if you always deploy everything just in case, but especially if your modules are big, you and all your devs end up spending extra unnecessary seconds every day downloading the dependencies even if they haven't changed. Kalle On Fri, Nov 13, 2009 at 9:57 AM, Todd Thiessen thies...@nortel.com wrote: Nexus has a Purge Snapshots job you can schedule. It is pretty flexible. You can decide how many snapshots you wish to keep around. Ideally, you should normally only need the latest, but on the rare occasion you may want to point to an older one. In our environment, the job runs every night and only leaves the last 2 snapshots. Although we are now considering only keeping the latest since I don't think anyone has ever wanted to point to the second latest. --- Todd Thiessen -Original Message- From: Neil Chaudhuri [mailto:nchaudh...@potomacfusion.com] Sent: Friday, November 13, 2009 12:21 PM To: users@maven.apache.org Subject: Snapshot Deployment Best Practices I have figured out how to deploy all my artifacts to my local Nexus repository, and I have even set up my CI tool (TeamCity in my case) to deploy the snapshot artifacts every night. Because I am not at the release stage yet, I have just been deploying snapshot after snapshot. This means that my snapshot page on Nexus for this artifact is getting loaded with entries down the page. My questions relate to the best practices associated with this sort of practice: *Is it OK and desirable to build up artifacts between releases? *If not, is there a way to replace the previous snapshot artifacts with the latest ones? *Are there any steps I am missing? Thanks for your insight. - 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: obtain latest snapshot to put on website for auto-update?
You can use this url: http://host:port/nexus/service/local/artifact/maven/redirect?r=repositoryg=groupIda=artifactIdv=versionp=type Nexus will handle the SNAPSHOT conversion to latest so you don't need to read the metadata or anything like that. Peter -Original Message- From: James Russo [mailto:j...@halo3.net] Sent: Friday, November 13, 2009 1:29 PM To: Maven Users List Subject: Re: obtain latest snapshot to put on website for auto-update? Wayne, Thanks for your reply. I had thought the repo spec was fairly standardized by maven, so regardless of repo manager I might be able to accomplish this. I will post it on the nexus user list though for more input. I think maybe the simplest solution would be to write a script to authenticate against nexus (the HTTP based repo really), fetch the maven-metadata.xml file which appears to have info on the latest snapshot for a specific artifact and fetch it from there. -jr On Nov 13, 2009, at 11:12 AM, Wayne Fay wrote: nexus to grab the latest snapshot and copy this to webserver? Is there a ... special latest snapshot link available in nexus or must I download the You do know about the Nexus User list, right? As a percentage of users, maybe 15% of the Maven Users know anything about Nexus, vs ~100% of those on Nexus Users list. Perhaps I should just setup a simple no artifacts pom file which lists the artifact as a dependency and let that maven grab it for me? Sounds like a reasonable solution. Otherwise this sounds like a good feature request for Nexus. Wayne - 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
Re: obtain latest snapshot to put on website for auto-update?
Peter, exactly what I was looking for. Thanks! -jr On Nov 13, 2009, at 1:32 PM, Hayes, Peter wrote: You can use this url: http://host:port/nexus/service/local/artifact/maven/redirect? r=repositoryg=groupIda=artifactIdv=versionp=type Nexus will handle the SNAPSHOT conversion to latest so you don't need to read the metadata or anything like that. Peter -Original Message- From: James Russo [mailto:j...@halo3.net] Sent: Friday, November 13, 2009 1:29 PM To: Maven Users List Subject: Re: obtain latest snapshot to put on website for auto-update? Wayne, Thanks for your reply. I had thought the repo spec was fairly standardized by maven, so regardless of repo manager I might be able to accomplish this. I will post it on the nexus user list though for more input. I think maybe the simplest solution would be to write a script to authenticate against nexus (the HTTP based repo really), fetch the maven-metadata.xml file which appears to have info on the latest snapshot for a specific artifact and fetch it from there. -jr On Nov 13, 2009, at 11:12 AM, Wayne Fay wrote: nexus to grab the latest snapshot and copy this to webserver? Is there a ... special latest snapshot link available in nexus or must I download the You do know about the Nexus User list, right? As a percentage of users, maybe 15% of the Maven Users know anything about Nexus, vs ~100% of those on Nexus Users list. Perhaps I should just setup a simple no artifacts pom file which lists the artifact as a dependency and let that maven grab it for me? Sounds like a reasonable solution. Otherwise this sounds like a good feature request for Nexus. Wayne - 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
Slow Java compiles on Win XP
On my fairly new Windows XP Pro SP 2 box, I'm running Maven 2.2.1 against the latest stable JDK (1.6.0_17), and am encountering extraordinarily slow compile times, even for fairly small projects: they can take 1-3 minutes apiece, and we have a couple dozen. Searching on the subject turned up this thread: http://old.nabble.com/Slow-maven-compile-after-upgrading-JDK-from-1.5-to-1.6 -td23501164.html which in turn links to several bugs in Sun's bug database which are as yet unresolved. Does anyone know of a workaround in the interim short of compiling on a different OS or downgrading the JDK (or source/target elements in maven-compiler-plugin) to 1.5? This is crippling my productivity. Thanks in advance, Damon
Re: How to fix the java.net repository relocation
When using Artifactory this scenario can be circumvented, as we never let bad poms pass through, so you won't end up with html pages in your repository when a remote repository is broken. On Thu, Nov 12, 2009 at 11:53 AM, Lahiru Gunathilake glah...@gmail.comwrote: Hi Stephan, Actually this is not about building the products in my machine, we are suppose to host our source packs and let users to download it and build it in their machines. So a the build should go smoothly and should not stuck due to relocation of java.net repository. Let me explain the situation, before that I would say this is a kind of a bug in maven, simply because maven does not skip taking an artifact if one of the maven repo sends a 301(MOVED PERMANANTLY) and it simply take that message and write it as the pom file. Simply if the maven repo sends 404 it skip that repo and go for another, but here with 301 it just dump the message as the pom file and later on this failes. In our build system we are not refering this java.net repository in any location but maven itself go for the java.net repo, so please be kind enough to help to fix this. I have only one solution for the time being, which is configuring java.netrepository not to send 301 and send 404. I can simply patch the maven, to handle this scenario but we are stuck with our release process due to this issue since our products are open source. Lahiru On Thu, Nov 12, 2009 at 2:10 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: Use a repository manager and have it proxy everything. that way you can just to mirrorOf* in your settings.xml. It will merge all repositories and everything just works(TM) 2009/11/12 Lahiru Gunathilake glah...@gmail.com Hi Stephen, I tried with a clean repo, but didn't worked for me. I have encountered this repository failures time to time. So we have our own repository where we host our artifacts. Now I want to add all these third party artifacts I used to build the product stack to our own repository. Is this possible to do and do the build products by adding our repository in to the pom.xml of Apache projects we are building. Can you please tell me how to host those third party artifacts in to our own repository. Lahiru On Thu, Nov 12, 2009 at 1:58 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: 2009/11/12 Lahiru Gunathilake glah...@gmail.com Hi Stephen, On Thu, Nov 12, 2009 at 12:10 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: AFAIK, Axis2 is an apache project and would be deploying to repo1.maven.org . The rules for repo1.maven.org are that you cannot rely on any artifacts which are not hosted on repo1.maven.org. I think there were artifacts hosted and now it's moved. repo1.maven.org is write-once artifacts cannot be removed from repo1.maven.org As such, I would expect that Axis2 _should not_ require artifacts from java.net, and should not have any repository sections in their pom.xml files. Yes axis2 doesn't have any repository section in it's pom files but when I manually add the relocated repo in to the Axis2 pom it successfully get some of the artifacts and later on it again refer to the wrong location and get a html content in the the pom file. please refer the error here[1]. sounds like your local repository is corrupted. blow away ~/m2/repository/org/apache (or move it to a temporary location) (OK technically they are allowed ones which are only enabled for -SNAPSHOTs... but it cannot be enabled for releases) That is the theory, now it may well be that Axis2 is being bold and depending on java.net. To answer your question. Your best bet is to set up a maven repository manager (e.g. nexus, artifactory, etc) and configure your settings.xml to use that repository manager as mirrofOf*/mirrorOf I will try for this and get back to you. [1]http://www.pastie.org/694974 Thanks in advance Lahiru Then you can add all the repositories you want to source artifacts from to your repository manager, and you should be able to build. Also this sounds more like a question for the Axis2 list -Stephen 2009/11/12 Lahiru Gunathilake glah...@gmail.com: Hi all, I am trying to build set stack of java products which fails due to the relocation of https://maven-repository.dev.java.net/nonav/repository/. From the product stack I am buiding Apache Axis2 very first and I cannot see this repository in Axis2 pom.xml. So I tried to put the new location in to Axis2 pom and tried to build but still it's failing with some other artifacts. I wanted to change the location where we artifacts pointing to this location, so I ran a grep command inside my .m2 directory but I couldn't find any of the .pom file where it refer to this repository. I'm ahead of a release and have to
Re: maven-shade-plugin and pom packaging type (for parent poms)
On Fri, Nov 13, 2009 at 10:29 AM, Larry Shatzer, Jr. lar...@gmail.com wrote: I have a parent pom in my company that defines uber-jars. It was using the assembly plugin, but I have switched it to use the shade plugin, so we can combine the spring related files (META-INF/spring.handlers and META-INF/spring.schemas). [snip] I found a Jira for this issue already, for something similar. http://jira.codehaus.org/browse/MSHADE-52 I have also attached a patch to fix this, with a test! -- Larry - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multi Module Project Assembly plugin
Well, if the same issue was reported somewhere else and there is a workaround - go with that! /Anders On Fri, Nov 13, 2009 at 16:19, Stephanie Johnson jstephani...@gmail.comwrote: Added inheritance=true and phase=install, still install doesnt build the assemblies. I read about the same issue in some forum last week, did not understand the explanation correctly. Now trying to find the link, couldnt find it. But there was some reference about parent pom referring to child, child having reference to parent and that doesnt work well with assemblies. There was some suggestion about writing a separate pom for assemblies alone. I have a sample project which can depict this problem. Will sending that help? Thanks. On Fri, Nov 13, 2009 at 1:00 AM, Anders Hammar and...@hammar.net wrote: I think what you're missing is making the plugin inherited. You set that like this: inheritedtrue/inherited Check the pom schema (or this page: http://maven.apache.org/guides/introduction/introduction-to-the-pom.html ) for exact syntax. Also, I noticed that you don't have no id defined for the execution. I'm not sure if it's required though. To see the effective pom, execute mvn help:effective-pom This is very helpful to see what the child pom will be including inheritance and everything. Use that and to make sure that the plugin binding really exists in the child module. /Anders On Thu, Nov 12, 2009 at 20:47, Stephanie Johnson jstephani...@gmail.com wrote: I have attached my parent pom.xml and one of my modules pom.xml. Please take a look. Thanks. On 11/12/09, Anders Hammar and...@hammar.net wrote: You mus be doing something wrong. If the plugin is bound correctly, it will be executed. If you post the pom snippet we might spot the issue. /Anders On Thu, Nov 12, 2009 at 19:25, Stephanie Johnson jstephani...@gmail.comwrote: Thanks for your suggestion Anders. But that doesnt seem to work. If I associate my assembly plugin to package phase or install phase and run mvn install or mvn package - it does not build my assemblies. I tried running mvn install first and then running mvn assembly:assembly. This generates following error. [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Artifact: blaw blaw (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated. This is weird because all the dependencies are built installed and ready to use. Thanks. On 11/11/09, Anders Hammar and...@hammar.net wrote: You should bind the assembly plugin to an appropriate phase (such as 'package'). The, you only need to run mvn install /Anders On Tue, Nov 10, 2009 at 22:33, Stephanie Johnson jstephani...@gmail.comwrote: All, I am using Maven 2.0.9 to build a multi module project. I have defined the assembly plugin in my parent pom. I can get my assemblies built using mvn install assembly:assemly This command runs the tests twice, once during install phase and another during assembly. I tried assembly:single but it throws an error. Any help to fix get my assemblies built without running the tests twice is much appreciated. Thanks. - 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
Problem in creating own archetype
Hi all, I am trying to convince my group here to start using Maven instead of Ant. I am preparing a demonstration for them and in the process, I am trying to create my own archetype. I've done it before but this time I am stuck at something which I've no idea how to solve. I want the project directory structure to be - bin -- file1 -- file2.sh -- file3.sh - src -- main -- java -- file.java + site + test So I've all that setup in archetype-resources folder and here is my archetype.xml within META-INF directory archetype !-- this id tag should be same as the artifactId in the archetype pom.xml-- idarchetype_id/id sources sourcesrc/main/java/App.java/source /sources testSources sourcesrc/test/java/AppTest.java/source /testSources resources resourcebin/file1/resource resourcebin/file2.sh/resource resourcebin/file3.sh/resource /resources /archetype The amount of problems I am encountering with something simple as this, I've a feeling that this resources folder is supposed to do something other then what I am trying to do. Q1- How do I include the bin folder where I want it? Main problem I am encountering is I haven't been able to figure out how to include the entire directory and its files without specifying each file the way I've shown above and ** doesn't work and neither does specifying a directory and include tag ANOTHER weird problem is that when Maven encounters that file2.sh, it for some reason tries to open it and parse it because I get an exception like this Parser Eception: archetype-resources/bin/file2.sh:org.apache.velocity.runtime.parser.Pars eException: Encountered . Q2- Why is Maven trying to parse my shell script? I would appreciate any help you can provide, if I am unable to prove to my group how useful Maven is (this is the only snag left), I am afraid we'll keep using ANT
RE: Problem in creating own archetype
I should mention that compile and install of archetype works fine, I am encountering all these issues when I am trying to create the archetype -Original Message- From: Qureshi,Shahzad [Ontario] [mailto:shahzad.qure...@ec.gc.ca] Sent: Friday, November 13, 2009 6:46 PM To: users@maven.apache.org Subject: Problem in creating own archetype Hi all, I am trying to convince my group here to start using Maven instead of Ant. I am preparing a demonstration for them and in the process, I am trying to create my own archetype. I've done it before but this time I am stuck at something which I've no idea how to solve. I want the project directory structure to be - bin -- file1 -- file2.sh -- file3.sh - src -- main -- java -- file.java + site + test So I've all that setup in archetype-resources folder and here is my archetype.xml within META-INF directory archetype !-- this id tag should be same as the artifactId in the archetype pom.xml-- idarchetype_id/id sources sourcesrc/main/java/App.java/source /sources testSources sourcesrc/test/java/AppTest.java/source /testSources resources resourcebin/file1/resource resourcebin/file2.sh/resource resourcebin/file3.sh/resource /resources /archetype The amount of problems I am encountering with something simple as this, I've a feeling that this resources folder is supposed to do something other then what I am trying to do. Q1- How do I include the bin folder where I want it? Main problem I am encountering is I haven't been able to figure out how to include the entire directory and its files without specifying each file the way I've shown above and ** doesn't work and neither does specifying a directory and include tag ANOTHER weird problem is that when Maven encounters that file2.sh, it for some reason tries to open it and parse it because I get an exception like this Parser Eception: archetype-resources/bin/file2.sh:org.apache.velocity.runtime.parser.Pars eException: Encountered . Q2- Why is Maven trying to parse my shell script? I would appreciate any help you can provide, if I am unable to prove to my group how useful Maven is (this is the only snag left), I am afraid we'll keep using ANT - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
repo doesn't contain its dependencies?
I noticed that the java.net maven2 repo contains this jar: dependency groupIdcom.sun.jersey/groupId artifactIdjersey-client/artifactId version1.1.4/version /dependency however, it doesn't contain several of the dependencies of said jar--like glassfish embedded, etc. Anybody know if this is expected? Thanks! -r - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
properties in settings.xml
Hello, I have a project which uses nsis to create an installer, but NSIS isn't available on all of the platforms which I build the project, and I'd like it to skip making the NSIS when the makensis isn't available. I'd like to make the path to NSIS be configurable in the ~/.m2/ settings.xml, so I add it to a default profile which I created having a bunch of other properties: profiles profile iddefault/id properties database.driverClassNameorg.postgresql.Driver/ database.driverClassName database.urljdbc:postgresql://localhost/test/database.url database.useruser/database.user database.passwordpassword/database.password cargo.tomcat.manager.urlhttp://localhost:8081/manager/ cargo.tomcat.manager.url cargo.remote.usernamemanager/cargo.remote.username cargo.remote.passwordpassword/cargo.remote.password customer.webapp.context//customer.webapp.context client.webapp.context/client/client.webapp.context nsis.path/usr/local/nsis/nsis-2.45/bin/makensis/nsis.path !-- Introduced by Hudson, uncomment if not being used via hudson. BUILD_NUMBERdev-build/BUILD_NUMBER SVN_REVISIONunknown/SVN_REVISION -- /properties /profile /profiles So, I have a nsis.path defined in there. However, I am trying to activate the profile in my pom and neither way works. I've tried to just activate the profile in the pom based on presence of nsis.path variable and that doesn't work. And then I've also tried to do: fileexists${nsis.path}/exists/file and that doesn't work either. How can I accomplish this? I could activate it manually with -P, but I'd rather just have everything in the settings.xml file since I need to visit that to setup the environment anyways. thanks! -jr - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multi Module Project Assembly plugin
Explanation and suggestion in the link was not clear and I couldnt find it again. Hence came to Maven Users list for any suggestions. Could you please continue to take a look? On Fri, Nov 13, 2009 at 3:35 PM, Anders Hammar and...@hammar.net wrote: Well, if the same issue was reported somewhere else and there is a workaround - go with that! /Anders On Fri, Nov 13, 2009 at 16:19, Stephanie Johnson jstephani...@gmail.com wrote: Added inheritance=true and phase=install, still install doesnt build the assemblies. I read about the same issue in some forum last week, did not understand the explanation correctly. Now trying to find the link, couldnt find it. But there was some reference about parent pom referring to child, child having reference to parent and that doesnt work well with assemblies. There was some suggestion about writing a separate pom for assemblies alone. I have a sample project which can depict this problem. Will sending that help? Thanks. On Fri, Nov 13, 2009 at 1:00 AM, Anders Hammar and...@hammar.net wrote: I think what you're missing is making the plugin inherited. You set that like this: inheritedtrue/inherited Check the pom schema (or this page: http://maven.apache.org/guides/introduction/introduction-to-the-pom.html ) for exact syntax. Also, I noticed that you don't have no id defined for the execution. I'm not sure if it's required though. To see the effective pom, execute mvn help:effective-pom This is very helpful to see what the child pom will be including inheritance and everything. Use that and to make sure that the plugin binding really exists in the child module. /Anders On Thu, Nov 12, 2009 at 20:47, Stephanie Johnson jstephani...@gmail.com wrote: I have attached my parent pom.xml and one of my modules pom.xml. Please take a look. Thanks. On 11/12/09, Anders Hammar and...@hammar.net wrote: You mus be doing something wrong. If the plugin is bound correctly, it will be executed. If you post the pom snippet we might spot the issue. /Anders On Thu, Nov 12, 2009 at 19:25, Stephanie Johnson jstephani...@gmail.comwrote: Thanks for your suggestion Anders. But that doesnt seem to work. If I associate my assembly plugin to package phase or install phase and run mvn install or mvn package - it does not build my assemblies. I tried running mvn install first and then running mvn assembly:assembly. This generates following error. [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Artifact: blaw blaw (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated. This is weird because all the dependencies are built installed and ready to use. Thanks. On 11/11/09, Anders Hammar and...@hammar.net wrote: You should bind the assembly plugin to an appropriate phase (such as 'package'). The, you only need to run mvn install /Anders On Tue, Nov 10, 2009 at 22:33, Stephanie Johnson jstephani...@gmail.comwrote: All, I am using Maven 2.0.9 to build a multi module project. I have defined the assembly plugin in my parent pom. I can get my assemblies built using mvn install assembly:assemly This command runs the tests twice, once during install phase and another during assembly. I tried assembly:single but it throws an error. Any help to fix get my assemblies built without running the tests twice is much appreciated. Thanks. - 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
Multi-war complex build recommendation request
I have a project where there are 5 levels of projects (maven modules each) in a pom hierarchy: CommonLibrary.jar - CommonMvc.jar - ProductAndService.war - ProjectCore.war - ProjectSpecific_1.war The idea is that the later war file configuration files currently replace the earlier ones where they conflict. The result of all of this is one war with all of the files unbundled and re-bundled in order along the chain. Right now I am using the AppFuse's warpath plugin to accomplish this, but there are problems. Netbeans handles it best, but it fails to recognize compilation paths at times. It sometimes fails to recognize Java file changes, but in somewhat of a predictable manner. There is a big chance this build method may breakdown with 3.0 Maven even worse. What I am asking is, what do you suggest? How do people handle such complex web project compiles where there are commonly replaced configuration files and web oriented files? What do you consider to be a best method if this will not work? What way do you suggest will work with Netbeans effectively? Looking for suggestions. I am willing to make changes to the project structure to make it work, but hoping to be able to keep the modules separate as I am seeking as much reuse between the tiers as possible. For instance I compile one final build with different features for USA vs another for China. Thank you for any help. The more detail the better. JohnE - John Eichelsdorfer http://jobbank.com/ jobbank.com -- View this message in context: http://old.nabble.com/Multi-war-complex-build-recommendation-request-tp26347866p26347866.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: Multi-war complex build recommendation request
Please see here for more on the issues I am facing. Looking not so much as an issue fix as there may not be one, but a recommendation. This may give further information, however. http://netbeans.org/bugzilla/show_bug.cgi?id=154465 http://issues.appfuse.org/browse/APF-645 - John Eichelsdorfer http://jobbank.com/ jobbank.com -- View this message in context: http://old.nabble.com/Multi-war-complex-build-recommendation-request-tp26347866p26347920.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