Windows 7 symlinks and maven file copy
Hi We have just updated to Windows 7 and for some resource files in one of our projects we are using Windows 7 symlinks. The problem is that the maven-resource-plugin uses some org.codehaus.plexus.util.FileUtils class from Plexus which does a sanity check after the file is copied to the target folder. It checks if the file length are the same which on Windows 7 is not true. It seems that java.io.File.lenght() returns 0 for Windows 7 symlinks. (On Linux the length will be the length of the file that the link points to) I suppose I can filter all resource to avoid the sanity check but it does not seems right. Any suggestions on suitable workarounds? Thanks Lucas -- Lucas Persson | Principal Member of Technical Staff Phone: +4684773644 | | | Mobile: +46730946656 Oracle Communications Platform ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm Oracle Svenska AB, Kronborgsgrnd 17, S-164 28 KISTA, reg.no. 556254-6746 Oracle is committed to developing practices and products that help protect the environment
Problem with Maven2 installation
Hi, I have installed Maven2 in a virtual machine Linux redhat , it seems ok : [rym@localhost ~]$ mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400) Java version: 1.6.0_24 Java home: /usr/java/jdk1.6.0_24/jre Default locale: en_US, platform encoding: UTF-8 OS name: linux version: 2.6.18-194.el5 arch: i386 Family: unix BUT when I use the cmd : archetype:generate the result is : [rym@localhost ~]$ mvn archetype:generate [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: repo1.maven.org [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: Thu Apr 28 08:57:59 EDT 2011 [INFO] Final Memory: 1M/15M [INFO] Also I can't find the file setting.xml in the directory .m2 , .m2 is empty! What is the problem? Please help me. Best regards Rym Azzouni
Re: Problem with Maven2 installation
You need to create settings.xml yourself. Maven doesn't create it for you. Could it be that you need to configure a web proxy for Maven to use to access the Internet (and central)? /Anders On Thu, Apr 28, 2011 at 11:21, Azzouni, Rym rym.azzo...@hraccess.comwrote: Hi, I have installed Maven2 in a virtual machine Linux redhat , it seems ok : [rym@localhost ~]$ mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400) Java version: 1.6.0_24 Java home: /usr/java/jdk1.6.0_24/jre Default locale: en_US, platform encoding: UTF-8 OS name: linux version: 2.6.18-194.el5 arch: i386 Family: unix BUT when I use the cmd : archetype:generate the result is : [rym@localhost ~]$ mvn archetype:generate [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: repo1.maven.org [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: Thu Apr 28 08:57:59 EDT 2011 [INFO] Final Memory: 1M/15M [INFO] Also I can't find the file setting.xml in the directory .m2 , .m2 is empty! What is the problem? Please help me. Best regards Rym Azzouni
Making findbugs:check fail on only high bugs
Hi, i'm running the maven findbugs plugin (via jenkins) and want it to fail only when it find High Level bugs. when running findbugs:findbugs the build doesn't fail and only show the list of plugins. when running findbugs:check, the build fails when it encouters the low level bugs. how can i tell it to fail the build only on high ? i've tried settings the threshold param to high, but i believe this only affect the bugs shown on the report and not the build fail level. can anyone help? thanks Eyal.
Assembly Plugin Problem with multi module Project
Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId artifactIdNAME/artifactId versionVERSION/version relativePath../pom.xml/relativePath /parent and also declared the assembly plugin: plugin artifactIdmaven-assembly-plugin/artifactId executions execution idcreate-assembly/id phasepackage/phase goals goalsingle/goal /goals configuration descriptors descriptorconfig/assembly.xml/descriptor /descriptors /configuration /execution /executions /plugin The assembly.xml is placed in the distribution/config directory and looks like this: idtest/id formats formatdir/format /formats includeBaseDirectoryfalse/includeBaseDirectory moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectoryTOOLS/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets If I execute mvn clean package I get following error message: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The assembly id test is used more than once. [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. [INFO] If I execute mvn assembly:single then the message that assembly id used more than once disappears. I use Maven 2.2.1 on WinXp Pro Can somebody help me?
RE: Making findbugs:check fail on only high bugs
This might be a good place to try Sonar along with the Build Breaker plugin. Curt Yanko -Original Message- From: eyal edri [mailto:eyal.e...@gmail.com] Sent: Thursday, April 28, 2011 8:39 AM To: Maven Users List Subject: Making findbugs:check fail on only high bugs Hi, i'm running the maven findbugs plugin (via jenkins) and want it to fail only when it find High Level bugs. when running findbugs:findbugs the build doesn't fail and only show the list of plugins. when running findbugs:check, the build fails when it encouters the low level bugs. how can i tell it to fail the build only on high ? i've tried settings the threshold param to high, but i believe this only affect the bugs shown on the report and not the build fail level. can anyone help? thanks Eyal. This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Assembly Plugin Problem with multi module Project
The declaration in your parent, is that a binding? Or is it in pluginManagement? Why are configuring the descriptor in the parent? Are you trying to make an assembly in the parent as well as in the child? /Anders On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId artifactIdNAME/artifactId versionVERSION/version relativePath../pom.xml/relativePath /parent and also declared the assembly plugin: plugin artifactIdmaven-assembly-plugin/artifactId executions execution idcreate-assembly/id phasepackage/phase goals goalsingle/goal /goals configuration descriptors descriptorconfig/assembly.xml/descriptor /descriptors /configuration /execution /executions /plugin The assembly.xml is placed in the distribution/config directory and looks like this: idtest/id formats formatdir/format /formats includeBaseDirectoryfalse/includeBaseDirectory moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectoryTOOLS/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets If I execute mvn clean package I get following error message: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The assembly id test is used more than once. [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. [INFO] If I execute mvn assembly:single then the message that assembly id used more than once disappears. I use Maven 2.2.1 on WinXp Pro Can somebody help me?
RE: mvn compile works mvn site-deploy causes complation error
In this URL you can see the complete output running mvn site -X in the module which error: http://pastebin.com/8yV8WBQh Is the same error I get when I run mvn site:stage in the root project Let me know if you need more info Thanks From: Wayne Fay [via Maven] [ml-node+4344305-1193890786-202...@n5.nabble.com] Sent: 27 April 2011 18:40 To: Leandro Iriarte Subject: Re: mvn compile works mvn site-deploy causes complation error I did it, I get a really large output in the console, which finally shows tyhe message i wrote above :/ Yes, but somewhere just above the error message, you should see which plugin is running. Without that info it's difficult to help you. Please copy and paste the entire output and post it somewhere like pastebin.com, and send the link here so we can analyze it. Do not send the full debug log here via email. Wayne - To unsubscribe, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4344305i=0by-user=t For additional commands, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4344305i=1by-user=t If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/mvn-compile-works-mvn-site-deploy-causes-complation-error-tp4343797p4344305.html To unsubscribe from mvn compile works mvn site-deploy causes complation error, click herehttp://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4343797code=bGVhbmRyby5pcmlhcnRlQGZ1c2VpbS5jb218NDM0Mzc5N3wtMTQ1MTMwNzY1. -- View this message in context: http://maven.40175.n5.nabble.com/mvn-compile-works-mvn-site-deploy-causes-complation-error-tp4343797p4346486.html Sent from the Maven - Users mailing list archive at Nabble.com.
Re: Assembly Plugin Problem with multi module Project
Thanks for the reply! 2011/4/28 Anders Hammar and...@hammar.net The declaration in your parent, is that a binding? Or is it in pluginManagement? Well I don't really understand what do you mean with binding :) The assembly plugin is declared between the plugins/ tags: plugins plugin Assembly declaration /plugin /plugins Why are configuring the descriptor in the parent? Are you trying to make an assembly in the parent as well as in the child? I configure the descriptor in the parent because I have read this under the link below (maven documentation). And I am not really shure it is right... I am trying now to make an assembly from the child project but the main target is preety simple: After compiling (mvn install) of the whole project (from the parent level) I want to find in the distribution directory some artifacts like binaries, some skripts, zips etc. I have already used this plugin for a child project to build a zip file and it worked :( /Anders On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId artifactIdNAME/artifactId versionVERSION/version relativePath../pom.xml/relativePath /parent and also declared the assembly plugin: plugin artifactIdmaven-assembly-plugin/artifactId executions execution idcreate-assembly/id phasepackage/phase goals goalsingle/goal /goals configuration descriptors descriptorconfig/assembly.xml/descriptor /descriptors /configuration /execution /executions /plugin The assembly.xml is placed in the distribution/config directory and looks like this: idtest/id formats formatdir/format /formats includeBaseDirectoryfalse/includeBaseDirectory moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectoryTOOLS/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets If I execute mvn clean package I get following error message: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The assembly id test is used more than once. [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. [INFO] If I execute mvn assembly:single then the message that assembly id used more than once disappears. I use Maven 2.2.1 on WinXp Pro Can somebody help me?
Re: Making findbugs:check fail on only high bugs
can you please explain? Sonar is a server by itself, how i can i use it while running a job on jenkins? is there a maven plugin i can use together with the findbugs without installing sonar? Eyal. On Thu, Apr 28, 2011 at 4:13 PM, Yanko, Curtis curt_ya...@uhc.com wrote: This might be a good place to try Sonar along with the Build Breaker plugin. Curt Yanko -Original Message- From: eyal edri [mailto:eyal.e...@gmail.com] Sent: Thursday, April 28, 2011 8:39 AM To: Maven Users List Subject: Making findbugs:check fail on only high bugs Hi, i'm running the maven findbugs plugin (via jenkins) and want it to fail only when it find High Level bugs. when running findbugs:findbugs the build doesn't fail and only show the list of plugins. when running findbugs:check, the build fails when it encouters the low level bugs. how can i tell it to fail the build only on high ? i've tried settings the threshold param to high, but i believe this only affect the bugs shown on the report and not the build fail level. can anyone help? thanks Eyal. This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
PluginRepositories Vs Repositories
Hi All, Why maven POM has a different section of repositories for plugin ? I am talking about pluginRepositories. I means repositories section itself tell maven to look for the plugins in its repositories. Is it to minimize the search scope for maven while looking for plugins? or it adds some more value than just minimizing search scope. Thanks, Amaresh
Re: Assembly Plugin Problem with multi module Project
Ok, the log output indicates that the assembly is executed twice (there is a warning about the same id used twice). Start by removing any assembly configuration from your parent, to keep things simple. Just add it yo your module. When you get that to work you could start by doing advanced stuff. /Anders On Thu, Apr 28, 2011 at 15:37, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Thanks for the reply! 2011/4/28 Anders Hammar and...@hammar.net The declaration in your parent, is that a binding? Or is it in pluginManagement? Well I don't really understand what do you mean with binding :) The assembly plugin is declared between the plugins/ tags: plugins plugin Assembly declaration /plugin /plugins Why are configuring the descriptor in the parent? Are you trying to make an assembly in the parent as well as in the child? I configure the descriptor in the parent because I have read this under the link below (maven documentation). And I am not really shure it is right... I am trying now to make an assembly from the child project but the main target is preety simple: After compiling (mvn install) of the whole project (from the parent level) I want to find in the distribution directory some artifacts like binaries, some skripts, zips etc. I have already used this plugin for a child project to build a zip file and it worked :( /Anders On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId artifactIdNAME/artifactId versionVERSION/version relativePath../pom.xml/relativePath /parent and also declared the assembly plugin: plugin artifactIdmaven-assembly-plugin/artifactId executions execution idcreate-assembly/id phasepackage/phase goals goalsingle/goal /goals configuration descriptors descriptorconfig/assembly.xml/descriptor /descriptors /configuration /execution /executions /plugin The assembly.xml is placed in the distribution/config directory and looks like this: idtest/id formats formatdir/format /formats includeBaseDirectoryfalse/includeBaseDirectory moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectoryTOOLS/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets If I execute mvn clean package I get following error message: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The assembly id test is used more than once. [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. [INFO] If I execute mvn assembly:single then the message that assembly id used more than once disappears. I use Maven 2.2.1 on WinXp Pro Can somebody help me?
Re: mvn compile works mvn site-deploy causes complation error
In this URL you can see the complete output running mvn site -X in the module which error: http://pastebin.com/8yV8WBQh Is the same error I get when I run mvn site:stage in the root project It is really not hard to scan a debug log and find problems. Look near the bottom of your log for lines that say [ERROR]. It appears you have some annotation issues in PollMessages and CreateProcessListener. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: PluginRepositories Vs Repositories
Why maven POM has a different section of repositories for plugin ? I am talking about pluginRepositories. I means repositories section itself tell maven to look for the plugins in its repositories. Is it to minimize the search scope for maven while looking for plugins? or it adds some more value than just minimizing search scope. This is to support the use case in some organizations where project dependencies must be locked down to a fairly strict list due to governance reasons etc, but plugins are less locked down. Or vice versa. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: mvn compile works mvn site-deploy causes complation error
Thanks Wayne. I've just solved it adding one dependency to the project. Why that problem only appears with mvn site and not with mvn deploy? Also sometimes if I run mvn install site:stage (with install before) I don't get errors, otherwise I do. Why is this happening? Thanks again! From: Wayne Fay [via Maven] [ml-node+4346618-1269415335-202...@n5.nabble.com] Sent: 28 April 2011 15:27 To: Leandro Iriarte Subject: Re: mvn compile works mvn site-deploy causes complation error In this URL you can see the complete output running mvn site -X in the module which error: http://pastebin.com/8yV8WBQh Is the same error I get when I run mvn site:stage in the root project It is really not hard to scan a debug log and find problems. Look near the bottom of your log for lines that say [ERROR]. It appears you have some annotation issues in PollMessages and CreateProcessListener. Wayne - To unsubscribe, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4346618i=0by-user=t For additional commands, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4346618i=1by-user=t If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/mvn-compile-works-mvn-site-deploy-causes-complation-error-tp4343797p4346618.html To unsubscribe from mvn compile works mvn site-deploy causes complation error, click herehttp://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4343797code=bGVhbmRyby5pcmlhcnRlQGZ1c2VpbS5jb218NDM0Mzc5N3wtMTQ1MTMwNzY1. -- View this message in context: http://maven.40175.n5.nabble.com/mvn-compile-works-mvn-site-deploy-causes-complation-error-tp4343797p4346660.html Sent from the Maven - Users mailing list archive at Nabble.com.
Re: Assembly Plugin Problem with multi module Project
Well I just removed the assembly declaration from the parent POM. I just left there the new distribution module. When I change to the distribution folder and execute mvn assembly:single or mvn clean package I get this: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. Well the descriptor war reas only once, but we still see the double warning about failed trigger :( But the assembly configuration is right: moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectorytools/caseviewer/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets 2011/4/28 Anders Hammar and...@hammar.net Ok, the log output indicates that the assembly is executed twice (there is a warning about the same id used twice). Start by removing any assembly configuration from your parent, to keep things simple. Just add it yo your module. When you get that to work you could start by doing advanced stuff. /Anders On Thu, Apr 28, 2011 at 15:37, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Thanks for the reply! 2011/4/28 Anders Hammar and...@hammar.net The declaration in your parent, is that a binding? Or is it in pluginManagement? Well I don't really understand what do you mean with binding :) The assembly plugin is declared between the plugins/ tags: plugins plugin Assembly declaration /plugin /plugins Why are configuring the descriptor in the parent? Are you trying to make an assembly in the parent as well as in the child? I configure the descriptor in the parent because I have read this under the link below (maven documentation). And I am not really shure it is right... I am trying now to make an assembly from the child project but the main target is preety simple: After compiling (mvn install) of the whole project (from the parent level) I want to find in the distribution directory some artifacts like binaries, some skripts, zips etc. I have already used this plugin for a child project to build a zip file and it worked :( /Anders On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId artifactIdNAME/artifactId versionVERSION/version relativePath../pom.xml/relativePath /parent and also declared the assembly plugin: plugin artifactIdmaven-assembly-plugin/artifactId executions execution idcreate-assembly/id phasepackage/phase goals goalsingle/goal /goals configuration descriptors descriptorconfig/assembly.xml/descriptor /descriptors /configuration /execution /executions /plugin The assembly.xml is placed in the distribution/config directory and looks like this: idtest/id formats formatdir/format /formats includeBaseDirectoryfalse/includeBaseDirectory moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries
Re: Assembly Plugin Problem with multi module Project
No, you should not use moduleSet but dependencySet (or similar, I'm not at my computer and cannot check syntax). /Anders (mobile) Den 28 apr 2011 17.14 skrev Dmitriy Neretin dmitriy.nere...@googlemail.com: Well I just removed the assembly declaration from the parent POM. I just left there the new distribution module. When I change to the distribution folder and execute mvn assembly:single or mvn clean package I get this: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. Well the descriptor war reas only once, but we still see the double warning about failed trigger :( But the assembly configuration is right: moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectorytools/caseviewer/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets 2011/4/28 Anders Hammar and...@hammar.net Ok, the log output indicates that the assembly is executed twice (there is a warning about the same id used twice). Start by removing any assembly configuration from your parent, to keep things simple. Just add it yo your module. When you get that to work you could start by doing advanced stuff. /Anders On Thu, Apr 28, 2011 at 15:37, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Thanks for the reply! 2011/4/28 Anders Hammar and...@hammar.net The declaration in your parent, is that a binding? Or is it in pluginManagement? Well I don't really understand what do you mean with binding :) The assembly plugin is declared between the plugins/ tags: plugins plugin Assembly declaration /plugin /plugins Why are configuring the descriptor in the parent? Are you trying to make an assembly in the parent as well as in the child? I configure the descriptor in the parent because I have read this under the link below (maven documentation). And I am not really shure it is right... I am trying now to make an assembly from the child project but the main target is preety simple: After compiling (mvn install) of the whole project (from the parent level) I want to find in the distribution directory some artifacts like binaries, some skripts, zips etc. I have already used this plugin for a child project to build a zip file and it worked :( /Anders On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId artifactIdNAME/artifactId versionVERSION/version relativePath../pom.xml/relativePath /parent and also declared the assembly plugin: plugin artifactIdmaven-assembly-plugin/artifactId executions execution idcreate-assembly/id phasepackage/phase goals goalsingle/goal /goals configuration descriptors descriptorconfig/assembly.xml/descriptor /descriptors /configuration /execution /executions /plugin The assembly.xml is placed in the distribution/config directory and looks like this: idtest/id formats formatdir/format /formats includeBaseDirectoryfalse/includeBaseDirectory moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectoryTOOLS/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets If I execute mvn clean package I get following
Re: mvn compile works mvn site-deploy causes complation error
Leandro wrote: Thanks Wayne. I've just solved it adding one dependency to the project. Why that problem only appears with mvn site and not with mvn deploy? It's the javadoc report that bombs because of missing annotation deps, and javadoc only runs with site. Also sometimes if I run mvn install site:stage (with install before) I don't get errors, otherwise I do. Why is this happening? See http://jira.codehaus.org/browse/MSITE-171 HTH, -Lukas Thanks again! From: Wayne Fay [via Maven] [ml-node+4346618-1269415335-202...@n5.nabble.com] Sent: 28 April 2011 15:27 To: Leandro Iriarte Subject: Re: mvn compile works mvn site-deploy causes complation error In this URL you can see the complete output running mvn site -X in the module which error: http://pastebin.com/8yV8WBQh Is the same error I get when I run mvn site:stage in the root project It is really not hard to scan a debug log and find problems. Look near the bottom of your log for lines that say [ERROR]. It appears you have some annotation issues in PollMessages and CreateProcessListener. Wayne - To unsubscribe, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4346618i=0by-user=t For additional commands, e-mail: [hidden email]/user/SendEmail.jtp?type=nodenode=4346618i=1by-user=t If you reply to this email, your message will be added to the discussion below: http://maven.40175.n5.nabble.com/mvn-compile-works-mvn-site-deploy-causes-complation-error-tp4343797p4346618.html To unsubscribe from mvn compile works mvn site-deploy causes complation error, click herehttp://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4343797code=bGVhbmRyby5pcmlhcnRlQGZ1c2VpbS5jb218NDM0Mzc5N3wtMTQ1MTMwNzY1. -- View this message in context: http://maven.40175.n5.nabble.com/mvn-compile-works-mvn-site-deploy-causes-complation-error-tp4343797p4346660.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: mvn test and classpath: do I need to execute install?
Hmmm...I'm actually not seeing this: C:\workspace\topmvn clean test -pl module2 -X + Error stacktraces are turned on. Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400) Java version: 1.6.0_24 Java home: C:\Program Files\Java\jdk1.6.0_24\jre Default locale: en_US, platform encoding: Cp1252 OS name: windows xp version: 5.1 arch: x86 Family: windows [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\...\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'C:\devtk\maven\bin\..\conf\plugin-registry.xml' [INFO] Scanning for projects... [DEBUG] Adding managed dependencies for top [DEBUG] module1:jar:4.3.000.CE-SNAPSHOT [DEBUG] module2:jar:4.3.000.CE-SNAPSHOT ... [DEBUG] test classpath classpath: [DEBUG] C:\workspace\top\module2\target\test-classes [DEBUG] C:\workspace\top\module2\target\classes [DEBUG] C:\.m2\repository\module1\4.3.000.CE-SNAPSHOT\module1-4.3.000.CE-SNAPSHOT.jar [DEBUG] C:\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar [DEBUG] C:\.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar [DEBUG] C:\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar [DEBUG] C:\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar [DEBUG] C:\.m2\repository\javax\mail\mail\1.4.1\mail-1.4.1.jar [DEBUG] C:\.m2\repository\org\dbunit\dbunit\2.4.7\dbunit-2.4.7.jar [DEBUG] C:\.m2\repository\junit\junit\4.7\junit-4.7.jar ... You can see it pulls in the target folder for module2, but not for the module1 project module2 depends on. Am I executing this in the wrong manner? -- View this message in context: http://maven.40175.n5.nabble.com/mvn-test-and-classpath-do-I-need-to-execute-install-tp4327921p4346851.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Assembly Plugin Problem with multi module Project
Holy sh... :)) Of cource it works :) But it is not really that what I wanted but it's not important now :) Thank you very much. But I still don't understand why the moduleSet didn't work... Strange (How old is the maven documentation). With this variable ${project.parent.basedir} I can get access on parent directory structure. So I hope to solve my problems completly! Have a nice day! 2011/4/28 Anders Hammar and...@hammar.net No, you should not use moduleSet but dependencySet (or similar, I'm not at my computer and cannot check syntax). /Anders (mobile) Den 28 apr 2011 17.14 skrev Dmitriy Neretin dmitriy.nere...@googlemail.com: Well I just removed the assembly declaration from the parent POM. I just left there the new distribution module. When I change to the distribution folder and execute mvn assembly:single or mvn clean package I get this: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. Well the descriptor war reas only once, but we still see the double warning about failed trigger :( But the assembly configuration is right: moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectorytools/caseviewer/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets 2011/4/28 Anders Hammar and...@hammar.net Ok, the log output indicates that the assembly is executed twice (there is a warning about the same id used twice). Start by removing any assembly configuration from your parent, to keep things simple. Just add it yo your module. When you get that to work you could start by doing advanced stuff. /Anders On Thu, Apr 28, 2011 at 15:37, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Thanks for the reply! 2011/4/28 Anders Hammar and...@hammar.net The declaration in your parent, is that a binding? Or is it in pluginManagement? Well I don't really understand what do you mean with binding :) The assembly plugin is declared between the plugins/ tags: plugins plugin Assembly declaration /plugin /plugins Why are configuring the descriptor in the parent? Are you trying to make an assembly in the parent as well as in the child? I configure the descriptor in the parent because I have read this under the link below (maven documentation). And I am not really shure it is right... I am trying now to make an assembly from the child project but the main target is preety simple: After compiling (mvn install) of the whole project (from the parent level) I want to find in the distribution directory some artifacts like binaries, some skripts, zips etc. I have already used this plugin for a child project to build a zip file and it worked :( /Anders On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId artifactIdNAME/artifactId versionVERSION/version relativePath../pom.xml/relativePath /parent and also declared the assembly plugin: plugin artifactIdmaven-assembly-plugin/artifactId executions execution idcreate-assembly/id phasepackage/phase goals goalsingle/goal /goals configuration descriptors descriptorconfig/assembly.xml/descriptor
Query of Maven Plugin Execution Sequence
Hi Maven Support / Developer / User, I have some query on maven plugin execution sequence. I am not sure if I should seek help through this mail address. When I specify 2 third-party maven plugins in my POM with the phase, that is to say, these two plugins will execute in same life cycle. It will bring uncertain execution result if the two plugin execution sequence is depending on build time random decision. How does maven choose which plugin execute firstly and another plugin excute secondly when 2 plugin with the same phase ? For the two maven built-in plugins with the same phase, is the execution sequence difference from the two third-party's plugins ? When the maven built-in plugin and third-party plugin are both specified in POM with the same phase, Do the maven built-in plugin with take procedure to execute ? These three questions make me some confused. Could anyone please help... Thanks and Regards. Welsney
Re: Assembly Plugin Problem with multi module Project
You should not traverse the file structure but rely on dependencies! It should work building when just checking out this specific module from scm. /Anders On Thu, Apr 28, 2011 at 18:01, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Holy sh... :)) Of cource it works :) But it is not really that what I wanted but it's not important now :) Thank you very much. But I still don't understand why the moduleSet didn't work... Strange (How old is the maven documentation). With this variable ${project.parent.basedir} I can get access on parent directory structure. So I hope to solve my problems completly! Have a nice day! 2011/4/28 Anders Hammar and...@hammar.net No, you should not use moduleSet but dependencySet (or similar, I'm not at my computer and cannot check syntax). /Anders (mobile) Den 28 apr 2011 17.14 skrev Dmitriy Neretin dmitriy.nere...@googlemail.com: Well I just removed the assembly declaration from the parent POM. I just left there the new distribution module. When I change to the distribution folder and execute mvn assembly:single or mvn clean package I get this: [INFO] Reading assembly descriptor: config/assembly.xml [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] The following patterns were never triggered in this artifact inclusion filter: o 'A' [WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occu rs. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to create assembly: Error creating assembly archive test: You must set at least one file. Well the descriptor war reas only once, but we still see the double warning about failed trigger :( But the assembly configuration is right: moduleSets moduleSet useAllReactorProjectstrue/useAllReactorProjects includes includeA/include /includes binaries outputDirectorytools/caseviewer/outputDirectory unpackfalse/unpack /binaries /moduleSet /moduleSets 2011/4/28 Anders Hammar and...@hammar.net Ok, the log output indicates that the assembly is executed twice (there is a warning about the same id used twice). Start by removing any assembly configuration from your parent, to keep things simple. Just add it yo your module. When you get that to work you could start by doing advanced stuff. /Anders On Thu, Apr 28, 2011 at 15:37, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Thanks for the reply! 2011/4/28 Anders Hammar and...@hammar.net The declaration in your parent, is that a binding? Or is it in pluginManagement? Well I don't really understand what do you mean with binding :) The assembly plugin is declared between the plugins/ tags: plugins plugin Assembly declaration /plugin /plugins Why are configuring the descriptor in the parent? Are you trying to make an assembly in the parent as well as in the child? I configure the descriptor in the parent because I have read this under the link below (maven documentation). And I am not really shure it is right... I am trying now to make an assembly from the child project but the main target is preety simple: After compiling (mvn install) of the whole project (from the parent level) I want to find in the distribution directory some artifacts like binaries, some skripts, zips etc. I have already used this plugin for a child project to build a zip file and it worked :( /Anders On Thu, Apr 28, 2011 at 15:03, Dmitriy Neretin dmitriy.nere...@googlemail.com wrote: Hello everybody, I have a problem with the assembly plugin. I used the following documentation: http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html I created the additional module to keep my assembly in the parent POM: ... modules moduleA/module moduleB/module moduleC/module moduledistribution/module /modules ... and declared the assembly plugin in the parent POM: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-assembly-plugin/artifactId version2.2.1/version configuration descriptorconfig/assembly.xml/descriptor /configuration /plugin after that I declared the new POM in the distribution directory where I also referenced the parent POM: parent groupIdGROUPNAME/groupId
Re: Query of Maven Plugin Execution Sequence
It will bring uncertain execution result if the two plugin execution sequence is depending on build time random decision. How does maven choose which plugin execute firstly and another plugin excute secondly when 2 plugin with the same phase ? For the two maven built-in plugins with the same phase, is the execution sequence difference from the two third-party's plugins ? When the maven built-in plugin and third-party plugin are both specified in POM with the same phase, Do the maven built-in plugin with take procedure to execute ? These are somewhat complicated questions to answer. Depending on the version of Maven you are using, you will see different results. The best way to guarantee that plugin1 executes before plugin2 is to bind them to separate phases. Is this what you are really trying to get answered, or do you need to have all of your questions answered? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
reordering the lifecycle
I have a huge tree of ant based projects i'm trying to convert to maven. I have the mechanics worked about except for a minor hitch: I need the test phase to be the last one executed. Since all of this code is test code there will be no artifacts to install, no deployments run. But I need to, say, generate the war files before surefire kicks off and runs the test. How can I do that? Could I bind the surefire plugin to the install phase instead?
Re: reordering the lifecycle
Wouldn't it be easier to use the integration-test phase instead of the test phase? The integration-test phase runs after the package phase, and can be used to run tests later in the lifecycle. Just a thought, Ed On Fri, Apr 29, 2011 at 7:35 AM, Justin Lee evancho...@gmail.com wrote: I have a huge tree of ant based projects i'm trying to convert to maven. I have the mechanics worked about except for a minor hitch: I need the test phase to be the last one executed. Since all of this code is test code there will be no artifacts to install, no deployments run. But I need to, say, generate the war files before surefire kicks off and runs the test. How can I do that? Could I bind the surefire plugin to the install phase instead?
Re: reordering the lifecycle
I'd be all up for that. How do I configure that? On Thu, Apr 28, 2011 at 6:02 PM, Ed Hillmann ed.hillm...@gmail.com wrote: Wouldn't it be easier to use the integration-test phase instead of the test phase? The integration-test phase runs after the package phase, and can be used to run tests later in the lifecycle. Just a thought, Ed On Fri, Apr 29, 2011 at 7:35 AM, Justin Lee evancho...@gmail.com wrote: I have a huge tree of ant based projects i'm trying to convert to maven. I have the mechanics worked about except for a minor hitch: I need the test phase to be the last one executed. Since all of this code is test code there will be no artifacts to install, no deployments run. But I need to, say, generate the war files before surefire kicks off and runs the test. How can I do that? Could I bind the surefire plugin to the install phase instead?
Re: reordering the lifecycle
google to the rescue! found it. thanks for the tip. On Thu, Apr 28, 2011 at 6:32 PM, Justin Lee evancho...@gmail.com wrote: I'd be all up for that. How do I configure that? On Thu, Apr 28, 2011 at 6:02 PM, Ed Hillmann ed.hillm...@gmail.comwrote: Wouldn't it be easier to use the integration-test phase instead of the test phase? The integration-test phase runs after the package phase, and can be used to run tests later in the lifecycle. Just a thought, Ed On Fri, Apr 29, 2011 at 7:35 AM, Justin Lee evancho...@gmail.com wrote: I have a huge tree of ant based projects i'm trying to convert to maven. I have the mechanics worked about except for a minor hitch: I need the test phase to be the last one executed. Since all of this code is test code there will be no artifacts to install, no deployments run. But I need to, say, generate the war files before surefire kicks off and runs the test. How can I do that? Could I bind the surefire plugin to the install phase instead?
RE: reordering the lifecycle
you can create a custom lifecycle which identifies the artifacts you wish to execute in \META-INF\maven\lifecycles.xml http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 29 Apr 2011 08:02:16 +1000 Subject: Re: reordering the lifecycle From: ed.hillm...@gmail.com To: users@maven.apache.org Wouldn't it be easier to use the integration-test phase instead of the test phase? The integration-test phase runs after the package phase, and can be used to run tests later in the lifecycle. Just a thought, Ed On Fri, Apr 29, 2011 at 7:35 AM, Justin Lee evancho...@gmail.com wrote: I have a huge tree of ant based projects i'm trying to convert to maven. I have the mechanics worked about except for a minor hitch: I need the test phase to be the last one executed. Since all of this code is test code there will be no artifacts to install, no deployments run. But I need to, say, generate the war files before surefire kicks off and runs the test. How can I do that? Could I bind the surefire plugin to the install phase instead?
Building a -classpath for a plugin, from the inside?
Hi folks, I'm working on upgrading a Maven plugin that runs Apache DS[0] to use the latest version of their software. Unfortunately, the latest version of their software does something slightly slack-jawed on startup: it inspects the java.class.path system property to locate JARs that contain core LDAP schemata. There is no alternate loader mechanism. When this happens inside a plugin, the java.class.path system property contains one JAR: Maven's own launcher JAR. I think the shortest path from where I am to working software is to fake up java.class.path before running Apache DS and then to reset it back to its real value after the server starts. However, in order to do this, I need to build a classpath-like string containing the JARs Apache DS needs. These JARs are already listed in the plugin's dependencies (and when the plugin runs, are available in the local repository). I'd like to use that information if possible, rather than hard-coding specific JAR names into the plugin. However, after spending half the day looking through various existing plugins, I'm no closer to doing this than I was this morning. 1. Is there a shortcut I missed that produces exactly the string (or list of JARs) I need? 2. If not, is there a reasonable way to obtain the dependency artifacts for a plugin? 3. If not, what's a better solution that doesn't involve patching Apache DS? -o [0] https://bitbucket.org/ojacobson/apacheds-maven-plugin/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
How to include . in generated Class-Path manifest?
I'm trying to use the maven-jar-plugin to create an executable jar that includes not only the artifact's dependencies **but also** the current working directory (.). How can I do this easily? Here's my plugin config: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration archive manifest mainClassorg.springframework.batch.core.launch.support.CommandLineJobRunner/mainClass addClasspathtrue/addClasspath classpathPrefixlib//classpathPrefix /manifest /archive /configuration /plugin It would be nice if I could tell the plugin, Hey, please include . in the list of classpath entries! Thanks, Matthew-- View this message in context: http://maven.40175.n5.nabble.com/How-to-include-in-generated-Class-Path-manifest-tp4357436p4357436.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Building a -classpath for a plugin, from the inside?
adding a configuration parameter to the plugin such as additionalClasspathElements from surefire plugin would allow additonal entries to the cp http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html does this help?? Martin __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: owen.jacob...@grimoire.ca Subject: Building a -classpath for a plugin, from the inside? Date: Thu, 28 Apr 2011 19:27:45 -0400 To: users@maven.apache.org Hi folks, I'm working on upgrading a Maven plugin that runs Apache DS[0] to use the latest version of their software. Unfortunately, the latest version of their software does something slightly slack-jawed on startup: it inspects the java.class.path system property to locate JARs that contain core LDAP schemata. There is no alternate loader mechanism. When this happens inside a plugin, the java.class.path system property contains one JAR: Maven's own launcher JAR. I think the shortest path from where I am to working software is to fake up java.class.path before running Apache DS and then to reset it back to its real value after the server starts. However, in order to do this, I need to build a classpath-like string containing the JARs Apache DS needs. These JARs are already listed in the plugin's dependencies (and when the plugin runs, are available in the local repository). I'd like to use that information if possible, rather than hard-coding specific JAR names into the plugin. However, after spending half the day looking through various existing plugins, I'm no closer to doing this than I was this morning. 1. Is there a shortcut I missed that produces exactly the string (or list of JARs) I need? 2. If not, is there a reasonable way to obtain the dependency artifacts for a plugin? 3. If not, what's a better solution that doesn't involve patching Apache DS? -o [0] https://bitbucket.org/ojacobson/apacheds-maven-plugin/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Building a -classpath for a plugin, from the inside?
Owen: As far as getting a nice pre-crafted classpath element string from the plugin's dependencies, I am not aware of an API call that will do that like we can for MavenProject classpaths (project.getRuntimeClasspathElements(), etc.). However, the plugin's dependencies are available in the following ways (maybe more): /** * @parameter expression=${plugin.artifacts} * @required */ private ListArtifact pluginArtifacts; /** * @parameter expression=${plugin.dependencies} * @required */ private ListDependency pluginDependencies; I think the classpath would need to be constructed by using the dependency info from above and resolving the artifacts from a repository as demonstrated in the following blog post. http://blogs.webtide.com/janb/entry/extending_the_maven_plugin_classpath Hope that helps. If others know of a better way to accomplish this I would be interested in this as well. -Ryan On Thu, Apr 28, 2011 at 7:27 PM, Owen Jacobson owen.jacob...@grimoire.cawrote: Hi folks, I'm working on upgrading a Maven plugin that runs Apache DS[0] to use the latest version of their software. Unfortunately, the latest version of their software does something slightly slack-jawed on startup: it inspects the java.class.path system property to locate JARs that contain core LDAP schemata. There is no alternate loader mechanism. When this happens inside a plugin, the java.class.path system property contains one JAR: Maven's own launcher JAR. I think the shortest path from where I am to working software is to fake up java.class.path before running Apache DS and then to reset it back to its real value after the server starts. However, in order to do this, I need to build a classpath-like string containing the JARs Apache DS needs. These JARs are already listed in the plugin's dependencies (and when the plugin runs, are available in the local repository). I'd like to use that information if possible, rather than hard-coding specific JAR names into the plugin. However, after spending half the day looking through various existing plugins, I'm no closer to doing this than I was this morning. 1. Is there a shortcut I missed that produces exactly the string (or list of JARs) I need? 2. If not, is there a reasonable way to obtain the dependency artifacts for a plugin? 3. If not, what's a better solution that doesn't involve patching Apache DS? -o [0] https://bitbucket.org/ojacobson/apacheds-maven-plugin/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to include . in generated Class-Path manifest?
Nevermind. Answered my own question. Added manifestEntries Class-Path./Class-Path /manifestEntries after manifest section. Worked nicely. -matthew-- View this message in context: http://maven.40175.n5.nabble.com/How-to-include-in-generated-Class-Path-manifest-tp4357436p4357850.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
M2 plugin in Eclipse and the /target directory...
Hi guys... I was wondering why it is that, in eclipse, (when using the M2 plugin), my target directory is empty ? I thought that maven generally builds all projects into .jar files in the /target folder by default . -- View this message in context: http://maven.40175.n5.nabble.com/M2-plugin-in-Eclipse-and-the-target-directory-tp4357871p4357871.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
M2 plugin in Eclipse and the /target directory...
Hi guys... I was wondering why it is that, in eclipse, (when using the M2 plugin), my target directory is empty ? I thought that maven generally builds all projects into .jar files in the /target folder by default . -- View this message in context: http://maven.40175.n5.nabble.com/M2-plugin-in-Eclipse-and-the-target-directory-tp4357872p4357872.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: M2 plugin in Eclipse and the /target directory...
Eclipse always hides the build results and /target/classes is defined as build folder in the build path. This happens also with the /bin folder in a standard Java project. Besides, this is the wrong mailing list for m2eclipse, you can find there the right adresses: http://m2eclipse.sonatype.org/project-information.html Manuel On Fri, Apr 29, 2011 at 06:36, glob157 jayunit...@gmail.com wrote: Hi guys... I was wondering why it is that, in eclipse, (when using the M2 plugin), my target directory is empty ? I thought that maven generally builds all projects into .jar files in the /target folder by default . -- View this message in context: http://maven.40175.n5.nabble.com/M2-plugin-in-Eclipse-and-the-target-directory-tp4357871p4357871.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 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org