Archetype parameter-values
Hi all, We have recently created an Archetype for all our developers to use, but we ran into an issue today... The project that is being created, should always use the latest version of our company's parent-POM. The thing here, is that I want to have the archetype-plugin insert this version into the new project automatically... Is there a way to have the archetype-plugin resolve this version? Or can I perhaps write a simple class that is called by the Archetype in which I resolve this version myself? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Archetype parameter-values
I was just looking into that plugin... Seems to do what I want, so I'll probably stick with that. Thanks for the info, both of you! On 23.07.2012 16:48, Wayne Fay wrote: I don't think that there's any mechanism in place except to release a new archetype for each new parent version. If you make a patch to add a feature to the archetype plugin I'll look at it. Perhaps a simple invocation of the versions-m-p:update-parent after archetype is done building the new project would be sufficient? Whether this is integrated into the archetype plugin directly or left as a manual step would be another question... Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Activate two profiles at default
If those tests should always run, why have them in a profile?? On 23.07.2012 17:26, Andreas Riedel wrote: Hello users, I have the following problem: - One system must be compiled with two different JDK. - I have two test suites, one for smoke test, one for all. Base scenario: - Two profiles, 'SmokeTest' activate by default, 'All' activate by switch -P. - One additional profile with dependencies only required for build by JDK 1.5. At JDK 1.6 these dependencies are part of the JDK itself. In the POM this is realize as follow: profiles profile idsmokeTest/id activation activeByDefaulttrue/activeByDefault /activation build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration suiteXmlFiles suiteXmlFilesrc/test/misc/smoke.testng.xml/suiteXmlFile /suiteXmlFiles /configuration /plugin /plugins /build /profile profile idjdk__1_5/id activation jdk1.5/jdk /activation dependencies ... /dependencies /profile profile idbroadsideTest/id build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration suiteXmlFiles suiteXmlFile../suiteXmlFile suiteXmlFile../suiteXmlFile suiteXmlFile../suiteXmlFile suiteXmlFile../suiteXmlFile suiteXmlFile../suiteXmlFile suiteXmlFile../suiteXmlFile suiteXmlFile../suiteXmlFile suiteXmlFile../suiteXmlFile /suiteXmlFiles /configuration /plugin /plugins /build /profile /profiles What I need: - Default test to run should always be the smoketest. - Under JDK 1.5 the dependencies should be included, but the smoke test should also run. And this is the problem: - Under jdk 1.6 it works correct. - With JDK 1.5 the profile for JDK 1.5 is taken. I understand the logic, but for this scenario it is wrong. It should be taken the dependencies from JDK 1.5 profiles and additionally the smoketest should run. - This means, the default behaviour should be something like: mvn help:active-profiles -P smokeTest The following profiles are active: - smokeTest (source: pom) - jdk__1_5 (source: pom) Any idea what would be the best way to realize this? TIA Andraes - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Skinny WARs -- why only WARs?
Hi, I just found this feature in the EAR-plugin and wanted to try it out. I like what it does, but I need it to do this on more than just WAR artifacts! In my case, I have an EAR artifact, containing a WAR and a SAR... Both contain several libraries that I would like to have pulled up into the EAR, so the artifact will be as small as possible -- and I won't get any classloader issues when connecting from the WAR to the SAR. Is this possible with the current version of the ear-plugin or do I need to do this manually? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Skinny WARs -- why only WARs?
OK, so I found the reason why it is not working with SARs -- or anything besides WARs actually. The 'WebModule' is the only class that returns an actual value for 'getLibDir()', which is used to look for the dependencies. Opened a JIRA (http://jira.codehaus.org/browse/MEAR-153) to have this added in the other modules as well. On 06.07.2012 11:44, Asmann, Roland wrote: Hi, I just found this feature in the EAR-plugin and wanted to try it out. I like what it does, but I need it to do this on more than just WAR artifacts! In my case, I have an EAR artifact, containing a WAR and a SAR... Both contain several libraries that I would like to have pulled up into the EAR, so the artifact will be as small as possible -- and I won't get any classloader issues when connecting from the WAR to the SAR. Is this possible with the current version of the ear-plugin or do I need to do this manually? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Generating resources based on classes
Thanks Wayne, I'll give those a look. On 24-02-12 18:01, Wayne Fay wrote: I want to generate a couple of resources based on the classes I have in my project. Therefor, I have 2 questions: - How do I get the classpath for the plugin correct? I need access to my classes and it's dependencies. - In which phase should I put this plugin? The phase I would normally use (generate-resources) occurs before the actual compiling of my classes... Or should I move the compiler to an earlier phase? Can you think of any other plugins that need similar behavior? If so, you can look at those plugins to see how they are doing the same thing. Perhaps jaxb or jaxws or similar plugins would be a place to start. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Added source directory still allows for compile errors
Maybe a dumb question, but: are there already sources in that directory? It seems to me it is only added to your build, but I don't see a plugin writing something there... Roland On 21.02.2012 10:02, Stephane-3 wrote: Hello, I have a Maven build that correctly adds a source directory, or so it seems. The pom file: plugin groupIdorg.codehaus.mojo/groupId artifactIdbuild-helper-maven-plugin/artifactId version1.7/version executions execution idadd-source/id phasegenerate-sources/phase goals goaladd-source/goal /goals configuration sources source${basedir}/client/generated/cxf/source /sources /configuration /execution /executions /plugin The log says: [INFO] [build-helper:add-source {execution: add-source}] [INFO] Source directory: /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/generated/cxf added. The full log output: [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] webapp-on-abcdata [INFO] webapp-on-abcdata-client [INFO] webapp-on-abcdata-web [INFO] [INFO] Building webapp-on-abcdata [INFO] task-segment: [clean, install] [INFO] [INFO] [clean:clean {execution: default-clean}] [INFO] [build-helper:add-source {execution: add-source}] [INFO] Source directory: /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/generated/cxf added. [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] [install:install {execution: default-install}] [INFO] Installing /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/pom.xml to /home/stephane/.m2/repository/no/nki/webapp-on-abcdata/1.0-SNAPSHOT/webapp-on-abcdata-1.0-SNAPSHOT.pom [INFO] [INFO] Building webapp-on-abcdata-client [INFO] task-segment: [clean, install] [INFO] [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting file set: /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target (included: [**], excluded: []) [INFO] [build-helper:add-source {execution: add-source}] [INFO] Source directory: /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/client/generated/cxf added. [INFO] [resources:resources {execution: default-resources}] [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 4 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 2 source files to /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target/classes [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/src/test/resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target/webapp-on-abcdata-client-1.0-SNAPSHOT.jar [INFO] [install:install {execution: default-install}] [INFO] Installing /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/client/target/webapp-on-abcdata-client-1.0-SNAPSHOT.jar to /home/stephane/.m2/repository/no/nki/webapp-on-abcdata-client/1.0-SNAPSHOT/webapp-on-abcdata-client-1.0-SNAPSHOT.jar [INFO] [INFO] Building webapp-on-abcdata-web [INFO] task-segment: [clean, install] [INFO] [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting file set: /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/target (included: [**], excluded: []) [INFO] [build-helper:add-source {execution: add-source}] [INFO] Source directory: /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/client/generated/cxf added. [INFO] [resources:resources {execution: default-resources}] [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 0 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 4 source files to /home/stephane/work/nki/dev/java/projects/webapp-on-abcdata/web/target/classes [INFO]
Generating resources based on classes
Hi all, I want to generate a couple of resources based on the classes I have in my project. Therefor, I have 2 questions: - How do I get the classpath for the plugin correct? I need access to my classes and it's dependencies. - In which phase should I put this plugin? The phase I would normally use (generate-resources) occurs before the actual compiling of my classes... Or should I move the compiler to an earlier phase? The point is, I need to access the classes from 'src/main/java', and I figured the easiest way would be to access them after they have been compiled, so I can just trigger methods on them like any normal java object. Thanks, Roland -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Deploying snapshots of same artifactId but different types
Try uploading all at once using 'files', 'types' and 'classifiers'. Or if you are on Nexus, deploy them using the UI, you can attach multiple artifacts there. On 26.01.2012 15:08, jerem wrote: Hi, Using Maven 2.2.1, I deployed (with deploy:deploy-file through command-line) several artifacts with same version (SNAPSHOT), same artifactId and groupId, but different types. Here is the list I get in my nexus storage: myArtifact-1.0-20120106.101541-1.ear myArtifact-1.0-20120106.101541-1.ear.md5 myArtifact-1.0-20120106.101541-1.ear.sha1 myArtifact-1.0-20120106.101541-1.pom myArtifact-1.0-20120106.101541-1.pom.md5 myArtifact-1.0-20120106.101541-1.pom.sha1 myArtifact-1.0-20120106.101603-2.jar myArtifact-1.0-20120106.101603-2.jar.md5 myArtifact-1.0-20120106.101603-2.jar.sha1 myArtifact-1.0-20120106.101603-2.pom myArtifact-1.0-20120106.101603-2.pom.md5 myArtifact-1.0-20120106.101603-2.pom.sha1 myArtifact-1.0-20120106.101622-3.pom myArtifact-1.0-20120106.101622-3.pom.md5 myArtifact-1.0-20120106.101622-3.pom.sha1 myArtifact-1.0-20120106.101622-3.war myArtifact-1.0-20120106.101622-3.war.md5 myArtifact-1.0-20120106.101622-3.war.sha1 maven-metadata.xml maven-metadata.xml.md5 maven-metadata.xml.sha1 The problem now is that if I add the following dependency to a module pom : dependency groupIdmyGroup/groupId artifactIdmyArtifact/artifactId version1.0-SNAPSHOT/version typeear/type /dependency ... build fails with following error : [INFO] snapshot myGroup:myArtifact:1.0-SNAPSHOT: checking for updates from MYREPO Downloading: http://host/nexus/content/repositories/MYREPO//myGroup/myArtifact/1.0-SNAPSHOT/myArtifact-1.0-20120106.101622-3.pom 471b downloaded (myArtifact-1.0-20120106.101622-3.pom) Downloading: http://host/nexus/content/repositories/MYREPO//myGroup/myArtifact/1.0-SNAPSHOT/myArtifact-1.0-20120106.101622-3.ear [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. What happens is that maven, for this artifact, gets timestamp-3 as last snapshot version (for the pom), and then tries to retrieve the ear with this same version with timestamp-3, and in our case, it does not exist. If I only leave the timestamp-1 pom, and rename the war so it has same version (timestamp-1), then it works and maven is able to download 1.0-SNAPSHOT of both ear or war. I tried generatePom=false for second deploy command but result was the same - except that only 1 pom was generated of course. I should I have deployed the war and ear in first place to avoid this issue ? Thanks, Jeremie -- View this message in context: http://maven.40175.n5.nabble.com/Deploying-snapshots-of-same-artifactId-but-different-types-tp5432928p5432928.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Settings-file and invoker-plugin
Hi all, When running my projects on Jenkins, I need to set the settings-file (-s /path/to/settings.xml). I've hit my toes a couple of times now on the fact that I than also have to set the settings-file for the invoker-plugin (-Dinvoker.settingsFile=/path/to/settings.xml). Why doesn't the invoker use the file that was given with -s? I can understand that it takes the default settings when no configuration is give, but having the plugin actually use a different settings-file when running Maven with an explicit settings-file is kind of weird. Anyway, is there a way to get the invoker-plugin to use the settings-file that I set at the command-line? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Settings-file and invoker-plugin
My use-case is also running integration tests. However, I don't want to have several different settings.xml files (unless it becomes necessary). So, I created one that works for me (user/pw on servers, proxy, repositories -- especially using the 'normal' local repo as a remote for the invoker) and had this copied onto our Jenkins. Now, I use these settings in both my normal builds and my invoker integration-tests. So, what I would like, is when running Maven with the -s command, the invoker should pick this up as the default settings. Or if there is a way to get the location of the settings.xml file using a variable, I can configure my invoker-plugin to use it automatically. Is there some way to solve this or will I just have to live with adding 2 parameters when running Maven? On 16.01.2012 10:12, Stephen Connolly wrote: Most people use invoker to run integration tests of their maven plugins. As such, when running integration tests, you typically will have a test settings.xml so that the test environment will be constant. There is the issue of when you are behind a proxy, to solve this issue (as sometimes you need absolute control over the test env settings) there is mrm-maven-plugin @ mojo, that fires up a local Mock Repository Manager which will use your settings.xml to retrieve artifacts not available in your local repository so that the invoker based tests can still have the required environment, but work behind a proxy. What is your use-case? On 16 January 2012 08:43, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, When running my projects on Jenkins, I need to set the settings-file (-s /path/to/settings.xml). I've hit my toes a couple of times now on the fact that I than also have to set the settings-file for the invoker-plugin (-Dinvoker.settingsFile=/path/to/settings.xml). Why doesn't the invoker use the file that was given with -s? I can understand that it takes the default settings when no configuration is give, but having the plugin actually use a different settings-file when running Maven with an explicit settings-file is kind of weird. Anyway, is there a way to get the invoker-plugin to use the settings-file that I set at the command-line? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Disabling Profiles during release
Hi all, I have this company-wide POM that has several profiles that are activated when running on Jenkins. Now during the normal build of this POM, I tell Jenkins to deactivate several profiles, because they just can't run. Today I needed to make a release of this POM, and I tried to deactivate the profiles as well -- using -Darguments=-P!profile1,!profile2 etc. This does not seem to work however, so I am now unable to release this POM using Jenkins! Before, when I had to activate profiles, this worked just fine! Is it just not possible to deactivate profiles or am I missing something here? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: download only sources
Maybe you can use the m-dependency-p or m-assembly-p to copy and/or assemble these JARs. You can add a dependency to these JARs in a small POM for that. Roland On 28.11.2011 11:03, Prashant Neginahal wrote: Hi, We need to hand over source code to client after development. Unfortunately client do not have access to our nexus repository. Lets say we have projects projectA1.0, projectB1.0 and I need to give projectA1.0-sources.jar and projectA1.0--tests-sources.jar to client. I am looking simple way to only download source jars to my to special repository(not the regular development local repository) for each of my required projects. Please someone advice. Thanks -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Hi Karl Heinz, Look at the configuration for the WAR-plugin, you can have it create a separate JAR for the classes, which you can then use as a dependency. Roland On 23.11.2011 13:10, Karl Heinz Marbaise wrote: Hi to all, i have a larger structure of modules which built a multi-module-build which contains (an excerpt of my structure) the following two modules where my problem is focused on: root +-- mod-war +-- mod-it where the mod-war obviously contains the WAR module with the web-application (packaging war) and the mod-it contains the integration tests. So my problem is that i can't use a Class which is defined in the mod-war package under src/main/java//ClassName.java in my Integration test (src/test/java/XYZIT.java) I already have a dependency to my mod-war to make sure the reactor will build the mod-war before mod-it ... Here my snippet from the mod-it POM: dependency groupId${project.groupId}/groupId artifactIdmod-war/artifactId version${project.version}/version typewar/type scopetest/scope /dependency So the question is: Does exist a solution? Or do i need to define a separate module with my classes which i would like to use in my integration tests and in the mod-war ? Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016434.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Hello Karl Heinz, Where does it say that the sources must be in src/main/webapp? As with all plugins, sources should be in src/main/java (like you have now). I think you need the parameter 'attachClasses', I am not 100% sure if 'archiveClasses' is necessary as well. I've used it before (albeit a little while back so I can't remember all the details) and it does what you want. Roland On 23.11.2011 13:28, Karl Heinz Marbaise wrote: Hi, first thanks for the answer, but the problem is my classes are located in the src/main/java area and not in src/main/webapp folderThe configuration for the war-plugin (archiveClasses) will only create a jar from classes in the src/main/webapp folder...where i don't have any classes only jsp(x), css files, images etc. My classes are located in src/main/java ... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016484.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
I just tried this on an old project, and with only the 'attacheClasses'-attribute, it works just fine for me... Might be a dumb question, but: are you using the right version of the plugin? Roland On 23.11.2011 13:55, Karl Heinz Marbaise wrote: hi, i have added both parameters to the configuration of the maven-war-plugin but it doesn't create a separate jar file...so no luck... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016562.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Strange, that's the same version I am using... Could you post a part of the POM and maybe some output you get? Maybe we can see something in there... On 23.11.2011 14:29, Karl Heinz Marbaise wrote: Hi, Asmann, Roland wrote I just tried this on an old project, and with only the 'attacheClasses'-attribute, it works just fine for me... Might be a dumb question, but: are you using the right version of the plugin? it's not a dump question... ;-) I'm using maven-war-plugin (2.1.1) most up-to-date version of the plugin...rechecked it ... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016649.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
If you use 'attachClasses', the JAR should NOT be created in the lib-folder, but in the target. When using 'archiveClasses' it is created in the lib-folder. A dependency on that JAR should be on a JAR (not the WAR) and add classifier 'classes'. On 23.11.2011 14:42, Karl Heinz Marbaise wrote: Hi, i've looked into the wrong location oversight ... sorry ;-( the jar file is created in the WEB-INF/lib/ folder and not in the target folder but now i'm trying to use it as dependency for my integration test module and use classes from therebut this seemed to be not working... Hm Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016683.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Here's a small example... Check if it works for you, because it definitely does for me... Roland On 23.11.2011 16:52, Karl Heinz Marbaise wrote: Hi, Asmann, Roland wrote If you use 'attachClasses', the JAR should NOT be created in the lib-folder, but in the target. When using 'archiveClasses' it is created in the lib-folder. It is correct that a file artifactid-version-classes.jar is created in the target folder (with attachClasses), but that does not contain the classes from src/main/java. The documentation says it will put the classes from the src/main/webapp/WEB-INF/classes folder into this jar... The jar which is created in the target/artifactid-version/WEB-INF/lib/artifact-version.jar contains the classes from src/main/javabut can't be correctly be used as a dependencyit will produce a problems during the build, cause it will try to download that jar from the repo-manager...which does not exists... Asmann, Roland wrote A dependency on that JAR should be on a JAR (not the WAR) and add classifier 'classes'. Will not work based on the above description I've got the impression this looks like a bug in the Maven-War-Pluginor a misunderstanding on my site... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5017124.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
No attachments allowed? I'll send it to you directly. On 23.11.2011 17:08, Asmann, Roland wrote: Here's a small example... Check if it works for you, because it definitely does for me... Roland On 23.11.2011 16:52, Karl Heinz Marbaise wrote: Hi, Asmann, Roland wrote If you use 'attachClasses', the JAR should NOT be created in the lib-folder, but in the target. When using 'archiveClasses' it is created in the lib-folder. It is correct that a file artifactid-version-classes.jar is created in the target folder (with attachClasses), but that does not contain the classes from src/main/java. The documentation says it will put the classes from the src/main/webapp/WEB-INF/classes folder into this jar... The jar which is created in the target/artifactid-version/WEB-INF/lib/artifact-version.jar contains the classes from src/main/javabut can't be correctly be used as a dependencyit will produce a problems during the build, cause it will try to download that jar from the repo-manager...which does not exists... Asmann, Roland wrote A dependency on that JAR should be on a JAR (not the WAR) and add classifier 'classes'. Will not work based on the above description I've got the impression this looks like a bug in the Maven-War-Pluginor a misunderstanding on my site... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5017124.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven release plugin with jboss packaging maven plugin
Try configuring release:prepare to do an 'install' instead of just a 'verify'... There's (still?) a problem with releasing a WAR or EAR package in Maven... Roland On 29.07.2011 15:23, Tiago António Neves wrote: Hi all, I’m using codehaus jboss-packaging-maven-plugin to get a sar. I’m then deploying this jboss-sar inside an ear. Pom A: groupIdpt.nevaco/groupId artifactIdchildren1/artifactId version1.0.0-SNAPSHOT/version packagingjboss-sar/packaging build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjboss-packaging-maven-plugin/artifactId version2.1.1/version extensionstrue/extensions /plugin /plugins /build Pom B: groupIdpt.nevaco/groupId artifactIdchildren2/artifactId version1.0.0-SNAPSHOT/version packagingear/packaging dependencies dependency groupIdpt.nevaco/groupId artifactIdchildren1/artifactId version${version}/version /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ear-plugin/artifactId version2.5/version configuration displayNameNevaco EAR/displayName version1.4/version fileNameMappingno-version/fileNameMapping modules sarModule groupIdpt.nevaco/groupId artifactIdchildren1/artifactId /sarModule /modules /configuration /plugin /plugins /build The problem is that when I run mvn release:prepare it seems to don’t understand that the sar is from my project and tries to download it from the repos [INFO] [INFO] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] [INFO] [INFO] Failed to resolve artifact. [INFO] [INFO] Missing: [INFO] -- [INFO] 1) pt.nevaco:children1:sar:1.0.0 [INFO] [INFO] Try downloading the file manually from the project website. [INFO] [INFO] Then, install it using the command: [INFO] mvn install:install-file -DgroupId=pt.nevaco -DartifactId=children1 -Dversion=1.0.0 -Dpackaging=sar -Dfile=/path/to/file [INFO] [INFO] Alternatively, if you host your own repository you can deploy the file there: [INFO] mvn deploy:deploy-file -DgroupId=pt.nevaco -DartifactId=children1 -Dversion=1.0.0 -Dpackaging=sar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [INFO] [INFO] Path to dependency: [INFO] 1) pt.nevaco:children2:ear:1.0.0 [INFO] 2) pt.nevaco:children1:sar:1.0.0 [INFO] [INFO] -- [INFO] 1 required artifact is missing. [INFO] [INFO] for artifact: [INFO] pt.nevaco:children2:ear:1.0.0 [INFO] [INFO] from the specified remote repositories: [INFO] central (http://xxx/xxx-releases), [INFO] repo (http://xxx/repo), [INFO] snapshots (http://xxx/xxx-snapshots) [INFO] [INFO] [INFO] [INFO] [INFO] [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] [INFO] [INFO] Total time: 12 seconds [INFO] [INFO] Finished at: Fri Jul 29 13:35:02 BST 2011 [INFO] [INFO] Final Memory: 42M/362M [INFO] [INFO] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Maven execution failed, exit code: '1' [INFO] Any ideas/workaround Tiago Neves cid:image001.jpg@01CB84E5.0C98AA60 ** *Tiago António da Silva Vaz Neves * Sistemas de Suporte às Operações SSO4 - Controlo de Processos de Operação tlm: (+351) 96 911 38 28 fax: (+351) 234 403 588 tiago-a-ne...@ptinovacao.pt mailto:tiago-a-ne...@ptinovacao.pt -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Triggering generation of archetype from pom-file
Hi, I am trying to setup a project by configuring the archetype-plugin in my POM. The problem I am running into is that I don't know how to tell the archetype about 'groupId', 'artifactId' and 'version' for the new project... Is there any way I can set these for the plugin? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Explaining to m-eclipse-p that my project is a java-project
Hi, I am having some issues explaining to the m-eclipse-p that my project is actually a java-project and needs to be generated with a .classpath and java-nature. The problem I am facing is that the project is actually of type 'maven-archetype', but I would really like to see my resources and tests in the nice java-layout in eclipse. Anybody have an idea on how to achieve this? -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Programmatically instantiating a pom.xml as a MavenProject
Hi all, I am trying to read a pom.xml and instantiate it as a MavenProject for testing. I am able to read it using the Xpp3Reader and then I gave the Model to a MavenProject. The problem now, is that most of my attributes are not set. The most important one for me (at the moment) is the parent, which for some reason is null in the MavenProject. It is correctly set in the Model though. Do I need to instantiate the MavenProject differently or tell it to resolve all attributes or something? Current code is this: MavenXpp3Reader reader = new MavenXpp3Reader(); Model model = reader.read(pomFile); MavenProject project = new MavenProject(model); return project.getParent(); Any help is appreciated! Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Programmatically instantiating a pom.xml as a MavenProject
That won't work for me, I don't want to run the whole build. I just want to have an instantiated MavenProject and call methods on it, not run the build. On 26-06-11 16:45, Ansgar Konermann wrote: Am 26.06.2011 16:07, schrieb Asmann, Roland: I am trying to read a pom.xml and instantiate it as a MavenProject for testing. You also might want to have a look at http://maven.apache.org/shared/maven-invoker/ http://maven.apache.org/plugins/maven-invoker-plugin/ http://maven.apache.org/ref/3.0.3/maven-embedder/ I use maven invoker plugin to instantiate poms for testing purposes, and it works great. Depending on your needs, maven-invoker and maven-embedder might be better for your case. AFAIK, the approach you currently follow using Xpp3Reader will give you a static XML-like model of the pom's xml text (think JAXB or JDOM), but this is far from a fully initialized maven project. Best regards Ansgar - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoker-Plugin not using correct settings-file
Hmmm... On one side it sounds very logical, on the other it doesn't... At least it explains a couple of other issues I was having -- although they weren't influencing my build this much. Thanks! On 22-06-11 21:12, Stephen Connolly wrote: ahh. you have configured the plugin directly. to get what you want you need to configure the property in your pom rather than define the value in your configuration section (the default if unspecified is to use the property, but by specifying it, the property is ignored) - Stephen --- Sent from my Android phone, so random spelling mistakes, random nonsense words and other nonsense are a direct result of using swype to type on the screen On 22 Jun 2011 17:33, Asmann, Rolandroland.asm...@adesso.at wrote: -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoker-Plugin not using correct settings-file
I just tried this with a settings-file that should have stopped my build (because it doesn't point to my inhouse-repository) and has no reference to '@localRepositoryUrl@', but it is actually copying the artifacts from the original localRepo. This means the usage of '-Dinvoker.settingsFile' is NOT overriding the configuration in the POM! So not a Jenkins issue, but one with Maven itself! I'm running Maven 2.2.1 and am using m-invoker-p 1.5. Any ideas/suggestions? Roland On 21.06.2011 19:57, Asmann, Roland wrote: I have to admit: no, not yet. I have to put a settings-file somewhere that throws me an error, otherwise I'll never know if it works. I'll give that a try tomorrow, and update this thread according. Roland On 21-06-11 19:11, Anders Hammar wrote: Have you tried executing your Maven build specifying -Dinvoker.settingsFile=my-settings-file from command line on your pc. If it works the issue is related to Jenkins. It should work as it should override the pom configured value. /Anders On Tue, Jun 21, 2011 at 18:56, Asmann, Rolandroland.asm...@adesso.atwrote: Hi all, I configured the invoker-plugin in my POM to use the settings-file in ${maven.home}/conf/settings.xml -- which works fine for local development. However, when running my Projects on Jenkins, I have configured the project with a different settings-file, since the Maven on the server uses the default file that came with the Maven-Install. I told Jenkins to run the job with '-smy-settings-file' and added '-Dinvoker.settingsFile=my-settings-file' to let the invoker now as well. The problem is, the invoker is still trying to open '${maven.home}/conf/settings.xml' on which Jenkins apparently has no read-access (don't ask me why other builds work, I am not allowed to access the server directly). Can it be that the configuration given with '-D' does not override the configuration in the POM? Is there a way to get around this problem and get my build running on both Jenkins and a developer-machine? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Invoker-Plugin not using correct settings-file
Hi all, I configured the invoker-plugin in my POM to use the settings-file in ${maven.home}/conf/settings.xml -- which works fine for local development. However, when running my Projects on Jenkins, I have configured the project with a different settings-file, since the Maven on the server uses the default file that came with the Maven-Install. I told Jenkins to run the job with '-s my-settings-file' and added '-Dinvoker.settingsFile=my-settings-file' to let the invoker now as well. The problem is, the invoker is still trying to open '${maven.home}/conf/settings.xml' on which Jenkins apparently has no read-access (don't ask me why other builds work, I am not allowed to access the server directly). Can it be that the configuration given with '-D' does not override the configuration in the POM? Is there a way to get around this problem and get my build running on both Jenkins and a developer-machine? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoker-Plugin not using correct settings-file
I have to admit: no, not yet. I have to put a settings-file somewhere that throws me an error, otherwise I'll never know if it works. I'll give that a try tomorrow, and update this thread according. Roland On 21-06-11 19:11, Anders Hammar wrote: Have you tried executing your Maven build specifying -Dinvoker.settingsFile=my-settings-file from command line on your pc. If it works the issue is related to Jenkins. It should work as it should override the pom configured value. /Anders On Tue, Jun 21, 2011 at 18:56, Asmann, Rolandroland.asm...@adesso.atwrote: Hi all, I configured the invoker-plugin in my POM to use the settings-file in ${maven.home}/conf/settings.xml -- which works fine for local development. However, when running my Projects on Jenkins, I have configured the project with a different settings-file, since the Maven on the server uses the default file that came with the Maven-Install. I told Jenkins to run the job with '-smy-settings-file' and added '-Dinvoker.settingsFile=my-settings-file' to let the invoker now as well. The problem is, the invoker is still trying to open '${maven.home}/conf/settings.xml' on which Jenkins apparently has no read-access (don't ask me why other builds work, I am not allowed to access the server directly). Can it be that the configuration given with '-D' does not override the configuration in the POM? Is there a way to get around this problem and get my build running on both Jenkins and a developer-machine? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Why is this profile not being activated?
Hi all, I have this profile defined in a parent-POM: profile iddefault-code-coverage/id activation file existssrc/main/java/exists /file /activation /profile Now, in several child-projects it will not be activated, because there are no sources (WAR, EAR or simple resource-projects). However, it is also not working on the projects that DO have sources... Can anybody tell me what I am doing wrong here? I'm running Maven 2.2.1. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is this profile not being activated?
OK, so why isn't this one activated? It should be imho... On 10.06.2011 15:53, Stephen Connolly wrote: profiles are not inherited... the results of activating them in the reactor are inherited On 10 June 2011 14:48, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I have this profile defined in a parent-POM: profile iddefault-code-coverage/id activation file existssrc/main/java/exists /file /activation /profile Now, in several child-projects it will not be activated, because there are no sources (WAR, EAR or simple resource-projects). However, it is also not working on the projects that DO have sources... Can anybody tell me what I am doing wrong here? I'm running Maven 2.2.1. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is this profile not being activated?
Still, my question remains: WHY isn't this profile activated? I don't want to have to add it to the command-line. This is a parent that will be used company-wide and I don't want all developers to have to add a profile to their command-lines. I also don't want the plugin in there (cobertura) to run everytime, because on some of my modules (which have only no sources, that's why I wanted to activate this way) it kills the performance with the alternative life-cycle! There has got to be a way to get around this problem... On 10.06.2011 16:29, David Durham wrote: I think the statement profiles are not inherited is not strictly true. Activation with file does not work on an inherited basis. But direct activation at the command line with -P does work, even if the profile is defined in a parent pom. On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland roland.asm...@adesso.at wrote: OK, so why isn't this one activated? It should be imho... On 10.06.2011 15:53, Stephen Connolly wrote: profiles are not inherited... the results of activating them in the reactor are inherited On 10 June 2011 14:48, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I have this profile defined in a parent-POM: profile iddefault-code-coverage/id activation file existssrc/main/java/exists /file /activation /profile Now, in several child-projects it will not be activated, because there are no sources (WAR, EAR or simple resource-projects). However, it is also not working on the projects that DO have sources... Can anybody tell me what I am doing wrong here? I'm running Maven 2.2.1. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is this profile not being activated?
It is not being activated, because the plugin I have defined (cobertura) doesn't run. I think it is quite obviously that this means that the profile isn't activated... On 10.06.2011 16:40, Rafael Vanderlei wrote: David, when we say profiles are not inherited it´s because it is really not inherited.. I mean.. if you define a profile in a parent with lots of configurations and then you define a profile with the same name in a child the configuration defined in the parent is not applyied to the child. The child has a new brand profile that happens to have the same name of the profile defined in the parent. And because they have the same name, they both get activated by -P, but they are two different profiles, each one with its own configuration. @Roland what makes you say profile is not being activated? For the configuration you showed before, you did not define any special behaviour to happen when the profile default-code-coverage is active. On Fri, Jun 10, 2011 at 11:29 AM, David Durham david.durham...@gmail.comwrote: I think the statement profiles are not inherited is not strictly true. Activation with file does not work on an inherited basis. But direct activation at the command line with -P does work, even if the profile is defined in a parent pom. On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland roland.asm...@adesso.at wrote: OK, so why isn't this one activated? It should be imho... On 10.06.2011 15:53, Stephen Connolly wrote: profiles are not inherited... the results of activating them in the reactor are inherited On 10 June 2011 14:48, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I have this profile defined in a parent-POM: profile iddefault-code-coverage/id activation file existssrc/main/java/exists /file /activation /profile Now, in several child-projects it will not be activated, because there are no sources (WAR, EAR or simple resource-projects). However, it is also not working on the projects that DO have sources... Can anybody tell me what I am doing wrong here? I'm running Maven 2.2.1. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is this profile not being activated?
I am indeed using option 2, and I understand that the profile itself is not inherited. What I do not understand is how and where it validates the existence of the file... The way I see it, it should validate this on the project being build. Clearly I am missing something here which is obvious to all of you, so please try to explain this to me. On 10.06.2011 16:51, Rafael Vanderlei wrote: Roland are you (1) defining the profile with the cobertura configuration in a pom of a project where src/main/java DOES exist or (2) are you defining it in a parent pom of a project where src/main/java does NOT exist and you are expecting it to work in child projects where src/main/java DOES exist ? If option 2, it will not work this way because the profile with cobertura configuration will not be inherited in the children On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland roland.asm...@adesso.atwrote: It is not being activated, because the plugin I have defined (cobertura) doesn't run. I think it is quite obviously that this means that the profile isn't activated... On 10.06.2011 16:40, Rafael Vanderlei wrote: David, when we say profiles are not inherited it´s because it is really not inherited.. I mean.. if you define a profile in a parent with lots of configurations and then you define a profile with the same name in a child the configuration defined in the parent is not applyied to the child. The child has a new brand profile that happens to have the same name of the profile defined in the parent. And because they have the same name, they both get activated by -P, but they are two different profiles, each one with its own configuration. @Roland what makes you say profile is not being activated? For the configuration you showed before, you did not define any special behaviour to happen when the profile default-code-coverage is active. On Fri, Jun 10, 2011 at 11:29 AM, David Durham david.durham...@gmail.comwrote: I think the statement profiles are not inherited is not strictly true. Activation with file does not work on an inherited basis. But direct activation at the command line with -P does work, even if the profile is defined in a parent pom. On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland roland.asm...@adesso.at wrote: OK, so why isn't this one activated? It should be imho... On 10.06.2011 15:53, Stephen Connolly wrote: profiles are not inherited... the results of activating them in the reactor are inherited On 10 June 2011 14:48, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I have this profile defined in a parent-POM: profile iddefault-code-coverage/id activation file existssrc/main/java/exists /file /activation /profile Now, in several child-projects it will not be activated, because there are no sources (WAR, EAR or simple resource-projects). However, it is also not working on the projects that DO have sources... Can anybody tell me what I am doing wrong here? I'm running Maven 2.2.1. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is this profile not being activated?
Could this be dependent on the version of Maven? Might I ask which version you are using? On 10.06.2011 22:37, Joakim Olsson wrote: Hmmm...We have a profile for packaging up our SoapUI-tests for regression-testing in the package-phase. The profile contains an execution of the maven-jar-plugin. The profile is specified in the parent of the root-POM of the reactor and it successfully activates only for projects containing a directory called src/sim-test. Regards Joakim On Fri, Jun 10, 2011 at 5:36 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: This is the nasty side of inheritance... so if you have a reactor with the parent in it, then the profile will be activated/no activated for the parent in the context of the parent pom within the reactor. if you don't have a reactor with the parent in it, then the pom file is actually hiding in your local repository, and oh look there will be no file in the sub-directory of your local repository where the pom is hiding (and it would be a bug if we activated based on the presence of the file in your local repo, so don't go thinking you can just cheat there) [i.e. the previous is just to try and get you to understand] when you use manual profile activation with -P then in evaluating the parent pom to build the reactor, we enable the profile within the parent pom, and anything that profile defines which is inheritable will be inherited... which is why you might think that profiles are inherited, when it is actually the effects of the profile that are inherited. I hope that makes sense for you -Stephen On 10 June 2011 15:58, Asmann, Roland roland.asm...@adesso.at wrote: I am indeed using option 2, and I understand that the profile itself is not inherited. What I do not understand is how and where it validates the existence of the file... The way I see it, it should validate this on the project being build. Clearly I am missing something here which is obvious to all of you, so please try to explain this to me. On 10.06.2011 16:51, Rafael Vanderlei wrote: Roland are you (1) defining the profile with the cobertura configuration in a pom of a project where src/main/java DOES exist or (2) are you defining it in a parent pom of a project where src/main/java does NOT exist and you are expecting it to work in child projects where src/main/java DOES exist ? If option 2, it will not work this way because the profile with cobertura configuration will not be inherited in the children On Fri, Jun 10, 2011 at 11:43 AM, Asmann, Roland roland.asm...@adesso.atwrote: It is not being activated, because the plugin I have defined (cobertura) doesn't run. I think it is quite obviously that this means that the profile isn't activated... On 10.06.2011 16:40, Rafael Vanderlei wrote: David, when we say profiles are not inherited it´s because it is really not inherited.. I mean.. if you define a profile in a parent with lots of configurations and then you define a profile with the same name in a child the configuration defined in the parent is not applyied to the child. The child has a new brand profile that happens to have the same name of the profile defined in the parent. And because they have the same name, they both get activated by -P, but they are two different profiles, each one with its own configuration. @Roland what makes you say profile is not being activated? For the configuration you showed before, you did not define any special behaviour to happen when the profile default-code-coverage is active. On Fri, Jun 10, 2011 at 11:29 AM, David Durham david.durham...@gmail.comwrote: I think the statement profiles are not inherited is not strictly true. Activation with file does not work on an inherited basis. But direct activation at the command line with -P does work, even if the profile is defined in a parent pom. On Fri, Jun 10, 2011 at 9:03 AM, Asmann, Roland roland.asm...@adesso.at wrote: OK, so why isn't this one activated? It should be imho... On 10.06.2011 15:53, Stephen Connolly wrote: profiles are not inherited... the results of activating them in the reactor are inherited On 10 June 2011 14:48, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I have this profile defined in a parent-POM: profile iddefault-code-coverage/id activation file existssrc/main/java/exists /file /activation /profile Now, in several child-projects it will not be activated, because there are no sources (WAR, EAR or simple resource-projects). However
Re: Why is this profile not being activated?
From what I've seen, the 'skip' parameter only exists on the instrument-plugin, not on the report. I don't want it to trigger the 'cobertura'-lifecycle, because this will trigger some other plugins that are *very* slow. The reason I want this configured in the parent, is that I can't influence all child-projects and I don't want to force all developers to change much in their POMs. They are already chagrined that they have to extend my POM, although they are starting to see the use of a common parent... On 10-06-11 23:01, Wendy Smoak wrote: On Fri, Jun 10, 2011 at 10:40 AM, Asmann, Roland roland.asm...@adesso.at wrote: I also don't want the plugin in there (cobertura) to run everytime, because on some of my modules (which have only no sources, that's why I wanted to activate this way) it kills the performance with the alternative life-cycle! Is this the problem you're actually trying to solve? The Cobertura plugin has a 'skip' parameter. In the modules where you *don't* want it to run, configure it to skip execution. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is this profile not being activated?
You won't see that, because the profiles in a parent are *not* shown in this list! This threw me off on a couple of occasions as well! On 10-06-11 23:13, David Durham wrote: On Fri, Jun 10, 2011 at 3:37 PM, Joakim Olssonjoa...@unbound.se wrote: Hmmm...We have a profile for packaging up our SoapUI-tests for regression-testing in the package-phase. The profile contains an execution of the maven-jar-plugin. The profile is specified in the parent of the root-POM of the reactor and it successfully activates only for projects containing a directory called src/sim-test. Have you verified this with the following? mvn help:active-profiles -Dave - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Why is this profile not being activated?
True. Simple explanation is that I don't want the plugin to run on our integration-tests, because they do a lot of stuff during the phase 'generate-test-resources' and 'process-test-resources'. And since these tests don't have sources, I figured using a profile would be the easiest way. That, or telling the plugin *not* to run, but this is not an option on the plugin... :-( On 10-06-11 23:14, Wendy Smoak wrote: On Fri, Jun 10, 2011 at 5:09 PM, Asmann, Rolandroland.asm...@adesso.at wrote: From what I've seen, the 'skip' parameter only exists on the instrument-plugin, not on the report. I don't want it to trigger the 'cobertura'-lifecycle, because this will trigger some other plugins that are *very* slow. The reason I want this configured in the parent, is that I can't influence all child-projects and I don't want to force all developers to change much in their POMs. They are already chagrined that they have to extend my POM, although they are starting to see the use of a common parent... Still... it seems like whatever problem you're having, it's not about profile activation, it's more about getting something fixed in the Cobertura plugin, so that it does not 'kill the performance' of your build. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: order of the unpacking from unpack-dependencys
Hi, You could perhaps try the unpack goal... You do have to add all the dependencies again, but that one should take the order in which the artifacts are listed. Roland On 12-05-11 15:52, David Bräutigam wrote: Hello,, i have the following strange problem with the unpack-dependencys in my pom. What i want is to unpack the scripts i need in the deploy directory. The problem is that i have multiple modules with the same scripts. Therefor to have a correct result they must be overwritten in the right order. Sadly unpack-dependencys does not care about the order in which i declare the dependency's. But strangely the order remains always the same so there must be a determining order. Could me help somebody to understand and hopefully manipulate the unpack order so that my project will be deployed correctly. Regards David -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Nested artifacts
Not 100% sure about this one, but you could try it with the dependency-plugin [1]. I believe it does not allow system-dependencies in its configuration, but judging from the sentence The artifact version is optional. If not set, the plugin will attempt to resolve it from the project dependencies and then the dependencyManagement section. [2] I think that if you add that dependency to your dependency(-management)-list with the correct path, it should work. Roland [1] http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html [2] http://maven.apache.org/plugins/maven-dependency-plugin/usage.html#The_dependency:unpack_mojo On 20:59, EJ Ciramella wrote: Is there a simple way to unpack a dependency then unpack an artifact that lives inside that dependency? We have several third party utilities stored in Nexus and referenced as dependencies, but I'd like to unpack a rar that is nested within a zip. Is there a maven 2 way or do I just rely on an ant task? Thanks in advance! CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Nested artifacts
Sorry, let me rephrase it all a bit (keep in mind that I am not saying it works, I am currently unable to test anything in Maven!): You need to configure the dependency-plugin to extract the ZIP and only AFTER that, try to unpack the RAR -- in a separate step. I believe there are a couple of phases that run WITHOUT Maven checking for the dependencies and crying about a missing one. If I can get around to playing with my laptop a bit, I might test this out and report back to you. In the mean-time, feel free to try this. One question that just popped into my mind: do you have to be in a certain phase when extracting or is any phase right for you? Roland On 11-05-11 21:46, EJ Ciramella wrote: Hmmm - kinda. Again, I'd like to unpack a rar that is nested within a zip. The dependency unpack bits even if it's a system scoped dependency will try and resolve that and it won't be there. :-/ I think I just need to shell out to ant... -Original Message- From: Asmann, Roland [mailto:roland.asm...@adesso.at] Sent: Wednesday, May 11, 2011 12:04 PM To: Maven Users List Subject: Re: Nested artifacts Not 100% sure about this one, but you could try it with the dependency-plugin [1]. I believe it does not allow system-dependencies in its configuration, but judging from the sentence The artifact version is optional. If not set, the plugin will attempt to resolve it from the project dependencies and then the dependencyManagement section. [2] I think that if you add that dependency to your dependency(-management)-list with the correct path, it should work. Roland [1] http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html [2] http://maven.apache.org/plugins/maven-dependency-plugin/usage.html#The_dependency:unpack_mojo On 20:59, EJ Ciramella wrote: Is there a simple way to unpack a dependency then unpack an artifact that lives inside that dependency? We have several third party utilities stored in Nexus and referenced as dependencies, but I'd like to unpack a rar that is nested within a zip. Is there a maven 2 way or do I just rely on an ant task? Thanks in advance! CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users
Re: Modify build order?
Take a look at the invoker-plugin, goal 'run' [1]. Roland [1] http://maven.apache.org/plugins/maven-invoker-plugin/run-mojo.html On 04.05.2011 14:56, motes motes wrote: I have the following projects (physically separated in svn) with the following structure: a |-- a.parent |-- pom.xml ... |-- a.child |-- pom.xml b |-- b.parent |-- pom.xml ... |-- b.child |-- pom.xml c |-- c.parent |-- pom.xml ... |-- c.child |-- pom.xml Now I would like to create an aggregator project where I can specify the order of how the above project (and their submodules) should be build, eg.: my.aggregator.build: a b c or: my.aggregator.build: b a c The problem is that the standard aggregator implementation: http://maven.apache.org/pom.html#Aggregation automatically computes the right order but I cannot use that since my interdependent projects does not have a fixed structure - a longer story. So is it possible to hardcode the order that projects should be build in a master pom file? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Modify build order?
I have never used the 'setupInclude' and 'pomInclude' myself, I use something along these lines: plugin artifactIdmaven-invoker-plugin/artifactId configuration goals goalclean/goal goalinstall/goal /goals javaHome${java.home}/javaHome noLogtrue/noLog streamLogstrue/streamLogs properties file.encoding${file.encoding}/file.encoding user.language${user.language}/user.language eclipse.build${eclipse.build}/eclipse.build eclipse.install${eclipse.install}/eclipse.install eclipse.workspace${eclipse.workspace}/eclipse.workspace /properties /configuration executions execution idequest-pom/id goals goalrun/goal /goals phaseinstall/phase configuration pom../../poms/equest/pom.xml/pom /configuration /execution execution idmaven-plugins/id goals goalrun/goal /goals phaseinstall/phase configuration pom../../maven-plugins/pom.xml/pom /configuration /execution !-- More executions here -- /executions /plugin The configuration part may not be completely necessary for you (eg javaHome), but I just included it the way I use it. Roland On 04.05.2011 21:29, morty wrote: I now added the master pom as a common parent for the below parent project poms: master |-- pom.xml (reference below parent projects as relative submodules) a |-- a.parent |-- pom.xml (parent for this pom is the master pom.xml) ... |-- a.child |-- pom.xml b |-- b.parent |-- pom.xml (parent for this pom is the master pom.xml) ... |-- b.child |-- pom.xml c |-- c.parent |-- pom.xml (parent for this pom is the master pom.xml) ... |-- c.child |-- pom.xml Now it runs the invoker plugin: [INFO] --- [INFO] Reactor Build Order: [INFO] [INFO] Master project [INFO] M3 C Parent Project [INFO] C Bundle [INFO] M3 B Parent Project [INFO] B Bundle [INFO] M3 A Parent Project [INFO] A Bundle [INFO] but it has no effect. I specify that it should run b.parent before any other projects: plugin artifactIdmaven-invoker-plugin/artifactId version1.5/version configuration setupIncludes setupInclude../m3.b.parent/pom.xml/setupInclude /setupIncludes pomIncludes pomInclude*/pom.xml/pomInclude /pomIncludes /configuration executions execution idintegration-test/id goals goalrun/goal /goals /execution /executions /plugin It seems that the only thing that has an effect on the order is the order specified in the modules tag: ... nameMaster project/name properties tycho-version0.11.0/tycho-version /properties modules module../m3.c.parent/module module../m3.b.parent/module module../m3.a.parent/module /modules ... result: [INFO] Reactor Summary: [INFO] [INFO] Master project SUCCESS [0.661s] [INFO] M3 C Parent Project ... SUCCESS [0.633s] [INFO] C Bundle .. SUCCESS [1.202s] [INFO] M3 B Parent Project ... SUCCESS [0.013s] [INFO] B Bundle .. SUCCESS [0.140s] [INFO] M3 A Parent Project ... SUCCESS [0.013s] [INFO] A Bundle .. SUCCESS [0.126s] [INFO] [INFO] BUILD SUCCESS I don't use the maven dependency manager since the projects are maven3/tycho MANIFEST first projects. Further parent/child relations are specified using relative paths in parent/module tags: parent artifactIdmaster/artifactId groupIdm3/groupId version1.0.0-SNAPSHOT/version relativePath../m3.master/relativePath /parent modelVersion4.0.0/modelVersion groupIdm3/groupId artifactIdb.parent/artifactId version1.0.0-SNAPSHOT/version packagingpom/packaging nameM3 B Parent Project/name modules module../m3.b.bundle/module /modules Is this the reason that maven3 falls back to use the order in the modules tag when determining the effective build order? -- View this message in context: http://maven.40175.n5.nabble.com/Modify-build-order-tp4369751p4370836.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at
Re: java file path in exec:java
I see your problem now. Would it be a problem for you to use ant to run the program instead of the exec-plugin? Then you could have Ant convert the path: pathconvert targetos=unix property=unix-path path location=${project.build.outputDirectory} / /pathconvert Now if there was a way to have this property available in Maven, you could use the exec-plugin, but I believe you can't access this property (${unix-path}) in Maven... Roland On 21.04.2011 1:17, Zilvinas Vilutis wrote: yes, I can do that, however ${project.build.outputDirectory} still generates C:\folder1\folder2\... etc :) Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, Apr 20, 2011 at 2:57 PM, Asmann, Roland roland.asm...@adesso.at wrote: What I meant was: don't use ${file.separator} and write '/' in your POM. Or do you have a reason you need the variable? On 20-04-11 23:51, Zilvinas Vilutis wrote: Exactly, but I need *maven* to generate those / :) I need the ${project.build.outputDirectory}${file.separator}orm.properties to contain / in the output, but it generates the path with \ slashes, e.g. C:\path to myproject\target\classes\orm.properties Regards Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, Apr 20, 2011 at 12:57 PM, Asmann, Roland roland.asm...@adesso.at wrote: Just use the character '/', it works on Windows! On 20-04-11 21:45, Zilvinas Vilutis wrote: Hi maven users! I'm trying to execute a java command and pass a path to a file as an argument: plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId configuration executablejava/executable workingDirectory${project.build.outputDirectory}/workingDirectory classpathScoperuntime/classpathScope arguments argument-c ${project.build.outputDirectory}${file.separator}orm.properties/argument /arguments mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass /configuration /plugin And I'm using maven properties to construct the filename: ${project.build.outputDirectory}${file.separator}orm.properties Unfortunately, I'm getting an exception from the java class I'm running: Caused by: java.io.FileNotFoundException: C:\path to my project\target\classes\orm.properties (The filename, directory name, or volume label syntax is incorrect) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) Most likely the it is using the argument and does not escape slashes to new java.io.File( filePath ) As I don't have access to source code of the class - is there any way to enforce maven use unix style path generation on windows? ( change slashes to / ) I tried to override the ${file.separator} property - but it seems to be read-only and doesn't help. Any ideas? Thank you! Žilvinas Vilutis E-mail: cika...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566
Re: java file path in exec:java
It seems gmaven might be able to help you out here: http://maven.40175.n5.nabble.com/Exporting-Ant-properties-to-Maven-td510023.html#a510117 http://pastebin.com/XsAdbbcY Roland On 21.04.2011 12:14, Asmann, Roland wrote: I see your problem now. Would it be a problem for you to use ant to run the program instead of the exec-plugin? Then you could have Ant convert the path: pathconvert targetos=unix property=unix-path path location=${project.build.outputDirectory} / /pathconvert Now if there was a way to have this property available in Maven, you could use the exec-plugin, but I believe you can't access this property (${unix-path}) in Maven... Roland On 21.04.2011 1:17, Zilvinas Vilutis wrote: yes, I can do that, however ${project.build.outputDirectory} still generates C:\folder1\folder2\... etc :) Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, Apr 20, 2011 at 2:57 PM, Asmann, Roland roland.asm...@adesso.at wrote: What I meant was: don't use ${file.separator} and write '/' in your POM. Or do you have a reason you need the variable? On 20-04-11 23:51, Zilvinas Vilutis wrote: Exactly, but I need *maven* to generate those / :) I need the ${project.build.outputDirectory}${file.separator}orm.properties to contain / in the output, but it generates the path with \ slashes, e.g. C:\path to myproject\target\classes\orm.properties Regards Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, Apr 20, 2011 at 12:57 PM, Asmann, Roland roland.asm...@adesso.at wrote: Just use the character '/', it works on Windows! On 20-04-11 21:45, Zilvinas Vilutis wrote: Hi maven users! I'm trying to execute a java command and pass a path to a file as an argument: plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId configuration executablejava/executable workingDirectory${project.build.outputDirectory}/workingDirectory classpathScoperuntime/classpathScope arguments argument-c ${project.build.outputDirectory}${file.separator}orm.properties/argument /arguments mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass /configuration /plugin And I'm using maven properties to construct the filename: ${project.build.outputDirectory}${file.separator}orm.properties Unfortunately, I'm getting an exception from the java class I'm running: Caused by: java.io.FileNotFoundException: C:\path to my project\target\classes\orm.properties (The filename, directory name, or volume label syntax is incorrect) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) Most likely the it is using the argument and does not escape slashes to new java.io.File( filePath ) As I don't have access to source code of the class - is there any way to enforce maven use unix style path generation on windows? ( change slashes to / ) I tried to override the ${file.separator} property - but it seems to be read-only and doesn't help. Any ideas? Thank you! Žilvinas Vilutis E-mail: cika...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790
Re: Only partial filtering of .bat with assembly
How about you don't let the assembly-plugin copy your resources, but have the resources-plugin do it? Roland On 21.04.2011 13:31, David Delbecq wrote: Thanks for the hint, but not an option. The bat does not only call the jar file, it actually does some logic on parameters, call several applications, manage temporary files. We are migrating to maven an application that mixes together .bat/.sh, java jars and perl scripts.. We will later migrate to full java if possible, but one step at a time ;) - Mail original - De: Karl Heinz Marbaise k...@soebes.de À: users@maven.apache.org Envoyé: Jeudi 21 Avril 2011 11:26:17 Objet: Re: Only partial filtering of .bat with assembly Hi, it looks like you are trying to build a BAT file which will call your java code...But for this purposes i would take a deeper look into the maven-appassembler-plugin which produces such kind of batch-file automatically... http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/ Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Only-partial-filtering-of-bat-with-assembly-tp4329257p4330450.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Only partial filtering of .bat with assembly
You might want to configure it to work around a bug though: artifactIdmaven-resources-plugin/artifactId configuration delimiters delimiter${*}/delimiter /delimiters useDefaultDelimitersfalse/useDefaultDelimiters /configuration Roland On 21.04.2011 13:38, Asmann, Roland wrote: How about you don't let the assembly-plugin copy your resources, but have the resources-plugin do it? Roland On 21.04.2011 13:31, David Delbecq wrote: Thanks for the hint, but not an option. The bat does not only call the jar file, it actually does some logic on parameters, call several applications, manage temporary files. We are migrating to maven an application that mixes together .bat/.sh, java jars and perl scripts.. We will later migrate to full java if possible, but one step at a time ;) - Mail original - De: Karl Heinz Marbaise k...@soebes.de À: users@maven.apache.org Envoyé: Jeudi 21 Avril 2011 11:26:17 Objet: Re: Only partial filtering of .bat with assembly Hi, it looks like you are trying to build a BAT file which will call your java code...But for this purposes i would take a deeper look into the maven-appassembler-plugin which produces such kind of batch-file automatically... http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/ Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Only-partial-filtering-of-bat-with-assembly-tp4329257p4330450.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Only partial filtering of .bat with assembly
The way I would do it, is create a directory called 'src/main/filter-resources' (or something similar, just NOT the default 'src/main/resources'!) and then configure the resource-plugin to run 'resources:copy-resources' to eg 'target/filtered-resources'. With filtering turned on of course. :-) Then you have the assembly-plugin configured to use 'target/filtered-resources' as input (resources? I'm not very familiar with the assembly-plugin!) for your assembly. I think this would do the trick. Just remember what I wrote in the parallel mail -- make sure you work around the @-bug! Roland On 21.04.2011 14:11, David Delbecq wrote: well, if i mark them as ressource they will be put in the jar file, no? - Mail original - De: Roland Asmann roland.asm...@adesso.at À: users@maven.apache.org Envoyé: Jeudi 21 Avril 2011 12:38:44 Objet: Re: Only partial filtering of .bat with assembly How about you don't let the assembly-plugin copy your resources, but have the resources-plugin do it? Roland On 21.04.2011 13:31, David Delbecq wrote: Thanks for the hint, but not an option. The bat does not only call the jar file, it actually does some logic on parameters, call several applications, manage temporary files. We are migrating to maven an application that mixes together .bat/.sh, java jars and perl scripts.. We will later migrate to full java if possible, but one step at a time ;) - Mail original - De: Karl Heinz Marbaise k...@soebes.de À: users@maven.apache.org Envoyé: Jeudi 21 Avril 2011 11:26:17 Objet: Re: Only partial filtering of .bat with assembly Hi, it looks like you are trying to build a BAT file which will call your java code...But for this purposes i would take a deeper look into the maven-appassembler-plugin which produces such kind of batch-file automatically... http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/ Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Only-partial-filtering-of-bat-with-assembly-tp4329257p4330450.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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: mvn eclipse plugin for multimodule proyect
Hello Fernando, You can call me 'Roland', that is my first name. ;-) If I understand correctly, you have a POM-file on your computer and run Maven on it. This will download/checkout/copy/... everything to your computer. Now, I presume that the POM you are using is *not* the one you call 'parent' in your structure, or is it? If not, I think the problem is that 'eclipse:eclipse' is called on the wrong project. If it is, there might be something else going on here. Please give me a little more background info on this! Also, I really like the idea you are having here. I do think this would be better as an archetype though, but that's just a matter of opinion. :-) Regards, Roland On 20-04-11 14:54, Fernando Wermus wrote: Asmann, I will explain everything We have a pom.xml for constructing all the developer environment separate from the pom's projects. We have, 1. use scm to checkout all proyects and bootstrap it. 2. copy eclipse to developer machine. 3. copy app server to developer machine 4. run eclipse:eclipse and eclipse:configure-workspace to set up code style and generate all eclipse proyects. We have a pom.xml which does activities from 1 to 4 and pom.xml which are part of the proyect. Our project's structure is the following: pom.xml (parent) pom.xml (project A) pom.xml (project B) pom.xml (project C) I am trying to run mvn eclipse:eclipse in parent pom.xml without any success. I am not sure if pom.xml for constructing developer environment run mvn eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is doing it in parent pom.xml without any success. thanks in advance this is my pom.xml for constructing developer environment: profile iddeveloper/id build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-scm-plugin/artifactId version1.1/version configuration username.../username password.../password checkoutDirectory.../checkoutDirectory scmVersion.../scmVersion wtpversion2.0/wtpversion scmVersionTypebranch/scmVersionType /configuration executions execution phaseverify/phase goals goalbootstrap/goal /goals /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId executions execution idcopio-eclipse/id phaseverify/phase configuration executablescp/executable arguments argument.../argument argument/opt/apps//argument /arguments /configuration goals goalexec/goal /goals /execution execution iddescomprimo-eclipse/id phaseverify/phase configuration executabletar/executable arguments argumentzxvf/argument argument/opt/apps/helios_jree.tar.gz/argument argument-C/argument argument/opt/apps//argument /arguments /configuration goals goalexec/goal /goals /execution ... /executions /plugin plugin artifactIdmaven-eclipse-plugin/artifactId version2.8/version
Re: java file path in exec:java
Just use the character '/', it works on Windows! On 20-04-11 21:45, Zilvinas Vilutis wrote: Hi maven users! I'm trying to execute a java command and pass a path to a file as an argument: plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId configuration executablejava/executable workingDirectory${project.build.outputDirectory}/workingDirectory classpathScoperuntime/classpathScope arguments argument-c ${project.build.outputDirectory}${file.separator}orm.properties/argument /arguments mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass /configuration /plugin And I'm using maven properties to construct the filename: ${project.build.outputDirectory}${file.separator}orm.properties Unfortunately, I'm getting an exception from the java class I'm running: Caused by: java.io.FileNotFoundException: C:\path to my project\target\classes\orm.properties (The filename, directory name, or volume label syntax is incorrect) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) Most likely the it is using the argument and does not escape slashes to new java.io.File( filePath ) As I don't have access to source code of the class - is there any way to enforce maven use unix style path generation on windows? ( change slashes to / ) I tried to override the ${file.separator} property - but it seems to be read-only and doesn't help. Any ideas? Thank you! Žilvinas Vilutis E-mail: cika...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: java file path in exec:java
What I meant was: don't use ${file.separator} and write '/' in your POM. Or do you have a reason you need the variable? On 20-04-11 23:51, Zilvinas Vilutis wrote: Exactly, but I need *maven* to generate those / :) I need the ${project.build.outputDirectory}${file.separator}orm.properties to contain / in the output, but it generates the path with \ slashes, e.g. C:\path to myproject\target\classes\orm.properties Regards Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, Apr 20, 2011 at 12:57 PM, Asmann, Roland roland.asm...@adesso.at wrote: Just use the character '/', it works on Windows! On 20-04-11 21:45, Zilvinas Vilutis wrote: Hi maven users! I'm trying to execute a java command and pass a path to a file as an argument: plugin groupIdorg.codehaus.mojo/groupId artifactIdexec-maven-plugin/artifactId configuration executablejava/executable workingDirectory${project.build.outputDirectory}/workingDirectory classpathScoperuntime/classpathScope arguments argument-c ${project.build.outputDirectory}${file.separator}orm.properties/argument /arguments mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass /configuration /plugin And I'm using maven properties to construct the filename: ${project.build.outputDirectory}${file.separator}orm.properties Unfortunately, I'm getting an exception from the java class I'm running: Caused by: java.io.FileNotFoundException: C:\path to my project\target\classes\orm.properties (The filename, directory name, or volume label syntax is incorrect) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.init(FileInputStream.java:106) Most likely the it is using the argument and does not escape slashes to new java.io.File( filePath ) As I don't have access to source code of the class - is there any way to enforce maven use unix style path generation on windows? ( change slashes to / ) I tried to override the ${file.separator} property - but it seems to be read-only and doesn't help. Any ideas? Thank you! Žilvinas Vilutis E-mail: cika...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: mvn eclipse plugin for multimodule proyect
Doesn't it create the files or are your projects not in Eclipse? You must import the projects yourself after the build, the plugin does *not* do this for you! On 19.04.2011 17:14, Fernando Wermus wrote: Hi all, I have a pom which is a multimodule proyect. I am using maven plugin eclipse for generating all the eclipse's proyects. But for reason, it doesn't create any. any help would be really appreciated -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn eclipse plugin for multimodule proyect
Can you post your configuration (if any) and the command you issue to run Maven? On 19.04.2011 17:44, Fernando Wermus wrote: What it does not create are the files for each eclipse project. Thus I cannot make the import. 2011/4/19 Asmann, Roland roland.asm...@adesso.at Doesn't it create the files or are your projects not in Eclipse? You must import the projects yourself after the build, the plugin does *not* do this for you! On 19.04.2011 17:14, Fernando Wermus wrote: Hi all, I have a pom which is a multimodule proyect. I am using maven plugin eclipse for generating all the eclipse's proyects. But for reason, it doesn't create any. any help would be really appreciated -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Release plugin tagging parent of trunk
Are you sure that your scm and maven-release-plugin/tagBase are correctly set? On 19.04.2011 18:01, Brent Smith wrote: Hello, I'm running into an issue when I do a release:prepare on a multi-module project where the tagging phase is tagging the parent of the trunk. I found a bug report about something similar here: http://jira.codehaus.org/browse/MRELEASE-562 however the workaround given in a related ticket which worked for some people (remoteTagging=false) doesn't seem to be working for me. I'm using a standard SVN structure --project trunk branches tags When the tag is created however it creates it from the \project folder, so it includes trunk as well as all branches and tags --project trunk branches tags --myTag trunk branches tags I tried using remoteTagging=false but in that case the tag fails because it tries to use a directory that is the parent of my workspace. Only the tag does this, the commit for updating the version info uses the proper location and executes immediately before the tag request. It seems like just the tag creation is adamant about being one level too deep. If anyone could shed some light on why this might be happening, or knows of a way to explicitly set which location to tag from I'd really appreciate it. I have recently refactored the project, adding an additional parent pom, however I've checked all the poms and the locations in them look proper. Thanks, Brent Brent Smith BScCS Software Developer, theREDspace Halifax, Nova Scotia, Canada Phone: 902.444.3490x3869 brent.sm...@theredspace.com -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Is it possible to run a mojo when using an archetype to start a project ?
Would it be OK if it runs after the archetype has been created? Afaik you can't have it run automatically, but you could add the parameter 'goals' to the call 'archetype:generate' to run your mojo... http://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html#goals On 19.04.2011 18:20, Gayard, Leonel wrote: Hi, The title of the message says it all. I'm currently trying to create an archetype. I understand that archetypes allow to generate new files from templates, using FreeMarker. But I'd like to be able to have some code, either in a Mojo or some quick script, that runs when the archetype is used to start a new project. Is this possible ? How to proceed ? I've also asked Stack Overflow, but no luck yet: http://stackoverflow.com/questions/5707677/making-a-maven-archetype-how-to-run-a-mojo-on-a-projects-generation Leonel - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Release plugin tagging parent of trunk
That looks correct to me... And thinking about it, tagBase can't be the reason for this, since the tag is actually in the right place. I'm afraid I don't know what else it could be... Maybe you could run a release with debug-output and read something out of that? If not, you could post it so all of us can take a crack at it. On 19.04.2011 19:45, Brent Smith wrote: The scm node seems correct, both developerConnection and connection are pointing at the trunk: connectionscm:svn:https://subversion.mycompany.com/java/project/trunk /connection I was under the impression that tagBase didn't need to be set if you were using a standard trunk/branches/tags layout and would affect where the tag was placed, not where it was tagged from. If I'm mistaken in this please let me know. I don't have anything special going on with the release plugin itself, I'm using -DautoVersionSubmodules=true but that's about it. Thanks, Brent Are you sure that your scm and maven-release-plugin/tagBase are correctly set? -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Assembling webapp only, but not make WAR file
Check the life-cycle phases and choose one that is just *before* 'package'. On 04.04.2011 10:26, Nguyen Tien Luong wrote: Here is the backtrace of MVN INSTALL [INFO] [war:war] [INFO] Packaging webapp [INFO] Assembling webapp[webapp] in [C:\Documents and Settings\webapp\target\webapp] [INFO] Dependency[Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}] has changed (was Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}). [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, version=14.0-194, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, ve [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}). [INFO] Processing war project [INFO] Copying webapp resources[C:\Documents and Settings\webapp\target\webapp] [INFO] Webapp assembled in[45999 msecs] [INFO] Building war: C:\Documents and Settings\webapp\target\webapp\target\baseline-webapp.war [INFO] [install:install] [INFO] Installing C:\Documents and Settings\webapp\target\webapp\target\webapp.war to D:\m2repo\com\webapp\0.0.1\webapp-0.0.1.war For some reason, I want just that maven do the Assembling (copy .class files, jar files to TARGET ) but not making the WAR file. Is that possbile ? Thanks Luong -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Assembling webapp only, but not make WAR file
Multi-module might be a problem. Because that way the other modules will not get installed either! If you do have them in your repository, Maven *should* copy them into the target-dir though, but they will be older versions. A question: why don't you want the WAR to be packaged? On 04.04.2011 10:54, Nguyen Tien Luong wrote: Thanks for your reply :x Is prepare-package that you want to mention ? I have multi-module project, and that the webapp depends on for example project-a that has its .java files and also depends on another artifact (jar) What I want is after execute an maven'lifecycle, I have in target of webapp (or somewhere else) the dependency of project-a, .class files of projects-a and also files of webapp When I do mvn prepare-package for the webapp, I did not copy the files of project-a in the webapp target's folder. I did somethings wrong or it is the way maven doing? Luong From: Asmann, Roland roland.asm...@adesso.at To: users@maven.apache.org users@maven.apache.org Sent: Mon, 4 April, 2011 10:32:35 Subject: Re: Assembling webapp only, but not make WAR file Check the life-cycle phases and choose one that is just *before* 'package'. On 04.04.2011 10:26, Nguyen Tien Luong wrote: Here is the backtrace of MVN INSTALL [INFO] [war:war] [INFO] Packaging webapp [INFO] Assembling webapp[webapp] in [C:\Documents and Settings\webapp\target\webapp] [INFO] Dependency[Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}] has changed (was Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}). [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, version=14.0-194, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, ve [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}). [INFO] Processing war project [INFO] Copying webapp resources[C:\Documents and Settings\webapp\target\webapp] [INFO] Webapp assembled in[45999 msecs] [INFO] Building war: C:\Documents and Settings\webapp\target\webapp\target\baseline-webapp.war [INFO] [install:install] [INFO] Installing C:\Documents and Settings\webapp\target\webapp\target\webapp.war to D:\m2repo\com\webapp\0.0.1\webapp-0.0.1.war For some reason, I want just that maven do the Assembling (copy .class files, jar files to TARGET ) but not making the WAR file. Is that possbile ? Thanks Luong -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Assembling webapp only, but not make WAR file
I believe you should try the war:exploded, this should do what you want... On 04.04.2011 11:13, Nguyen Tien Luong wrote: In fact when I have all files I need in target, I will copy directly to Application Server for testing. Sometime I modified only some JSP files, and if for testing I have to generate a new WAR file, it's painful T_T So there is no solution for my problem then ? Luong From: Asmann, Roland roland.asm...@adesso.at To: users@maven.apache.org users@maven.apache.org Sent: Mon, 4 April, 2011 11:06:07 Subject: Re: Assembling webapp only, but not make WAR file Multi-module might be a problem. Because that way the other modules will not get installed either! If you do have them in your repository, Maven *should* copy them into the target-dir though, but they will be older versions. A question: why don't you want the WAR to be packaged? On 04.04.2011 10:54, Nguyen Tien Luong wrote: Thanks for your reply :x Is prepare-package that you want to mention ? I have multi-module project, and that the webapp depends on for example project-a that has its .java files and also depends on another artifact (jar) What I want is after execute an maven'lifecycle, I have in target of webapp (or somewhere else) the dependency of project-a, .class files of projects-a and also files of webapp When I do mvn prepare-package for the webapp, I did not copy the files of project-a in the webapp target's folder. I did somethings wrong or it is the way maven doing? Luong From: Asmann, Roland roland.asm...@adesso.at To: users@maven.apache.org users@maven.apache.org Sent: Mon, 4 April, 2011 10:32:35 Subject: Re: Assembling webapp only, but not make WAR file Check the life-cycle phases and choose one that is just *before* 'package'. On 04.04.2011 10:26, Nguyen Tien Luong wrote: Here is the backtrace of MVN INSTALL [INFO] [war:war] [INFO] Packaging webapp [INFO] Assembling webapp[webapp] in [C:\Documents and Settings\webapp\target\webapp] [INFO] Dependency[Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}] has changed (was Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}). [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, version=14.0-194, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, ve [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}). [INFO] Processing war project [INFO] Copying webapp resources[C:\Documents and Settings\webapp\target\webapp] [INFO] Webapp assembled in[45999 msecs] [INFO] Building war: C:\Documents and Settings\webapp\target\webapp\target\baseline-webapp.war [INFO] [install:install] [INFO] Installing C:\Documents and Settings\webapp\target\webapp\target\webapp.war to D:\m2repo\com\webapp\0.0.1\webapp-0.0.1.war For some reason, I want just that maven do the Assembling (copy .class files, jar files to TARGET ) but not making the WAR file. Is that possbile ? Thanks Luong -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Assembling webapp only, but not make WAR file
Be carefull though, if you change anything in one of the other modules, you *must* run a mvn install to make them available in your WAR! Roland On 04.04.2011 11:39, Nguyen Tien Luong wrote: Yeah, it is :x The answer is : mvn prepare-packagewar:exploded Thanks Asmann for your instruction :x Luong From: Asmann, Roland roland.asm...@adesso.at To: users@maven.apache.org users@maven.apache.org Sent: Mon, 4 April, 2011 11:26:39 Subject: Re: Assembling webapp only, but not make WAR file I believe you should try the war:exploded, this should do what you want... On 04.04.2011 11:13, Nguyen Tien Luong wrote: In fact when I have all files I need in target, I will copy directly to Application Server for testing. Sometime I modified only some JSP files, and if for testing I have to generate a new WAR file, it's painful T_T So there is no solution for my problem then ? Luong From: Asmann, Roland roland.asm...@adesso.at To: users@maven.apache.org users@maven.apache.org Sent: Mon, 4 April, 2011 11:06:07 Subject: Re: Assembling webapp only, but not make WAR file Multi-module might be a problem. Because that way the other modules will not get installed either! If you do have them in your repository, Maven *should* copy them into the target-dir though, but they will be older versions. A question: why don't you want the WAR to be packaged? On 04.04.2011 10:54, Nguyen Tien Luong wrote: Thanks for your reply :x Is prepare-package that you want to mention ? I have multi-module project, and that the webapp depends on for example project-a that has its .java files and also depends on another artifact (jar) What I want is after execute an maven'lifecycle, I have in target of webapp (or somewhere else) the dependency of project-a, .class files of projects-a and also files of webapp When I do mvn prepare-package for the webapp, I did not copy the files of project-a in the webapp target's folder. I did somethings wrong or it is the way maven doing? Luong From: Asmann, Roland roland.asm...@adesso.at To: users@maven.apache.org users@maven.apache.org Sent: Mon, 4 April, 2011 10:32:35 Subject: Re: Assembling webapp only, but not make WAR file Check the life-cycle phases and choose one that is just *before* 'package'. On 04.04.2011 10:26, Nguyen Tien Luong wrote: Here is the backtrace of MVN INSTALL [INFO] [war:war] [INFO] Packaging webapp [INFO] Assembling webapp[webapp] in [C:\Documents and Settings\webapp\target\webapp] [INFO] Dependency[Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}] has changed (was Dependency {groupId=javax.servlet, artifactId=jstl, version=1.2, type=jar}). [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, version=14.0-194, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=ui-modules-api-jcp-mock, ve [INFO] Dependency[Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}] has changed (was Dependency {groupId=com.jcp.ui.framework, artifactId=jcp-logger, version=0.3, type=jar}). [INFO] Processing war project [INFO] Copying webapp resources[C:\Documents and Settings\webapp\target\webapp] [INFO] Webapp assembled in[45999 msecs] [INFO] Building war: C:\Documents and Settings\webapp\target\webapp\target\baseline-webapp.war [INFO] [install:install] [INFO] Installing C:\Documents and Settings\webapp\target\webapp\target\webapp.war to D:\m2repo\com\webapp\0.0.1\webapp-0.0.1.war For some reason, I want just that maven do the Assembling (copy .class files, jar files to TARGET ) but not making the WAR file. Is that possbile ? Thanks Luong -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business
Not all variables replaced when filtering
Hi all, I am running Maven 2.2.1 and am using the resources-plugin 2.4.3 and for some reason Maven only replaces 6 instances of my 7 variable definitions (or better said: 30 of my 35 variables). I tries setting the delimiter (since this was a bug in 2.4 if I remember correctly), but this didn't fix the issue. I tried updating to 2.5, but this does no filtering whatsoever! I even tried to add some other variables, but it seems that at a certain point, it just stops replacing them! Does anybody know what I can do to get this working? I've attached the file I am trying to filter, maybe I overlooked something? Using these values: oracle.hostlocalhost/oracle.host oracle.port1521/oracle.port oracle.instanceORCL/oracle.instance oracle.userhippo/oracle.user oracle.passwordhippo/oracle.password Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - ?xml version=1.0 encoding=UTF-8? !DOCTYPE Repository PUBLIC -//The Apache Software Foundation//DTD Jackrabbit 1.5//EN http://jackrabbit.apache.org/dtd/repository-1.5.dtd; Repository FileSystem class=org.apache.jackrabbit.core.fs.db.OracleFileSystem param name=url value=jdbc:oracle:thin:@${oracle.host}:${oracle.port}:${oracle.instance} / param name=driver value=oracle.jdbc.driver.OracleDriver / param name=user value=${oracle.user} / param name=password value=${oracle.password} / param name=schemaObjectPrefix value=repository_ / /FileSystem Security appName=Jackrabbit AccessManager class=org.hippoecm.repository.security.HippoAccessManager / LoginModule class=org.hippoecm.repository.security.HippoLoginModule / /Security Workspaces rootPath=${rep.home}/workspaces defaultWorkspace=default / Workspace name=${wsp.name} FileSystem class=org.apache.jackrabbit.core.fs.db.OracleFileSystem param name=url value=jdbc:oracle:thin:@${oracle.host}:${oracle.port}:${oracle.instance} / param name=driver value=oracle.jdbc.driver.OracleDriver / param name=user value=${oracle.user} / param name=password value=${oracle.password} / param name=schemaObjectPrefix value=${wsp.name}_ / /FileSystem PersistenceManager class=org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager param name=url value=jdbc:oracle:thin:@${oracle.host}:${oracle.port}:${oracle.instance} / param name=driver value=oracle.jdbc.driver.OracleDriver / param name=user value=${oracle.user} / param name=password value=${oracle.password} / param name=schemaObjectPrefix value=${wsp.name}_ / param name=externalBLOBs value=true / param name=consistencyCheck value=false / param name=consistencyFix value=false / /PersistenceManager SearchIndex class=org.hippoecm.repository.FacetedNavigationEngineThirdImpl param name=indexingConfiguration value=indexing_configuration.xml / param name=indexingConfigurationClass value=org.hippoecm.repository.query.lucene.ServicingIndexingConfigurationImpl / param name=path value=${wsp.home}/index / param name=useCompoundFile value=true / param name=minMergeDocs value=1000 / param name=volatileIdleTime value=10 / param name=maxMergeDocs value=10 / param name=mergeFactor value=5 / param name=maxFieldLength value=1 / param name=bufferSize value=1000 / param name=cacheSize value=1000 / param name=forceConsistencyCheck value=false / param name=enableConsistencyCheck value=false / param name=autoRepair value=true / param name=analyzer value=org.apache.lucene.analysis.standard.StandardAnalyzer / param name=queryClass value=org.apache.jackrabbit.core.query.QueryImpl / param name=respectDocumentOrder value=false / param name=resultFetchSize value=2147483647 / param name=extractorPoolSize value=0 / param name=extractorTimeout value=100 / param name=extractorBackLogSize value=100 / param name=textFilterClasses value=org.apache.jackrabbit.extractor.PlainTextExtractor,org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor / param name=excerptProviderClass
Re: Not all variables replaced when filtering
OK, found it... It seems the bug with '@' from the 2.4 release still isn't fixed (correctly). I found that I have 7 '@' in my file and the variables *after* the 7th '@' weren't replaced! In my tries with the delimiters, I forgot to tell Maven not to use the defaults -- this did the trick for me! On 30.03.2011 17:58, Wayne Fay wrote: I even tried to add some other variables, but it seems that at a certain point, it just stops replacing them! Does anybody know what I can do to get this working? Clearly, reduce the number of variables... ;-) (that's a wink... its a joke) I've never run into this but I don't have all that many variables to replace in general. Perhaps you can create a super simplified sample project that demonstrates the behavior so someone can debug it? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Not all variables replaced when filtering
I found that I have 7 '@' in my file and the variables *after* the 7th '@' weren't replaced! To clarify: removing one or adding one worked like a charm! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Not all variables replaced when filtering
On 30.03.2011 18:11, Olivier Lamy wrote: Hello, I'm interested to have a sample project to reproduce :-). Can you attach it to a jira issue ? Thanks! Here you go: http://jira.codehaus.org/browse/MRESOURCES-141 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Not all variables replaced when filtering
On 30.03.2011 18:28, Asmann, Roland wrote: On 30.03.2011 18:11, Olivier Lamy wrote: Hello, I'm interested to have a sample project to reproduce :-). Can you attach it to a jira issue ? Thanks! Here you go: http://jira.codehaus.org/browse/MRESOURCES-141 Another addition: I re-checked with 2.5, because I thought it strange that filtering would not work at all... It seems that in 2.5, only *some* of my variables get replaced! When using 2.5 without the delimiter-configuration, my variables get replaced if they are not on the same line as the '@'. If the configuration is used, everything works as it should. Can also be checked with the project attached to http://jira.codehaus.org/browse/MRESOURCES-141. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
fail-at-end not working
Hi all, I am using Maven 2.2.1 and I need to have my build run until the very end because I am running integration tests that start and stop my JBoss. Currently, when a test has a failure/error, the build quits and my JBoss keeps on running. I tried adding the '-fae' parameter, but this does not seem to work... I also can't use '-Dmaven.test.failure.ignore' and '-Dmaven.test.error.ignore', since they will have Maven report 'BUILD SUCCESSFUL', which is obviously wrong! Can someone tell me if the '-fae' not working is a bug? And if so, is there a way I can work around it? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: fail-at-end not working
I just found that one, will take a look at it. But it seems to be exactly what I need. Thanks! Roland On 25.03.2011 16:05, Anders Hammar wrote: You should use the failsafe-plugin, which has separate goals for performing the tests and verifying the outcome. That will make it possible to stop your app server before verifying. The plugin site describes this quite well. /Anders On Fri, Mar 25, 2011 at 15:21, Asmann, Roland roland.asm...@adesso.atwrote: Hi all, I am using Maven 2.2.1 and I need to have my build run until the very end because I am running integration tests that start and stop my JBoss. Currently, when a test has a failure/error, the build quits and my JBoss keeps on running. I tried adding the '-fae' parameter, but this does not seem to work... I also can't use '-Dmaven.test.failure.ignore' and '-Dmaven.test.error.ignore', since they will have Maven report 'BUILD SUCCESSFUL', which is obviously wrong! Can someone tell me if the '-fae' not working is a bug? And if so, is there a way I can work around it? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: What could cause such a fundamental file to be missing?
I'd say that your Nexus is configured incorrectly/incomplete... It is OK to mirror everything to Nexus, but then you have to make sure that Nexus is able to retrieve *all* artifacts you need! On 23.03.2011 18:09, Hahn, Christopher (SAN DIEGO) wrote: Is this the problem (from the console): ## -- 1 required artifact is missing. for artifact: com.hp.maven:maven-zip-plugin:maven-plugin:1.0-20100107.233934-2 from the specified remote repositories: central (http://server.labs.company.com/nexus/content/groups/server-devel), snapshots (http:// server.labs.company.com /nexus/content/groups/server-devel) ## Is the fact that central is redirected as well causing maven to fail to find such basic objects? Thanks, Chris From: Hahn, Christopher (SAN DIEGO) Sent: Wednesday, March 23, 2011 10:05 AM To: Maven Users List Subject: What could cause such a fundamental file to be missing? Hello, In testing just the clean goal I get this error: === Downloading: http://server.labs.peregrine.com/nexus/content/groups/server-devel/org/apache/maven/shared/maven-ant/1. 0-SNAPSHOT/maven-ant-1.0-SNAPSHOT.pom [INFO] Unable to find resource 'org.apache.maven.shared:maven-ant:pom:1.0-SNAPSHOT' in repository central (http://server.lab s.company.com/nexus/content/groups/server-devel) === This file seems to be part of the Maven install. Am I missing a fallback repo setting here? Any kicks to the head appreciated, Chris [cid:image001.png@01CBE941.CC0CAD40] Christopher Hahn The Dude Software Production Engineering RD Services, Hewlett-Packard Phone: 858-655-4096 Cell: 619-630-9791 ch...@hp.commailto:christopher.h...@hp.com Visit our SPE Portalhttp://teams5.sharepoint.hp.com/teams/SPE/default.aspx -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Hello World?
IT says 'connection refused', are you sure you can currently reach your Nexus? On 23-03-11 19:39, Hahn, Christopher (SAN DIEGO) wrote: ??? What can make Hello World fail: == D:\tempmvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app D:\tempset MAVEN_OPTS=-Xmx1024m -Xms128m [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection refused: connect [INFO] Repository 'central' will be blacklisted [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Wed Mar 23 10:18:23 PDT 2011 [INFO] Final Memory: 1M/127M [INFO] D:\temp == We are using Nexus, and something must be misconfigured there, but other full-blown targets are working fine. Do I need to re-add Central as a repo on my command line? Sorry, but I seem to be going backwards on this matter... Chris cid:image001.png@01CAF080.AD65F1E0 *Christopher Hahn* The Dude Software Production Engineering RD Services, Hewlett-Packard Phone: 858-655-4096 Cell: 619-630-9791 ch...@hp.com mailto:christopher.h...@hp.com */Visit our SPE Portal/* http://teams5.sharepoint.hp.com/teams/SPE/default.aspx*//* -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Hello World?
Because that is Maven's default output, no matter if you are using nexus or not! If you run in debug, it should (when correctly configured) show that it is trying to download from 'central (url to your nexus here)'. On 23-03-11 19:43, Hessick, Michael wrote: If you are using Nexus, then why is your build trying to connect to central? From: Hahn, Christopher (SAN DIEGO) [mailto:christopher.h...@hp.com] Sent: Wednesday, March 23, 2011 12:40 PM To: Maven Users List Subject: Hello World? ??? What can make Hello World fail: == D:\tempmvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app D:\tempset MAVEN_OPTS=-Xmx1024m -Xms128m [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file: Connection refused: connect [INFO] Repository 'central' will be blacklisted [INFO] [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valid version could be found [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Wed Mar 23 10:18:23 PDT 2011 [INFO] Final Memory: 1M/127M [INFO] D:\temp == We are using Nexus, and something must be misconfigured there, but other full-blown targets are working fine. Do I need to re-add Central as a repo on my command line? Sorry, but I seem to be going backwards on this matter... Chris [cid:image001.png@01CBE94E.4DE427B0] Christopher Hahn The Dude Software Production Engineering RD Services, Hewlett-Packard Phone: 858-655-4096 Cell: 619-630-9791 ch...@hp.commailto:christopher.h...@hp.com Visit our SPE Portalhttp://teams5.sharepoint.hp.com/teams/SPE/default.aspx -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
JMeter in Maven
Hi all, I've been looking through Google to find a plugin to run JMeter from Maven. It seems there are two main plugins, one of which seems to have several branches. Has anybody worked with any of them? If so, could you tell me which one is the best to use? And is any of them available in a repository somewhere? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: JMeter in Maven
On 18.03.2011 13:23, Jeff MAURY wrote: On Fri, Mar 18, 2011 at 12:03 PM, Asmann, Roland roland.asm...@adesso.at mailto:roland.asm...@adesso.at wrote: Hi all, I've been looking through Google to find a plugin to run JMeter from Maven. It seems there are two main plugins, one of which seems to have several branches. Has anybody worked with any of them? If so, could you tell me which one is the best to use? And is any of them available in a repository somewhere? The Maven plugin from the JMeter team is using an old version of JMeter. if you want control over the JMeter version, please see the chronos plugin: http://mojo.codehaus.org/chronos-maven-plugin I looked into that one, but it seems it is still a SNAPSHOT. And since the site hasn't been updated since 2008, I was a little skeptic about that one... Besides, I am not allowed to use SNAPSHOTS in my POM, but that is a different story altogether. Regards Jeff Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 tel:%2B43%201%202198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 tel:%2B43%201%202198790-927 A-1210 Wien M +43 664 88657566 tel:%2B43%20664%2088657566 E roland.asm...@adesso.at mailto:roland.asm...@adesso.at W www.adesso.at http://www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org mailto:users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org mailto:users-h...@maven.apache.org -- Legacy code often differs from its suggested alternative by actually working and scaling. - Bjarne Stroustrup http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.twitter.com/jeffmaury -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: JMeter in Maven
Hi Siegfried, True, but if you're already on Maven, why would you want to go back to Ant? Roland On 18.03.2011 13:56, Siegfried Goeschl wrote: Hi Roland, you can always fall back to use the JMeter Ant integration Cheers, Siegfried Goeschl On 18.03.11 13:38, Asmann, Roland wrote: On 18.03.2011 13:23, Jeff MAURY wrote: On Fri, Mar 18, 2011 at 12:03 PM, Asmann, Roland roland.asm...@adesso.atmailto:roland.asm...@adesso.at wrote: Hi all, I've been looking through Google to find a plugin to run JMeter from Maven. It seems there are two main plugins, one of which seems to have several branches. Has anybody worked with any of them? If so, could you tell me which one is the best to use? And is any of them available in a repository somewhere? The Maven plugin from the JMeter team is using an old version of JMeter. if you want control over the JMeter version, please see the chronos plugin: http://mojo.codehaus.org/chronos-maven-plugin I looked into that one, but it seems it is still a SNAPSHOT. And since the site hasn't been updated since 2008, I was a little skeptic about that one... Besides, I am not allowed to use SNAPSHOTS in my POM, but that is a different story altogether. Regards Jeff Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 tel:%2B43%201%202198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 tel:%2B43%201%202198790-927 A-1210 Wien M +43 664 88657566 tel:%2B43%20664%2088657566 E roland.asm...@adesso.at mailto:roland.asm...@adesso.at W www.adesso.at http://www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org mailto:users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org mailto:users-h...@maven.apache.org -- Legacy code often differs from its suggested alternative by actually working and scaling. - Bjarne Stroustrup http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.twitter.com/jeffmaury - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
help:effective-settings
Hi all, I had this feeling that my Maven was using the wrong settings.xml file and when running help:effective-settings, it indeed shows me the wrong configuration. Now, I looked in all the normal places where settings.xml files are looked for, but I can't seem to find where Maven is seeing this file! Is there some way to have Maven report back on where the settings.xml files where found? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Sharing data between archetypes
Hi all, I am currently creating several archetypes and was wondering what the best way is to share data. Some of my archetypes are up to 90% the same and I don't want to copy around all the files they share. Wouldn't be a problem the first time, but of course all updates should then be copied around multiple times as well! So, I was thinking of creating several small projects that contain those files and then have them extracted into the archetype before it is packaged. The only thing I am not sure about (haven't tested my archetypes yet) is whether I can add these JARs as dependencies. What I mean by that is, that I don't want the JAR to be downloaded when someone wants to setup the archetype, because the data would already be inside the created project... Does someone have some experience with this? Am I going in the right direction or is there perhaps another (easier? better?) way to do this? Would the packaging JAR be a good idea or would it be a better idea to make something else, perhaps a ZIP? Any input is welcome! Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Retrieving all available versions of an artifact
Hi all, I'm writing a plug-in and currently need a list of all available versions for a specific artifact. I've found this method: ArtifactMetadataSource.retrieveAvailableVersions which I thought would do this. However, this method does not give the list of available SNAPSHOTs. In my plug-in I want to make sure that the latest version of a certain artifact is used. This version may either be the latest release or a newer SNAPSHOT. But like I said, the method doesn't give me the latest version of the SNAPSHOTs. I figured out already, that this is because the implementation of the above method only checks the remote release repositories. It doesn't look in the local repository (which in my tests contained the SNAPSHOT I was looking for) or the remote snapshot repositories. Does anybody know if there is a method that does exactly what I want, or am I stuck to defining my snapshot repositories to contain releases as well? The latter is a workaround that gets me the artifact, but now Maven tries to resolve all artifacts to that repo as well, and it makes my build that much slower. Any help is greatly appreciated! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Mirrors
Hi all, I was wondering if it is possible in Maven 2.2.1 to setup 2 mirrors that will take all my requests. I have the first one configured to take all release-versions, the second to handle snapshots. Now, the problem is that when I tell the first one to mirror '*', the second mirror never gets called... Is there a way to solve this problem? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Mirrors
I know that, but I don't want to list all snapshot-repo's I have in both mirrors (first as exclude, in the other as include). I was hoping there was an easier way to do this... On 23.02.2011 13:05, Anders Hammar wrote: http://maven.apache.org/guides/mini/guide-mirror-settings.html See Advance Mirror Specification. /Anders On Wed, Feb 23, 2011 at 12:18, Asmann, Roland roland.asm...@adesso.atwrote: Hi all, I was wondering if it is possible in Maven 2.2.1 to setup 2 mirrors that will take all my requests. I have the first one configured to take all release-versions, the second to handle snapshots. Now, the problem is that when I tell the first one to mirror '*', the second mirror never gets called... Is there a way to solve this problem? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Mirrors
I haven't tried that, but what I read from the Maven-pages, it doesn't understand wildcards like that... But I can try though... Then again, it would only work if the repositories are actually named like that, and I can't always influence that (3rd party!)... Ah well, for now I'll take the Nexus-solution[1] and explicitly add a snapshot-repository that is always active. [1] http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html On 23.02.2011 13:46, Marc Rohlfs wrote: Did You try something like this: mirrors mirror idshapshot-mirrors/id nameSnapshot Mirros/name urlhttp://snapshots.mycompany.com/repo/url mirrorOf*-snapshots/mirrorOf /mirror mirror idrelease-mirrors/id nameRelease Mirros/name urlhttp://releases.mycompany.com/repo/url mirrorOf*-releases/mirrorOf !-- Or maybe: mirrorOf!*-snapshots/mirrorOf -- /mirror mirror !-- OPTIONAL!!! -- idthirdparty-mirrors/id nameThirdparty Mirros/name urlhttp://proxy.mycompany.com/repo/url mirrorOf!*-releases,!*-snapshots/mirrorOf /mirror /mirrors I didn't double-check, but I'd say this should work ... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Mirrors
On 23.02.2011 18:40, Marc Rohlfs wrote: I haven't tried that, but what I read from the Maven-pages, it doesn't understand wildcards like that... But I can try though... I thought it would work, but I am not sure - I have to admit ... Then again, it would only work if the repositories are actually named like that, and I can't always influence that (3rd party!)... You use the repository IDs in the 'mirrorOf' configuration, and those IDs are defined in Your pom.xmls or Your settings.xml, where You define the remote repositories You want to use - this means that You should be able to influence that. Or did I misunderstand Your problem? Partially true. For my own repositories, this will work. However, Maven also checks the repositories defined in all dependencies and those I have no influence over. Ah well, for now I'll take the Nexus-solution[1] and explicitly add a snapshot-repository that is always active. OK, if You have everything in one Nexus, creating a repository group for all of Your repositories (even including proxy repos) is the best way, of course. If it were only a single Nexus, then the normal mirrorOf * would have worked. Would've been great if Maven had an option to mirror types of repositories (release/snapshot) as well as id's. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Resource-Plugin
Hi all, I was playing around with the resource-plugin to copy several resources around in my project, and found a problem with the plugin. It appears that the parameter 'includeEmptyDirs' is not always (!) being obeyed. From what I can see, it works when I configure several resources and do NOT specify a 'targetPath' on them. The problem is that I don't want all resources in the same location. As a workaround I now define several executions, but I was wondering if this is a known issue and if others may have found another way to accomplish this. If nobody ever noticed, I might create a JIRA and maybe attach a patch for it. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with classpath for tests
The problem here is that Hibernate doesn't scan my EntityBeans/doesn't find any annotations on them. This in turn means that my DB isn't initialized and my tests can't run! Isn't there anybody out there that has had this problem after the classpath-change? On 20.12.2010 14:49, Asmann, Roland wrote: Sorry, I got the location of the directories wrong... They were last but are now first! On 20.12.2010 14:47, Asmann, Roland wrote: Hi all, I've been trying to get some projects running on my Hudson server, abd am running into problems. I've hunted down the problem to being the version of Maven that I use! On my Hudson I am running both 2.0.10 (for some older projects) and 2.2.1. On both these versions I have a project that is failing. Now, I asked the developer and he told me he is on Maven 2.0.9... When I run with that version, everything works as it should! From the output generated by Maven, I can see that there is a difference in the classpath for the tests. It appears that starting with 2.0.10, the 'target/classes' and 'target/test-classes' are no longer the first entries on the classpath, but the last. This seems to be the problem I'm having, and tbh I have no idea on how I could fix this problem and get my tests running again... Does anybody have an idea or suggestion on how to fix this? Thanks! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Problem with classpath for tests
Hi all, I've been trying to get some projects running on my Hudson server, abd am running into problems. I've hunted down the problem to being the version of Maven that I use! On my Hudson I am running both 2.0.10 (for some older projects) and 2.2.1. On both these versions I have a project that is failing. Now, I asked the developer and he told me he is on Maven 2.0.9... When I run with that version, everything works as it should! From the output generated by Maven, I can see that there is a difference in the classpath for the tests. It appears that starting with 2.0.10, the 'target/classes' and 'target/test-classes' are no longer the first entries on the classpath, but the last. This seems to be the problem I'm having, and tbh I have no idea on how I could fix this problem and get my tests running again... Does anybody have an idea or suggestion on how to fix this? Thanks! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with classpath for tests
Sorry, I got the location of the directories wrong... They were last but are now first! On 20.12.2010 14:47, Asmann, Roland wrote: Hi all, I've been trying to get some projects running on my Hudson server, abd am running into problems. I've hunted down the problem to being the version of Maven that I use! On my Hudson I am running both 2.0.10 (for some older projects) and 2.2.1. On both these versions I have a project that is failing. Now, I asked the developer and he told me he is on Maven 2.0.9... When I run with that version, everything works as it should! From the output generated by Maven, I can see that there is a difference in the classpath for the tests. It appears that starting with 2.0.10, the 'target/classes' and 'target/test-classes' are no longer the first entries on the classpath, but the last. This seems to be the problem I'm having, and tbh I have no idea on how I could fix this problem and get my tests running again... Does anybody have an idea or suggestion on how to fix this? Thanks! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to resolve 'LATEST'
Hi all, I'm writing an enforcer-rule, that should check if my parent is the LATEST version. How can I get the actual version for 'LATEST'? Thanks! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to resolve 'LATEST'
Currently I am not using this, but I want the enforcer to check which version 'LATEST' is and tell the user he should update to that version! On 17-12-10 17:04, Brian Fox wrote: Don't use RELEASE or LATEST. On Fri, Dec 17, 2010 at 7:43 AM, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I'm writing an enforcer-rule, that should check if my parent is the LATEST version. How can I get the actual version for 'LATEST'? Thanks! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Differences between Maven 2.0, 2.1, 2.2 and 3.0
Hi all, Could someone tell me what the differences between 2.0, 2.1, 2.2 and 3.0 are? I am currently running on 2.0.9 and 2.0.10 (depending on the project) and I was wondering if I should start migrating. Currently I am not allowed to upgrade to 3.0 (a 2.x version is still mandatory), but maybe I could at least make a suggestion to switch to 3.0 -- depending on how big the migration would turn out to be. Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How can I tell Hudson to build the modules instead of the jobs?
How about configuring a single job to check-out and build just one module? Would mean that you have lots of jobs (probably one for every module), but that way the big job wouldn't need to be triggered (don't forget to turn of polling and the subversion-hook!). Then you could run the big job at night or something like that... Roland On 10-12-10 09:20, Andreas Wederbrand wrote: Hi! I have a alot of jobs on Hudson, most of which are really small and consist of just a few modules. But one is big and consist of several modules. When ever I make a commit to our subversion repository for any of those several modules in that big job, Hudson builds the entire job instead of just the module that have changed. It doesn't matter if I just scm-polling or a subversion hook, the result is the same. It seems to me like it would be better if the modules where built instead of the jobs since the other modules in other jobs have dependencies to the modules and not to the jobs. Can this be configured or do I have to create several jobs instead of the big one? And if so, can I configure the big job to never build when any of it's modules are being triggered but still build when it's own pom.xml is changed? Thanks. -- Read my blog @ http://www.raven.nu/blog - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multiple JDKs
On 07.12.2010 11:29, Stephen Connolly wrote: On 7 December 2010 10:14, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? I would consider running the tests twice and have just one set of artifacts... Otherwise you will have a nightmare of a dependency management. I already have this... Yesterday I found out that one of my dependencies has a profile that is activated when I use the IBM JDK for building... This mad the EAR undeployable on the SUN JDK, because this dependency (jaxp) is probably included in the JDK for SUN. So, I think my best solution would be to run Maven twice on all my projects -- once for SUN and once for IBM. Only question is, can I do this in a single go and how can I do this in the release-phase... Run the tests first with ibm and second with sun/oracle that way you know your artifacts work on both JREs As I pointed out, this will not solve my problem completely, because I need 2 artifacts! Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Have a look at toolchains. Google is your friend. Toolchains support has been available for a while now, I know because I helped get it into a number of plugins. If this can do what I want, then it might indeed be worth looking at. I'll give it a go in bit, I think I have some time today. Another thing you might consider is using animal-sniffer-maven-plu...@mojothat way you can verify that the JRE signatures you use are only public signatures and not internal classes that are not part of the published JRE API -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multiple JDKs
On 07.12.2010 14:33, Jörg Schaible wrote: Hi Stephen, Stephen Connolly wrote: On 7 December 2010 10:37, Asmann, Roland roland.asm...@adesso.at wrote: On 07.12.2010 11:29, Stephen Connolly wrote: On 7 December 2010 10:14, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? I would consider running the tests twice and have just one set of artifacts... Otherwise you will have a nightmare of a dependency management. Run the tests first with ibm and second with sun/oracle that way you know your artifacts work on both JREs OK, so that means I should configure my surefire to run with different JDKs? Also, with which JDK would you suggest that I run the complete build? If you use toolchains, it should not matter what JRE you use to run Maven, the compiler plugin will use the toolchain you specify. The question you need to ask yourself is which JDK should the toolchain be driving, and I cannot answer that... if animal-sniffer says that they are only using the public JRE api then it does not matter which JDK you use. It does, if the JDK is not compatible. And this is the case for some parts of JDBC 3 vs. 4 (included in Java 6). Which appears to be the case here. And if you have surefire running with both JREs then you should be safe anyway If your module e.g. implements a JDBC Connector this is simply not possible (see commons-dbcp as precedence). Any suggestions on how to solve this? The thing is that we really want to have the same version on both artifacts, since they are (more or less) the same. Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Have a look at toolchains. Google is your friend. Toolchains support has been available for a while now, I know because I helped get it into a number of plugins. Another thing you might consider is using animal-sniffer-maven-plu...@mojothat way you can verify that the JRE signatures you use are only public signatures and not internal classes that are not part of the published JRE API Well, according to the customer they are definitely compiling against the API. They say there is a change in some DB drivers or something (at least something related to Oracle)... Have to inspect that a little further myself though... Might be the DB driver that is depending on non-public JRE classes Oracle provides two different drivers - one supporting JDBC 3, the other one JDBC 4. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Multiple JDKs
On 09.12.2010 11:29, Stephen Connolly wrote: you need to add an exclusion on the dependency that is being brought in by profile activation. It was a mistake that profiles include the dependency section as there is all manor of issues. The profile gets activated based on the environment where maven is running, not the environment where the artifact is deployed. If you have 3rd party deps that use profile activation to pull in dependencies, you will need to define exclusions on those dependencies... that will stabilise your build. If your build uses profile activation to pull in dependencies, that is your bad, take it out -Stephen No, this is NOT the solution, since I will need the artifact on both SUN and JDK machines. The problem is that when I build with only one of those, I can also only deploy it to one of those! Therefor, I need to build one artifact with IBM JDK, which will then be deployed to the IBM JDK server, and one with SUN, which will likewise be deployed to the SUN server. I understand that I can build both versions on either JDK by either adding or excluding dependencies, the fact is that I don't want to do this manually, but let Maven handle it (as it can!) depending on which JDK I build. Like I said before, the real problem is that I want to have my release build BOTH artifacts at once, and I am not sure how I could achieve this goal... -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multiple JDKs
I don't like it. 2 Projects means that we have to share code somehow... Besides, if it was just a simple JAR-file, it would be OK. We have about 7 modules, and I don't really feel like duplicating all of them. Besides, the only difference we really have is that we trigger Maven with a different JDK, so we wouldn't even need profiles! I just don't want to have 2 different versions for the project. I think I'll try something with the invoker-plugin, that would at least work for normal builds... Need to check it it would work on releases as well... On 09-12-10 19:23, Jon Paynter wrote: good point there. id opt for the simple solution too. On Thu, Dec 9, 2010 at 10:18 AM, Ron Wheeler rwhee...@artifact-software.com wrote: On 09/12/2010 1:08 PM, Jon Paynter wrote: why 2 projects? it seems 1 maven project with profiles and a batch script will work something like so: mvn deploy -P SunProfileName mvn deploy -P IBMProfileName If it works, I would have no objection but 2 projects will work for sure and everyone knows how to set up a simple project. The same can not be said about profiles and they seem to encourage complex solutions that generate lots of traffic and frustrated Maven users here. Sometimes it is a lot easier to do 2 simple things that are 90% identical than 1 complex thing that has no redundant code. Ron On Thu, Dec 9, 2010 at 5:15 AM, Ron Wheeler rwhee...@artifact-software.comwrote: On 09/12/2010 7:52 AM, Asmann, Roland wrote: On 09.12.2010 11:29, Stephen Connolly wrote: you need to add an exclusion on the dependency that is being brought in by profile activation. It was a mistake that profiles include thedependency section as there is all manor of issues. The profile gets activated based on the environment where maven is running, not the environment where the artifact is deployed. If you have 3rd party deps that use profile activation to pull in dependencies, you will need to define exclusions on those dependencies... that will stabilise your build. If your build uses profile activation to pull in dependencies, that is your bad, take it out -Stephen No, this is NOT the solution, since I will need the artifact on both SUN and JDK machines. The problem is that when I build with only one of those, I can also only deploy it to one of those! Therefor, I need to build one artifact with IBM JDK, which will then be deployed to the IBM JDK server, and one with SUN, which will likewise be deployed to the SUN server. I understand that I can build both versions on either JDK by either adding or excluding dependencies, the fact is that I don't want to do this manually, but let Maven handle it (as it can!) depending on which JDK I build. Like I said before, the real problem is that I want to have my release build BOTH artifacts at once, and I am not sure how I could achieve this goal... 2 maven projects and a batch script. Ron - 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 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoking Maven Goals Prorammatically
Hi, Try something like this: plugin artifactIdmaven-invoker-plugin/artifactId configuration goals goalclean/goal goaleclipse:clean/goal goaleclipse:eclipse/goal goalinstall/goal /goals noLogtrue/noLog streamLogstrue/streamLogs properties jboss.home${jboss.home}/jboss.home /properties /configuration executions execution idtelefon/id goals goalrun/goal /goals phasevalidate/phase configuration pom../sv-portal-telefon/pom.xml/pom /configuration /execution /executions /plugin Check the plugin description to see if you need all parameters I used or if you need some I didn't use! Roland On 07.12.2010 10:37, Harshana Eranga Martin wrote: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Re: Invoking Maven Goals Prorammatically
Oops, misread your mail... Please ignore this post! Roland On 07.12.2010 10:40, Asmann, Roland wrote: Hi, Try something like this: plugin artifactIdmaven-invoker-plugin/artifactId configuration goals goalclean/goal goaleclipse:clean/goal goaleclipse:eclipse/goal goalinstall/goal /goals noLogtrue/noLog streamLogstrue/streamLogs properties jboss.home${jboss.home}/jboss.home /properties /configuration executions execution idtelefon/id goals goalrun/goal /goals phasevalidate/phase configuration pom../sv-portal-telefon/pom.xml/pom /configuration /execution /executions /plugin Check the plugin description to see if you need all parameters I used or if you need some I didn't use! Roland On 07.12.2010 10:37, Harshana Eranga Martin wrote: Hi All, I am trying to execute clean and install maven goals for a java project from another java project by launching maven builder programmatically. I have came across Maven Invoker plugin. But I could not find any example code used to Invoke maven goals from a java project. Can some one point me to an example how to get this done using this maven invoker plugin? Thanks and Regards, Harshana Martin -- Harshana Eranga Martin Software Engineer, WSO2 Inc. Web: http://wso2.com http://wso2.org ECF Committer: http://www.eclipse.org/ecf/ Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05 -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. -
Multiple JDKs
Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Multiple JDKs
On 07.12.2010 11:29, Stephen Connolly wrote: On 7 December 2010 10:14, Asmann, Roland roland.asm...@adesso.at wrote: Hi all, I was wondering if anybody ever had this problem... I have a customer who is running a machine with a SUN JDK and one with an IBM JDK. Now, we've noticed there are some differences between the two, so I thought it would be best to release their artefacts for both JDKs... Question is, can I do this somehow with Maven in a single release-cycle or do I need to make separate releases? I would consider running the tests twice and have just one set of artifacts... Otherwise you will have a nightmare of a dependency management. Run the tests first with ibm and second with sun/oracle that way you know your artifacts work on both JREs OK, so that means I should configure my surefire to run with different JDKs? Also, with which JDK would you suggest that I run the complete build? Also, they currently have a problem in that they need SUN JDK 6 for most project, where one single module MUST be built with SUN JDK 5 because of a change in some classes. They are currently running the compiler-plugin with a bootclasspath for JDK 5, which isn't beautiful but works. Is there a way to have a single module use a different JDK from the others? Have a look at toolchains. Google is your friend. Toolchains support has been available for a while now, I know because I helped get it into a number of plugins. Another thing you might consider is using animal-sniffer-maven-plu...@mojothat way you can verify that the JRE signatures you use are only public signatures and not internal classes that are not part of the published JRE API Well, according to the customer they are definitely compiling against the API. They say there is a change in some DB drivers or something (at least something related to Oracle)... Have to inspect that a little further myself though... Thanks, -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven-eclipse-plugin
Hi all, Does anybody know in which version the support for wtp 2.x was added? And when will support for wtp 3.x be added? Thanks! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Properties in the archetype
Doesn't anybody have an idea? On 06.11.2010 19:09, Asmann, Roland wrote: Hi all, I'm having some problems with properties in archetypes. I read that it is possible to have files and directories renamed with properties (http://jira.codehaus.org/browse/ARCHETYPE-191), but this seems to be not working on modules. I have a certain project-structure that must be used, and I want the modules to be renamed automatically: my-test-app |-- my-test-ear |-- my-test-model |-- my-test-services |-- my-test-web The problem here is that when I tell the archetype that I have a property projectName and rename the directories and module-entries in the archetype-metadata.xml to look like __projectName__-ear and ${projectName}-ear, I don't get those modules! I've played around a bit and found that when I use a structure like this: my-test |-- my-test-ear |-- my-test-model The archetype-plugin will automatically create directories and entries in the archetype-metadata.xml like __rootArtifactId__-ear and ${rootArtifactId}-ear. Why is this not working for my custom-property? -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Forbid users to use a certain artifact and/or version
Hi all, For one of my customers, I have to come up with a solution to have maven completely ignore certain artifacts and/or versions. Does anybody have any ideas on how to do this? I was thinking about using a preant-POM and the enforcer-plugin, but as soon as I make an update, all projects would have to update their parents as well -- which is exactly what they don't want, otherwise they could've changed the dependencies themselves... The problem here is that the architecture-department wants to get rid of certain artifacts and the developers don't want to update their POMs... I know, it's not ideal, but I have to find some sort of solution for this... The setup they have here is using Nexus, maybe I can tinker around with that a bit as well? Any help would be greatly appreciated! -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Forbid users to use a certain artifact and/or version
I fully agree with you, but as the saying goes 'the customer is king'... Ah well, I'll give it another couple of days to tinker around and if nothing else works, I'll tell them to just enforce one of the changes. On 17.11.2010 11:43, Antonio Petrelli wrote: 2010/11/17 Asmann, Roland roland.asm...@adesso.at: Does anybody have any ideas on how to do this? I was thinking about using a preant-POM and the enforcer-plugin, but as soon as I make an update, all projects would have to update their parents as well -- which is exactly what they don't want, otherwise they could've changed the dependencies themselves... The problem here is that the architecture-department wants to get rid of certain artifacts and the developers don't want to update their POMs... I know, it's not ideal, but I have to find some sort of solution for this... I'm sorry but I think that magic cannot happen, at least in Maven world. Either update your parent and encourage developers to change parent version, or encourage developers to change dependencies. I mean, if you update parent POM and it is not a SNAPSHOT version, and child POMs are not connected to this SNAPSHOT, then developers must change parent POM version. You can (very bad! don't do it!) modify the original deployed version of that parent POM to add those rules, developers should clean their local repository and redownload the parent POM. Anyway, you already found two good solutions to your problem. This kind of war is nonsense IMHO. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - business. people. technology. - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org