Re: list all unique dependencies of multi-module project
Hello Mirko, it's an idea. This that you describe in particular i cannot do, because it will break containment (has implications with site generation, build, etc), but i had tried a similar hack, by creating a dummy jar project that was depending on every single module in the entire source tree. It almost worked, but not quite, because other than being problematic remembering to always add every module as a dependency to the dummy module , both test and not, dependency:list will shrink a dependency to one scope only. That is, it will not show that dependency A is used as 'compile' somewhere and somewhere else as 'test', while we want to see that in a report. Seems to me that this problem cannot be resolved with the dependency plugin alone, because dependencies can only be found by running the entire tree: the container pom project will run as first in the reactor build order, not as last. Seems more of a problem for a reporting plugin, like for example the Maven Project Info Reports Plugin. I am going to ask a different question based on that, see if i can get an answer. Cheers, Max On Wed, Mar 12, 2014 at 10:34 PM, Mirko Friedenhagen mfriedenha...@gmail.com wrote: Hello Max, what about switching this to a jar project without sources (maybe a readme txt as resource), which is not deployed or installed? Regards Mirko
Re: list all unique dependencies of multi-module project
ok..., based on my previous email, trying re-asking here the same question from a different angle: The project-info-reports:dependency-management goal is used to generate the Project DependencyManagement report. In in a multi-module project, is it currently already possible to generate the same report (maybe off of the main pom project container of your entire source tree), which aggregates all the reports of all submodules (unique GAV+scope entries)? On Fri, Mar 14, 2014 at 10:15 AM, Max Calderoni max.calder...@gmail.comwrote: Hello Mirko, it's an idea. This that you describe in particular i cannot do, because it will break containment (has implications with site generation, build, etc), but i had tried a similar hack, by creating a dummy jar project that was depending on every single module in the entire source tree. It almost worked, but not quite, because other than being problematic remembering to always add every module as a dependency to the dummy module , both test and not, dependency:list will shrink a dependency to one scope only. That is, it will not show that dependency A is used as 'compile' somewhere and somewhere else as 'test', while we want to see that in a report. Seems to me that this problem cannot be resolved with the dependency plugin alone, because dependencies can only be found by running the entire tree: the container pom project will run as first in the reactor build order, not as last. Seems more of a problem for a reporting plugin, like for example the Maven Project Info Reports Plugin. I am going to ask a different question based on that, see if i can get an answer. Cheers, Max On Wed, Mar 12, 2014 at 10:34 PM, Mirko Friedenhagen mfriedenha...@gmail.com wrote: Hello Max, what about switching this to a jar project without sources (maybe a readme txt as resource), which is not deployed or installed? Regards Mirko -- Max Calderoni
Re: Filtering issues with maven and assemblies...
Hi Julien, could you please create a simple example project with files and description what you expect the result should be...and what the current results are... The best would be having a github project which can be cloned to analyze the problem...or may be a tar.gz / zip file which contains such a project... Kind regards Karl-Heinz Marbaise On 3/13/14 4:58 PM, Julien Martin wrote: Hello, I am having issues with maven filtering. My resources are not filtered... I want to generate a jar with dependencies with custom filtering. Can anyone please help? Here is my configuration (*pom.xml* and *assembly.xml*): *Resources:* resources resource directorysrc/main/resources/directory filteringtrue/filtering /resource /resources *Plugins:* plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.6/version executions execution idcopy-resources/id phasevalidate/phase goals goalcopy-resources/goal /goals configuration outputDirectorytarget/outputDirectory resources resource directorymisc/external-resources/directory /resource /resources /configuration /execution execution iddev/id phaseprocess-resources/phase goals goalresources/goal /goals configuration outputDirectorytarget/dev/outputDirectory filters filtersrc/main/resources/filters/dev.properties/filter /filters /configuration /execution execution idprod/id phaseprocess-resources/phase goals goalresources/goal /goals configuration outputDirectorytarget/prod/outputDirectory filters filtersrc/main/resources/filters/prod.properties/filter /filters /configuration /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdbuild-helper-maven-plugin/artifactId version1.1/version executions execution phasegenerate-sources/phase goals goaladd-source/goal /goals configuration sources source${project.generated-sources.directory}/source /sources /configuration /execution /executions /plugin plugin artifactIdmaven-assembly-plugin/artifactId version2.4/version executions execution iddev/id phasepackage/phase goals goalsingle/goal /goals configuration archive manifest addClasspathtrue/addClasspath mainClasscom.otcexids.main.Main/mainClass /manifest /archive descriptors descriptorsrc/main/resources/assemble/assembly.xml/descriptor /descriptors filters filtersrc/main/resources/filters/dev.properties/filter /filters finalNameIDS-dev/finalName appendAssemblyIdfalse/appendAssemblyId /configuration /execution execution idprod/id phasepackage/phase goals goalsingle/goal /goals configuration archive manifest
Re: Need Help
Hello, I had the same questions :-). Vishai, you could invoke mvn compile, switch to the target/classes directory and execute time jar cvf ../foo.jar . to see how long the original jar command takes and compare this to the time needed by the maven-jar-plugin. Regards Mirko -- http://illegalstateexception.blogspot.com/ https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen) https://bitbucket.org/mfriedenhagen/ On Fri, Mar 14, 2014 at 12:23 AM, Benson Margulies bimargul...@gmail.com wrote: How long is too long? How big is the jar? On Thu, Mar 13, 2014 at 2:31 PM, Vishal Kumar Gupta groups...@gmail.com wrote: Hi Team, OS- Ubuntu 12.04 TLS Maven version - 3.2.1 maven-jar-plugin:2.4:jar is taking too long to generate jar. pom.xml for plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.4/version configuration forceCreationtrue/forceCreation archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin DEBUG log:- [DEBUG] Configuring mojo org.apache.maven.plugins:maven-jar-plugin:2.4:jar from plugin realm ClassRealm[pluginorg.apache.maven.plugins:maven-jar-plugin:2.4, parent: sun.misc.Launcher$AppClassLoader@262505b7] [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-jar-plugin:2.4:jar' with basic configurator -- [DEBUG] (s) addClasspath = true [DEBUG] (s) manifest = org.apache.maven.archiver.ManifestConfiguration@7be2e01 [DEBUG] (f) archive = org.apache.maven.archiver.MavenArchiveConfiguration@56be479f [DEBUG] (f) classesDirectory = /Test/target/classes [DEBUG] (f) defaultManifestFile = /Test/target/classes/META-INF/MANIFEST.MF [DEBUG] (f) finalName = Test-0.0.1-SNAPSHOT [DEBUG] (f) forceCreation = true [DEBUG] (f) outputDirectory = /Test/target [DEBUG] (f) project = MavenProject: com.ericsson.esip:cw-ws-server:0.0.1-SNAPSHOT @ /Test/pom.xml [DEBUG] (f) session = org.apache.maven.execution.MavenSession@ed1bb57 [DEBUG] (f) skipIfEmpty = false [DEBUG] (f) useDefaultManifestFile = false [DEBUG] -- end configuration -- Need help Thanks in advance. Regards, vishal - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Need Help
On 15 March 2014 07:40, Mirko Friedenhagen mfriedenha...@gmail.com wrote: Hello, I had the same questions :-). Vishai, you could invoke mvn compile, switch to the target/classes directory and execute time jar cvf ../foo.jar . to see how long the original jar command takes and compare this to the time needed by the maven-jar-plugin. mvn -X also gives some times but you need to do the math yourself.
how to only build if version is changed..
Hello, We are using maven, jenkins and nexus for continuous integration. Our trunk branch contains no snapshots, and jenkins is polling the scm and building on any change. However periodically a developer may check things in without upversioning the pom. When they do this the build fails at deploy as nexus will not allow to full release versions with the same number. Which is obviously good... But I would like to fail the build early, before deploy, so that when a developer tries to build the project in their local workspace, they can see that they must change the version number. How would I add a goal to maven that failed, if nexus contains a binary of the project I'm building, at the same version as the pom? I'm guessing I'd need to use the enforcer, and perhaps the maven versions mojo, but I don't know the exact config? -- View this message in context: http://maven.40175.n5.nabble.com/how-to-only-build-if-version-is-changed-tp5788337.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