RE: Any tool available for generating docs from pom.xml?
Ok, to make it clear, what do you want to report about. The dependencies report show all your dependencies, the jdepend report indeed reports about packages, and so there are numerous more reports. If you can make clear what you want, maybe that will help finding a solution. With regards, Nick Stolwijk -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wed 1/23/2008 3:37 PM To: Maven Users List Subject: Re: Any tool available for generating docs from pom.xml? Isn't jdepend plug in more about the packages and classes of the build? Not sure. Just what I got after seeing the report it generated. On Jan 23, 2008 6:27 PM, Guillaume Lederrey [EMAIL PROTECTED] wrote: You have the jdepend plugin that will do some analysis of your dependencies (http://mojo.codehaus.org/jdepend-maven-plugin/). And I think that the maven-dependency-plugin provide a report as well ... On 23/01/2008, amit kumar [EMAIL PROTECTED] wrote: No reports for my dependencies, like the expectation is something like having a table generated with artifact name and the versions... ( if there is something more than that in reports its fine, but that is the minimum). Regards, Amit On Jan 23, 2008 2:02 PM, Stephen Connolly [EMAIL PROTECTED] wrote: The site plugin's info reports? On Jan 23, 2008 7:58 AM, amit kumar [EMAIL PROTECTED] wrote: Hi, I know this would sound stupid ( as it sounded to me when asked ), but is there any such tool using which you can generate a doc in tabular format with the information stored in pom.xml mainly the dependency part. Please let me know in case there exists one tool. Regards, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jabber : [EMAIL PROTECTED] Skype : Guillaume.Lederrey Projects : * http://rwanda.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Any tool available for generating docs from pom.xml?
As far as I know, there is no default way of reporting in a different format. I know of some plugins, which can report in XML and HTML format, but each plugin has different configuration to accomplish that. cobertura-maven-plugin: configuration formats formatxml/format formathtml/format /formats /configuration findbugs-maven-plugin: configuration xmlOutputtrue/xmlOutput /configuration The only thing I can think of is c/p the report from the HTML page and into a document (I presume you mean DOC or ODF document) or let them just get used to the kind of reports you deliver (That has worked for me in the past, especially when they heard, that the documentation was generated automatically every day by a CI server) Hth, Nick Stolwijk -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wed 1/23/2008 3:47 PM To: Maven Users List Subject: Re: Any tool available for generating docs from pom.xml? Thanks Nick. I am sorry for my lack of expression. But what mvn site generates is what I am expected to report about by in a doc rather than a web page ( I told you it would sound stupid). Thanks a ton for the kind help. regards, Amit On Jan 23, 2008 8:09 PM, [EMAIL PROTECTED] wrote: Ok, to make it clear, what do you want to report about. The dependencies report show all your dependencies, the jdepend report indeed reports about packages, and so there are numerous more reports. If you can make clear what you want, maybe that will help finding a solution. With regards, Nick Stolwijk -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wed 1/23/2008 3:37 PM To: Maven Users List Subject: Re: Any tool available for generating docs from pom.xml? Isn't jdepend plug in more about the packages and classes of the build? Not sure. Just what I got after seeing the report it generated. On Jan 23, 2008 6:27 PM, Guillaume Lederrey [EMAIL PROTECTED] wrote: You have the jdepend plugin that will do some analysis of your dependencies (http://mojo.codehaus.org/jdepend-maven-plugin/). And I think that the maven-dependency-plugin provide a report as well ... On 23/01/2008, amit kumar [EMAIL PROTECTED] wrote: No reports for my dependencies, like the expectation is something like having a table generated with artifact name and the versions... ( if there is something more than that in reports its fine, but that is the minimum). Regards, Amit On Jan 23, 2008 2:02 PM, Stephen Connolly [EMAIL PROTECTED] wrote: The site plugin's info reports? On Jan 23, 2008 7:58 AM, amit kumar [EMAIL PROTECTED] wrote: Hi, I know this would sound stupid ( as it sounded to me when asked ), but is there any such tool using which you can generate a doc in tabular format with the information stored in pom.xml mainly the dependency part. Please let me know in case there exists one tool. Regards, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jabber : [EMAIL PROTECTED] Skype : Guillaume.Lederrey Projects : * http://rwanda.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Any tool available for generating docs from pom.xml?
When you start replicating reporting code to get a different output, I guess there is a flaw in Maven. Seeing that the Sink is an interface, it should be possible to supply the reporting plugins with a different implementation of the Sink to get the correct output format. I don't know what kind of Sinks there are available or how to configure the Sink. With regards, Nick Stolwijk -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Wed 1/23/2008 4:40 PM To: Maven Users List Subject: Re: Any tool available for generating docs from pom.xml? Alternatively, you could create a new reporting plugin that outputs the list in the format that you require. But this seems a bit excessive when the list is already being generated in HTML, and I certainly wouldn't do it unless my job or life depended on it. As Nick suggested, point them to the mvn site generated automatically every day/hour by your CI server and move on to the next issue. Wayne On 1/23/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: As far as I know, there is no default way of reporting in a different format. I know of some plugins, which can report in XML and HTML format, but each plugin has different configuration to accomplish that. cobertura-maven-plugin: configuration formats formatxml/format formathtml/format /formats /configuration findbugs-maven-plugin: configuration xmlOutputtrue/xmlOutput /configuration The only thing I can think of is c/p the report from the HTML page and into a document (I presume you mean DOC or ODF document) or let them just get used to the kind of reports you deliver (That has worked for me in the past, especially when they heard, that the documentation was generated automatically every day by a CI server) Hth, Nick Stolwijk -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wed 1/23/2008 3:47 PM To: Maven Users List Subject: Re: Any tool available for generating docs from pom.xml? Thanks Nick. I am sorry for my lack of expression. But what mvn site generates is what I am expected to report about by in a doc rather than a web page ( I told you it would sound stupid). Thanks a ton for the kind help. regards, Amit On Jan 23, 2008 8:09 PM, [EMAIL PROTECTED] wrote: Ok, to make it clear, what do you want to report about. The dependencies report show all your dependencies, the jdepend report indeed reports about packages, and so there are numerous more reports. If you can make clear what you want, maybe that will help finding a solution. With regards, Nick Stolwijk -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wed 1/23/2008 3:37 PM To: Maven Users List Subject: Re: Any tool available for generating docs from pom.xml? Isn't jdepend plug in more about the packages and classes of the build? Not sure. Just what I got after seeing the report it generated. On Jan 23, 2008 6:27 PM, Guillaume Lederrey [EMAIL PROTECTED] wrote: You have the jdepend plugin that will do some analysis of your dependencies (http://mojo.codehaus.org/jdepend-maven-plugin/). And I think that the maven-dependency-plugin provide a report as well ... On 23/01/2008, amit kumar [EMAIL PROTECTED] wrote: No reports for my dependencies, like the expectation is something like having a table generated with artifact name and the versions... ( if there is something more than that in reports its fine, but that is the minimum). Regards, Amit On Jan 23, 2008 2:02 PM, Stephen Connolly [EMAIL PROTECTED] wrote: The site plugin's info reports? On Jan 23, 2008 7:58 AM, amit kumar [EMAIL PROTECTED] wrote: Hi, I know this would sound stupid ( as it sounded to me when asked ), but is there any such tool using which you can generate a doc in tabular format with the information stored in pom.xml mainly the dependency part. Please let me know in case there exists one tool. Regards, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jabber : [EMAIL PROTECTED] Skype : Guillaume.Lederrey Projects : * http://rwanda.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Report for dependencyManagement and pluginManagement
Does anyone know of a report which creates a page or pages for the dependencyManagement en pluginManagement with versions. I want to create a webpage to quickly have an overview of our companypom, but I rather would not want to need to update it by hand or in a different file. With regards, Nick Stolwijk
RE: Report for dependencyManagement and pluginManagement
I have searched for this, but couldn't find it. I've started to implement these reports myself by reusing a lot of the project-info-reports. Current goals: dependencyManagement: Shows tables for the 5 scopes, just like goal dependencies. pluginManagement shows a table with all the plugins in the pluginManagement (groupId, artifactId, version) Could these reports be valuable additions to this project? With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tue 1/22/2008 9:48 AM To: users@maven.apache.org Subject: Report for dependencyManagement and pluginManagement Does anyone know of a report which creates a page or pages for the dependencyManagement en pluginManagement with versions. I want to create a webpage to quickly have an overview of our companypom, but I rather would not want to need to update it by hand or in a different file. With regards, Nick Stolwijk
RE: how to replace a java file
This is not going to work. There is a difference between sources and resources. And filtering is also not what you want. Resources are copied to target/classes and never compiled. Filtering is used to replace ${variable} kind of things. This is not easy to accomplish. Maybe you could first answer a question: why are you trying to accomplish this? Hth, Nick Stolwijk -Original Message- From: Rex Huang [mailto:[EMAIL PROTECTED] Sent: Tue 1/22/2008 4:21 PM To: users@maven.apache.org Subject: how to replace a java file I want to use filter to generate a src/main/resources/filter/hello.java to replace the old one in src/main/java/com/my-company/hello.java resource in pom.xml resource directorysrc/main/resources/filter//directory filteringtrue/filtering includes includehello.java/include /includes targetPathcom/my-company//targetPath /resource the result is: hello.class is compiled using the old hello.java, the new hello.java source file is in the jar file does anyone knows how to do it? BR//Rex
Best practices for seperate releases of parent and modules
At our company we are busy with a commons project, which has a few submodules. Our current layout is: commons-parent/ commons-module-1/ pom.xml src/ commons-module-2/ commons-module-3/ pom.xml Now we want to do seperate releases of the commons-parent and the modules, just like the Maven plugins. Is it advisable to move the commons-parent to another subdirectory or is this layout the preferred way? I mean the following layout: commons/ commons-parent/ pom.xml commons-module-1/ pom.xml src/ commons-module-2/ commons-module-3/ With regards, Nick Stolwijk
RE: Best practices for seperate releases of parent and modules
But when you release the parent, do you also release all the submodules or do you run mvn with non-recursive? With regards, Nick Stolwijk -Original Message- From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] Sent: Mon 1/21/2008 10:52 AM To: Maven Users List Subject: Re: Best practices for seperate releases of parent and modules On Jan 21, 2008 10:42 AM, [EMAIL PROTECTED] wrote: Is it advisable to move the commons-parent to another subdirectory or is this layout the preferred way? I was experiencing with the former, but gave it up. The reason is that far too many plugins are not suitable to use it. Examples include: - The SCM URL must be configured in every subproject. Otherwise the SCM links on the generated site will be broken. - The distribution URL's must be configured in every subproject. Otherwise deployment will use the wrong target URL. And so on. Jochen -- Look, that's why there's rules, understand? So that you think before you break 'em. -- (Terry Pratchett, Thief of Time) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best practices for seperate releases of parent and modules
But normally the trunk should always contain a SNAPSHOT version, but only the submodules don't have it as parent as long as they don't need to rely on the changes in the parent. But if you use the release plugin to release the parent, will the tag contain only the parent or all the submodules as well? If I look at the maven plugins [1] tags the release contains all the modules (with SNAPSHOT-versions), but the tags directory also contains a tag for each release of the modules (without SNAPSHOT-versions). So it seems they run mvn non recursively, but it is still tagging the whole tree. Seems a little strange to me. With regards, Nick Stolwijk -Original Message- From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] Sent: Mon 1/21/2008 11:39 AM To: Maven Users List Subject: Re: Best practices for seperate releases of parent and modules On Jan 21, 2008 11:00 AM, [EMAIL PROTECTED] wrote: But when you release the parent, do you also release all the submodules or do you run mvn with non-recursive? If the parent hasn't changed (in other words, if it hasn't a SNAPSHOT version), then I am happy to release the submodules only. To be honest, that if requires a certain degree of cautiousness. My recommended approach to resolve that is to provide read-only access to the parent for most developers except a few selected. Jochen -- Look, that's why there's rules, understand? So that you think before you break 'em. -- (Terry Pratchett, Thief of Time) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Best practices for seperate releases of parent and modules
In my opinion, trunk is the development version aka SNAPSHOT. Only the tags should contain the released version number. Each module should provide the parent version it needs and can only be released if that is a non-SNAPSHOT version. With regards, Nick Stolwijk -Original Message- From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] Sent: Mon 1/21/2008 11:58 AM To: Maven Users List Subject: Re: Best practices for seperate releases of parent and modules On Jan 21, 2008 11:48 AM, [EMAIL PROTECTED] wrote: But normally the trunk should always contain a SNAPSHOT version, but only the submodules don't have it as parent as long as they don't need to rely on the changes in the parent. I do not know, why it should. We do not do it that way. But if you use the release plugin to release the parent, will the tag contain only the parent or all the submodules as well? That depends on the level on which we cut the release. Jochen -- Look, that's why there's rules, understand? So that you think before you break 'em. -- (Terry Pratchett, Thief of Time) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how can I to use build time in pom files
The newer version of this plugin is found here: http://mojo.codehaus.org/buildnumber-maven-plugin/ And the artifacts can also be found on central: http://mvnrepository.com/artifact/org.codehaus.mojo/buildnumber-maven-plugin Hth, Nick Stolwijk -Original Message- From: Rex Huang [mailto:[EMAIL PROTECTED] Sent: Mon 1/21/2008 5:02 PM To: Maven Users List Subject: Re: how can I to use build time in pom files I found information of maven-buildnumber-plugin here: http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html it's works! Rex On Jan 18, 2008 3:33 PM, Mark Eramo [EMAIL PROTECTED] wrote: Rex, Have a look at the Maven build number plugin. It may be able to do what you need. *http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/howto.html* Regards, Mark Rex Huang wrote: Does maven has build time property, which I can use in pom files my-property${build time}my-property BR//Rex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: about dependence transfer
You give not so much information, but I think I know why Maven didn't downloaded the dependencies. Because it didn't have to. It wil only download dependencies if it has too. If you specify a dependency and need the transitive dependencies for compile time, you will need to add them yourself. You are depended on them, so you need to specify that. Else your code breaks if a newer version of another dependency stops being depended on it. If you have further questions, please be more descriptive about what you are trying to do. Hth, Nick Stolwijk -Original Message- From: cmd [mailto:[EMAIL PROTECTED] Sent: Thu 1/17/2008 3:47 PM To: users@maven.apache.org Subject: about dependence transfer i use maven2 to manage my jars like this dependency groupIdorg.springframework/groupId artifactIdspring/artifactId version2.5.1/version /dependency but springframework depend some jars.Maven has not download the jars automatic. now how can i set the config file? -- View this message in context: http://www.nabble.com/about-dependence-transfer-tp14920281s177p14920281.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make assembly:assembly depend on goals?
This can be be perfectly done by using the lifecycle of maven. In short, don't site:site, but call the phase site (thus mvn site instead of mvn site:site). Also, you could bind the assembly plugin to the package phase and thus run mvn package instead of mvn assembly:assembly. Try reading this page for more informatin: http://www.sonatype.com/book/lifecycle.html Hth, Nick Stolwijk -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:37 PM To: users@maven.apache.org Subject: How to make assembly:assembly depend on goals? Hi, I kinda miss task dependencies like in Ant. My basic idea is provide a bin distro which easily can be done with assembly plugin. But I want assembly:assembly depend on site:site since running assembly:assembly runs package only in advance. Is this possible? Thx, Mike -- NO OOXML - Say NO To Microsoft Office broken standard http://www.noooxml.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make assembly:assembly depend on goals?
Looking at your post again and I think I understand what you want to accomplish. You want to include inside the assembly the generated site? Take a look at the Assembly mojo [1] and especially this parameter: includeSite boolean Set to true to include the site generated by site:site goal. Default value is false. I guess that is what you want. With regards, Nick Stolwijk [1]http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:53 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: This can be be perfectly done by using the lifecycle of maven. In short, don't site:site, but call the phase site (thus mvn site instead of mvn site:site). Also, you could bind the assembly plugin to the package phase and thus run mvn package instead of mvn assembly:assembly. Try reading this page for more informatin: http://www.sonatype.com/book/lifecycle.html Still seems like a riddle to me. I am aware about the attached mojo but I cannot say depends on, site, package but only on one of these too. I guess, I still don't understand the lifecycle system Mike -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:37 PM To: users@maven.apache.org Subject: How to make assembly:assembly depend on goals? Hi, I kinda miss task dependencies like in Ant. My basic idea is provide a bin distro which easily can be done with assembly plugin. But I want assembly:assembly depend on site:site since running assembly:assembly runs package only in advance. Is this possible? Thx, Mike -- NO OOXML - Say NO To Microsoft Office broken standard http://www.noooxml.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make assembly:assembly depend on goals?
Please explain then what your intended result is, maybe I can help you better then. With regards, Nick Stolwijk -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 4:09 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: Looking at your post again and I think I understand what you want to accomplish. You want to include inside the assembly the generated site? Take a look at the Assembly mojo [1] and especially this parameter: includeSite boolean Set to true to include the site generated by site:site goal. Default value is false. I guess that is what you want. Unfortunately, it isn't for 2 reasons: 1. is is deprecated in favor of includeSiteDirectory in the descriptor file 2. setting to true does *not* run site:site, it just says include it if you did not run site:site it says: [INFO] org.apache.maven.plugin.MojoFailureException: site did not exist in the target directory - please run site:site before creating the assembly at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:261) -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:53 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: This can be be perfectly done by using the lifecycle of maven. In short, don't site:site, but call the phase site (thus mvn site instead of mvn site:site). Also, you could bind the assembly plugin to the package phase and thus run mvn package instead of mvn assembly:assembly. Try reading this page for more informatin: http://www.sonatype.com/book/lifecycle.html Still seems like a riddle to me. I am aware about the attached mojo but I cannot say depends on, site, package but only on one of these too. I guess, I still don't understand the lifecycle system Mike -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:37 PM To: users@maven.apache.org Subject: How to make assembly:assembly depend on goals? Hi, I kinda miss task dependencies like in Ant. My basic idea is provide a bin distro which easily can be done with assembly plugin. But I want assembly:assembly depend on site:site since running assembly:assembly runs package only in advance. Is this possible? Thx, Mike -- NO OOXML - Say NO To Microsoft Office broken standard http://www.noooxml.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make assembly:assembly depend on goals?
Ok, I'll understand what you want. Let's find a solution. :) Try it the other way around, bind the assembly:assembly goal to the post-site phase and call mvn post-site. If you don't want it to always run when calling mvn site-deploy (which is after post-site) add a profile and call mvn post-site -Passembly Hth, Nick Stolwijk -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 4:30 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: Please explain then what your intended result is, maybe I can help you better then. I want to creae a bin distibution which should contain: site/ my.jar LICENSE.txt README.txt I set you the bin.xml descriptor and set includeSiteDirectory to true since we know assembly:assembly automaticalla runs package I only have to run: mvn clean assembly:assembly but this will fail because site is not present, I have to run: mvn clean site assembly:assembly I want assembly:assembly automatically call site just like it calls package -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 4:09 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: Looking at your post again and I think I understand what you want to accomplish. You want to include inside the assembly the generated site? Take a look at the Assembly mojo [1] and especially this parameter: includeSite boolean Set to true to include the site generated by site:site goal. Default value is false. I guess that is what you want. Unfortunately, it isn't for 2 reasons: 1. is is deprecated in favor of includeSiteDirectory in the descriptor file 2. setting to true does *not* run site:site, it just says include it if you did not run site:site it says: [INFO] org.apache.maven.plugin.MojoFailureException: site did not exist in the target directory - please run site:site before creating the assembly at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:261) -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:53 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: This can be be perfectly done by using the lifecycle of maven. In short, don't site:site, but call the phase site (thus mvn site instead of mvn site:site). Also, you could bind the assembly plugin to the package phase and thus run mvn package instead of mvn assembly:assembly. Try reading this page for more informatin: http://www.sonatype.com/book/lifecycle.html Still seems like a riddle to me. I am aware about the attached mojo but I cannot say depends on, site, package but only on one of these too. I guess, I still don't understand the lifecycle system Mike -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:37 PM To: users@maven.apache.org Subject: How to make assembly:assembly depend on goals? Hi, I kinda miss task dependencies like in Ant. My basic idea is provide a bin distro which easily can be done with assembly plugin. But I want assembly:assembly depend on site:site since running assembly:assembly runs package only in advance. Is this possible? Thx, Mike -- NO OOXML - Say NO To Microsoft Office broken standard http://www.noooxml.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make assembly:assembly depend on goals?
Yes, the reason is that It would call assembly even if I want just run site for upload to my space or just for my development verification if my site is really fine. It would be just some unnecessary overhead. To avoid this, use a profile for now. Hth, Nick Stolwijk
RE: How to make assembly:assembly depend on goals?
I guess the author is already aware of it: http://jira.codehaus.org/browse/MASSEMBLY-22 And have been aware of it for a long time (Hence it is an early issue number), but the problem seems with maven can not optionally execute other phases. Hth, Nick Stolwijk ps. If I may ask, what are your reasons to not bind it to the post-site phase? -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 4:51 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: Ok, I'll understand what you want. Let's find a solution. :) Try it the other way around, bind the assembly:assembly goal to the post-site phase and call mvn post-site. If you don't want it to always run when calling mvn site-deploy (which is after post-site) add a profile and call mvn post-site -Passembly This is exactly what I have expected. :-( It can't be done like in Ant. Actually I don't want to bind assembly to site. But thanks pointing me into some direction. I will write to the plugins author adding site and as pre goal if site should be eincluded thx -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 4:30 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: Please explain then what your intended result is, maybe I can help you better then. I want to creae a bin distibution which should contain: site/ my.jar LICENSE.txt README.txt I set you the bin.xml descriptor and set includeSiteDirectory to true since we know assembly:assembly automaticalla runs package I only have to run: mvn clean assembly:assembly but this will fail because site is not present, I have to run: mvn clean site assembly:assembly I want assembly:assembly automatically call site just like it calls package -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 4:09 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: Looking at your post again and I think I understand what you want to accomplish. You want to include inside the assembly the generated site? Take a look at the Assembly mojo [1] and especially this parameter: includeSite boolean Set to true to include the site generated by site:site goal. Default value is false. I guess that is what you want. Unfortunately, it isn't for 2 reasons: 1. is is deprecated in favor of includeSiteDirectory in the descriptor file 2. setting to true does *not* run site:site, it just says include it if you did not run site:site it says: [INFO] org.apache.maven.plugin.MojoFailureException: site did not exist in the target directory - please run site:site before creating the assembly at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:261) -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:53 PM To: Maven Users List Subject: Re: How to make assembly:assembly depend on goals? [EMAIL PROTECTED] wrote: This can be be perfectly done by using the lifecycle of maven. In short, don't site:site, but call the phase site (thus mvn site instead of mvn site:site). Also, you could bind the assembly plugin to the package phase and thus run mvn package instead of mvn assembly:assembly. Try reading this page for more informatin: http://www.sonatype.com/book/lifecycle.html Still seems like a riddle to me. I am aware about the attached mojo but I cannot say depends on, site, package but only on one of these too. I guess, I still don't understand the lifecycle system Mike -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tue 1/15/2008 3:37 PM To: users@maven.apache.org Subject: How to make assembly:assembly depend on goals? Hi, I kinda miss task dependencies like in Ant. My basic idea is provide a bin distro which easily can be done with assembly plugin. But I want assembly:assembly depend on site:site since running assembly:assembly runs package only in advance. Is this possible? Thx, Mike -- NO OOXML - Say NO To Microsoft Office broken standard http://www.noooxml.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to add a dependency - newbie to maven
Your first step will be a visit to mvnrepository.com. When you search artifacts there, you're sure they are on the central repository. I just checked and there are multiple swt jar files there. If you find the one you search, add the dependency to the pom.xml file and rebuild. If you can't find it there, take a look at this blog post: http://blambi.blogspot.com/2007/07/maven2-swt-builds.html. Hth, Nick Stolwijk -Original Message- From: rakeshsugirtharaj [mailto:[EMAIL PROTECTED] Sent: Thu 1/10/2008 8:59 AM To: users@maven.apache.org Subject: How to add a dependency - newbie to maven Hi folks!, I m doing a project that uses SWT for gui. How do i add the dependent jars to maven? Any help will be appeciated. Thanks in advance -- View this message in context: http://www.nabble.com/How-to-add-a-dependency---newbie-to-maven-tp14729321s177p14729321.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to avoid transitive Dependencies getting packaged
Amit, Could you send me the output of mvn clean install -X (pipe it to a file) privately. I can have a look at it and reply here hopefully the solution. With regards, Nick Stolwijk -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 9:23 AM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged Vishal: you can use dependency groupIdA/groupId artifactIdA/artifactId exclusions exclusion groupId/groupId artifactIdartifactId /exclusion exclusions /dependency in exclusion you can specify the dependencies of A. As per my knowledge there would be one exclusion tag for each dependency. This is the only method I know by now. Nick: I am using Maven 2.0.7. And surprisingly I have used mvn site also to track the dependencies, but commons-logging-1.0.4 appears no where but straight in the WEB-INF folder. Not able to figure out where is it coming from. Regards, Amit On Jan 9, 2008 1:03 PM, Vishal Pahwa [EMAIL PROTECTED] wrote: Hi I have also similar kind of problem and needs an effective solution. Problem: Let's say we have one custom module for creating jar file let's the name of the jar file is A.jar and that module is dependent upon let's say 10 third party jars. Now i have one module for creating war file and i need to add A.jar in the lib directory of this war file, but i dont require theses 10 jars on which A.jar is dependent so how can i resist these unwanted jars to pack inside lib directory of the war file. The problem may not be exactly same but yes the scenario is pretty much similar. So could anyone please tell me how to avoid these transitive dependencies to get intrude in the lib directory of the war file. Regards Vishal. -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 12:46 PM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged The one reason at the moment of not including the transitive dependencies is the redundant jar files in the lib folder of the packaged WAR. For instance in the lib folder of the WAR i can see commons-logging-1.0.4(transitive dependency of something which I am not able to figure out even after using -X with maven goal) and commons-logging-1.1(explicit in the pom.xml). And there were some more similar occurrences like that of two versions of spring hibernate etc. Regards, Amit On Jan 9, 2008 3:07 AM, Brewster, Richard [EMAIL PROTECTED] wrote: Why do you want to exclude the transitive dependencies? Is it because these provided by your container (JBoss, Tomcat) and you wish to use those provided versions? How do you verify that the container's versions are compatible? Richard Brewster Senior Associate Perrin Quarles Associates [EMAIL PROTECTED] (434) 817-2640 -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 9:51 AM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged The way I do this (and there may be another or better way), I add explicitly add the transitive dependencies to my pom, and mark them as scope provided. Wayne On 1/8/08, amit kumar [EMAIL PROTECTED] wrote: Hi, I am building a WAR, but I see some jar files in the lib WEB-INF\lib folder in the build which are not mentioned in the pom.xml, and probably are transitive dependencies. How do I make sure the transitive dependencies are not put in the lib folder. I looked on maven-war-plugin FAQs but not any help. Could someone please guide on that. Regards, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to avoid transitive Dependencies getting packaged
If you want the jar file of module A working at runtime, how is that possible without the transitive libraries? Could you change the module to include those dependencies only at compile time? Then they won't be transitive at runtime. With regards, Nick Stolwijk -Original Message- From: Vishal Pahwa [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 9:31 AM To: Maven Users List Subject: RE: How to avoid transitive Dependencies getting packaged Amit Thats pretty much fine but the problem is we have got plenty of dependencies and stopping them to get inside lib directory with this method is a bit cumbersome thats why i was lookin for some other efficient way if exists. Regards Vishal. -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 1:53 PM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged Vishal: you can use dependency groupIdA/groupId artifactIdA/artifactId exclusions exclusion groupId/groupId artifactIdartifactId /exclusion exclusions /dependency in exclusion you can specify the dependencies of A. As per my knowledge there would be one exclusion tag for each dependency. This is the only method I know by now. Nick: I am using Maven 2.0.7. And surprisingly I have used mvn site also to track the dependencies, but commons-logging-1.0.4 appears no where but straight in the WEB-INF folder. Not able to figure out where is it coming from. Regards, Amit On Jan 9, 2008 1:03 PM, Vishal Pahwa [EMAIL PROTECTED] wrote: Hi I have also similar kind of problem and needs an effective solution. Problem: Let's say we have one custom module for creating jar file let's the name of the jar file is A.jar and that module is dependent upon let's say 10 third party jars. Now i have one module for creating war file and i need to add A.jar in the lib directory of this war file, but i dont require theses 10 jars on which A.jar is dependent so how can i resist these unwanted jars to pack inside lib directory of the war file. The problem may not be exactly same but yes the scenario is pretty much similar. So could anyone please tell me how to avoid these transitive dependencies to get intrude in the lib directory of the war file. Regards Vishal. -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 12:46 PM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged The one reason at the moment of not including the transitive dependencies is the redundant jar files in the lib folder of the packaged WAR. For instance in the lib folder of the WAR i can see commons-logging-1.0.4(transitive dependency of something which I am not able to figure out even after using -X with maven goal) and commons-logging-1.1(explicit in the pom.xml). And there were some more similar occurrences like that of two versions of spring hibernate etc. Regards, Amit On Jan 9, 2008 3:07 AM, Brewster, Richard [EMAIL PROTECTED] wrote: Why do you want to exclude the transitive dependencies? Is it because these provided by your container (JBoss, Tomcat) and you wish to use those provided versions? How do you verify that the container's versions are compatible? Richard Brewster Senior Associate Perrin Quarles Associates [EMAIL PROTECTED] (434) 817-2640 -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 9:51 AM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged The way I do this (and there may be another or better way), I add explicitly add the transitive dependencies to my pom, and mark them as scope provided. Wayne On 1/8/08, amit kumar [EMAIL PROTECTED] wrote: Hi, I am building a WAR, but I see some jar files in the lib WEB-INF\lib folder in the build which are not mentioned in the pom.xml, and probably are transitive dependencies. How do I make sure the transitive dependencies are not put in the lib folder. I looked on maven-war-plugin FAQs but not any help. Could someone please guide on that. Regards, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dependency versions in large multi-projects multi-modules environment
I have to investigate the migration to Maven in our organisation. We have a pretty large software base : about 100 projects each generating 3 to 6 artifacts. A part of these modules are a framework used by most other projects. On this basis I would start with three parent poms. - On for the company, which would have normal dependencymanagement for common projects outside your company. - On for the framework, which is a child of the company pom. - On for the other libraries, which is also a child of the company pom and keeps references to the right framework libraries. Now it is a matter of releasing the framework with its superpom and after that updating the other superpom to reference the right libraries. Hth, Nick Stolwijk -Original Message- From: Guillaume Lederrey [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 11:01 AM To: Maven Users List Subject: Re: Dependency versions in large multi-projects multi-modules environment I'm trying to go down the path of option #1 below : * a super pom which define all dependencies, we can leave it in SNAPSHOT state for the dev cycle * all libraries reference this parent pom. The libraries can go through a couple of version increments during the dev cycle. Now I have a problem at the time of release : I have to release a version of both the super pom and the libraries. The parent pom has to be updated to reference the versions of the libraries at release time, and the libraries have to be updated to reference the super pom at release time. So I got a cycle ... If I release the libraries first, and then update the super pom, I then have to release the super pom, and as the super pom has been updated, I have to release the libraries as well and so on ... I think my requirements are pretty standard, so there should be an obvious solution that I am missing. What didnt I understand ? Thanks for your help ! MrG On 07/01/2008, Guillaume Lederrey [EMAIL PROTECTED] wrote: Hello ! I have to investigate the migration to Maven in our organisation. We have a pretty large software base : about 100 projects each generating 3 to 6 artifacts. A part of these modules are a framework used by most other projects. For the moment, we are managing versioning with ant, and a script that download the latest version of each library. This script is updated every time a new version of a library is released. The script itself is on a server and accessed by all developers / build tools. I see to major ways to do the same with Maven : 1) replace our script by a parent pom which will contain all dependencies and versions in its dependencyManagement/ section. This means that every time a new library is released, a new version of this parent pom has to be released as well. And all other projects have to update their reference to the latest parent pom. 2) use version ranges in the parent pom. This way, the new version of the library is used by all projects as soon as it is available in our central repository. Much easier to manage, but it sound a bit scary to have it that much automated ... Other problem, we will loose build reproducibility ... I'll be happy to know how you manage dependency versions in large organizations ... Thanks a lot ! Guillaume -- Jabber : [EMAIL PROTECTED] Skype : Guillaume.Lederrey Projects : * http://rwanda.wordpress.com/ * http://rwandatech.wordpress.com/ -- Jabber : [EMAIL PROTECTED] Skype : Guillaume.Lederrey Projects : * http://rwanda.wordpress.com/ * http://rwandatech.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Ordering of compilation
I am looking at building the initial java code in a separate module, then importing it and unpacking it as a dependency and then continuing with the build as previously designed, packing everything up in a single JAR at the end. I would go for this way. Even not unpacking the dependency, but just stay dependent on it at runtime. The reason for the mail is that I would like to avoid creating another module if possible, and was wondering if anyone had found a way in which the compilation plugin could be attached to a different phase of the build (as opposed to compile). This is possible. You can configure another execution of the compiler plugin: build plugins plugin artifactIdmaven-compiler-plugin/artifactId executions execution idcompile-before-process-sources/id phasegenerate-sources/phase goalsgoalcompile/goal/goals configuration excludesexclude**/**/exclude/excludes includesincludecom/example/package/include/includes /configuration /execution /executions configuration excludesexcludecom/example/package/exclude/excludes includesinclude**/**/include/includes /configuration /plugin /plugins /build Then bind your sqlj plugin to the process sources phase. This is untested, but I guess with a little tweaking you can make it work. Hth, Nick Stolwijk -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 10:50 AM To: Maven Users List Subject: Ordering of compilation Hi all, I have the need to impose a specific ordering of compilation of some source code I have. I need to achieve the following: 1 - compile some Java 2 - translate SQLJ (dependent on above compilation) 3 - compile some further Java (dependent on translated SQLJ) To translate the SQLJ I have created my own plugin which is attached to the validate-sources phase of the build. All of my java code is not building until the compile phase, and thus the build is breaking because some of the code needs to have been built before the SQLJ translation. I am looking at building the initial java code in a separate module, then importing it and unpacking it as a dependency and then continuing with the build as previously designed, packing everything up in a single JAR at the end. The reason for the mail is that I would like to avoid creating another module if possible, and was wondering if anyone had found a way in which the compilation plugin could be attached to a different phase of the build (as opposed to compile). I am also open to other suggestions as to how I may solve my problem. Feedback would be greatly appreciated. Regards, Matt The content of this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient and may not be disclosed, copied or distributed. If you received this email in error, please contact the sender immediately by return e-mail or by telephoning +44 20 7260 2000, delete it and do not disclose its contents to any person. You should take full responsibility for checking this email for viruses. Markit reserves the right to monitor all e-mail communications through its network. Markit and its affiliated companies make no warranty as to the accuracy or completeness of any information contained in this message and hereby exclude any liability of any kind for the information contained herein. Any opinions expressed in this message are those of the author and do not necessarily reflect the opinions of Markit. For full details about Markit, its offerings and legal terms and conditions, please see Markit's website at http://www.markit.com http://www.markit.com/ .
RE: Ordering of compilation
The target/classes directory is in the classpath (check with mvn -X clean compile). Did you generate classes or java files? If you generated classes they should be in target/classes, if you generated java files, you'll need the maven-build-helper-plugin [1]. Hth, Nick Stolwijk [1] http://mojo.codehaus.org/build-helper-maven-plugin/index.html -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 12:30 PM To: Maven Users List Subject: RE: Ordering of compilation Hi Nick, Thanks for your response. I actually decided to follow your second option of configuring a second execution of the compiler plugin. The only problem is that when the build gets to the main compilation it doesn't appear to have the target folder on the classpath and thus can't find the code I compiled in the generate-sources phase. I know that you can pass command-line arguments to the compiler, but I would want to append to the classpath and not overwrite it completely. Do you have any ideas for a solution? Thanks again, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 09 January 2008 10:15 To: Maven Users List Subject: RE: Ordering of compilation I am looking at building the initial java code in a separate module, then importing it and unpacking it as a dependency and then continuing with the build as previously designed, packing everything up in a single JAR at the end. I would go for this way. Even not unpacking the dependency, but just stay dependent on it at runtime. The reason for the mail is that I would like to avoid creating another module if possible, and was wondering if anyone had found a way in which the compilation plugin could be attached to a different phase of the build (as opposed to compile). This is possible. You can configure another execution of the compiler plugin: build plugins plugin artifactIdmaven-compiler-plugin/artifactId executions execution idcompile-before-process-sources/id phasegenerate-sources/phase goalsgoalcompile/goal/goals configuration excludesexclude**/**/exclude/excludes includesincludecom/example/package/include/includes /configuration /execution /executions configuration excludesexcludecom/example/package/exclude/excludes includesinclude**/**/include/includes /configuration /plugin /plugins /build Then bind your sqlj plugin to the process sources phase. This is untested, but I guess with a little tweaking you can make it work. Hth, Nick Stolwijk -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 10:50 AM To: Maven Users List Subject: Ordering of compilation Hi all, I have the need to impose a specific ordering of compilation of some source code I have. I need to achieve the following: 1 - compile some Java 2 - translate SQLJ (dependent on above compilation) 3 - compile some further Java (dependent on translated SQLJ) To translate the SQLJ I have created my own plugin which is attached to the validate-sources phase of the build. All of my java code is not building until the compile phase, and thus the build is breaking because some of the code needs to have been built before the SQLJ translation. I am looking at building the initial java code in a separate module, then importing it and unpacking it as a dependency and then continuing with the build as previously designed, packing everything up in a single JAR at the end. The reason for the mail is that I would like to avoid creating another module if possible, and was wondering if anyone had found a way in which the compilation plugin could be attached to a different phase of the build (as opposed to compile). I am also open to other suggestions as to how I may solve my problem. Feedback would be greatly appreciated. Regards, Matt The content of this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient and may not be disclosed, copied or distributed. If you received this email in error, please contact the sender immediately by return e-mail or by telephoning +44 20 7260 2000, delete it and do not disclose its contents to any person. You should take full responsibility for checking this email for viruses. Markit reserves the right to monitor all e-mail communications through its network. Markit and its affiliated companies make no warranty as to the accuracy or completeness of any information contained in this message and hereby exclude any liability of any kind for the information contained herein. Any opinions expressed in this message are those of the author and do not necessarily reflect the opinions of Markit. For full details about Markit, its offerings and legal terms and conditions, please see Markit's website at
RE: Ordering of compilation
As an afterthought, I would still recommend two modules: module 1: compile and process-classes (which is a phase, to bind your sqlj plugin to) module 2: dependency on module 1 and compile This is much easier to understand for other developers and inline with the maven thought. Hth, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 1:17 PM To: Maven Users List Subject: RE: Ordering of compilation The target/classes directory is in the classpath (check with mvn -X clean compile). Did you generate classes or java files? If you generated classes they should be in target/classes, if you generated java files, you'll need the maven-build-helper-plugin [1]. Hth, Nick Stolwijk [1] http://mojo.codehaus.org/build-helper-maven-plugin/index.html -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 12:30 PM To: Maven Users List Subject: RE: Ordering of compilation Hi Nick, Thanks for your response. I actually decided to follow your second option of configuring a second execution of the compiler plugin. The only problem is that when the build gets to the main compilation it doesn't appear to have the target folder on the classpath and thus can't find the code I compiled in the generate-sources phase. I know that you can pass command-line arguments to the compiler, but I would want to append to the classpath and not overwrite it completely. Do you have any ideas for a solution? Thanks again, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 09 January 2008 10:15 To: Maven Users List Subject: RE: Ordering of compilation I am looking at building the initial java code in a separate module, then importing it and unpacking it as a dependency and then continuing with the build as previously designed, packing everything up in a single JAR at the end. I would go for this way. Even not unpacking the dependency, but just stay dependent on it at runtime. The reason for the mail is that I would like to avoid creating another module if possible, and was wondering if anyone had found a way in which the compilation plugin could be attached to a different phase of the build (as opposed to compile). This is possible. You can configure another execution of the compiler plugin: build plugins plugin artifactIdmaven-compiler-plugin/artifactId executions execution idcompile-before-process-sources/id phasegenerate-sources/phase goalsgoalcompile/goal/goals configuration excludesexclude**/**/exclude/excludes includesincludecom/example/package/include/includes /configuration /execution /executions configuration excludesexcludecom/example/package/exclude/excludes includesinclude**/**/include/includes /configuration /plugin /plugins /build Then bind your sqlj plugin to the process sources phase. This is untested, but I guess with a little tweaking you can make it work. Hth, Nick Stolwijk -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 10:50 AM To: Maven Users List Subject: Ordering of compilation Hi all, I have the need to impose a specific ordering of compilation of some source code I have. I need to achieve the following: 1 - compile some Java 2 - translate SQLJ (dependent on above compilation) 3 - compile some further Java (dependent on translated SQLJ) To translate the SQLJ I have created my own plugin which is attached to the validate-sources phase of the build. All of my java code is not building until the compile phase, and thus the build is breaking because some of the code needs to have been built before the SQLJ translation. I am looking at building the initial java code in a separate module, then importing it and unpacking it as a dependency and then continuing with the build as previously designed, packing everything up in a single JAR at the end. The reason for the mail is that I would like to avoid creating another module if possible, and was wondering if anyone had found a way in which the compilation plugin could be attached to a different phase of the build (as opposed to compile). I am also open to other suggestions as to how I may solve my problem. Feedback would be greatly appreciated. Regards, Matt The content of this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient and may not be disclosed, copied or distributed. If you received this email in error, please contact the sender immediately by return e-mail or by telephoning +44 20 7260 2000, delete it and do not disclose its contents to any person. You should take full responsibility for checking this email for viruses. Markit reserves the right to monitor all e-mail communications
RE: Ordering of compilation
In your plugin you have to start working with the maven api. To get the compile time dependencies as class path elements (like the compiler plugin) you would use project.getCompileClasspathElements(). To get the test compile as class path elements it would be project.getTestClasspathElements(). To get the project inside your plugin, use: /** * @parameter expression=${project} private Project project; To get the compile class elements directly, use: /** * Project classpath. * * @parameter expression=${project.compileClasspathElements} * @required * @readonly */ private List classpathElements; This list you have to inject in your SQLJ compiler. Take a look at the maven-compiler-plugin source code [1]. I guess it is almost the same as what you're trying to do. It works with the plexus-compiler-javac [2] and plexus-utils [3] and then especially the cli tools. [4] [1] http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/ [2] https://svn.codehaus.org/plexus/plexus-components/trunk/plexus-compiler/plexus-compilers/plexus-compiler-javac/ [3] https://svn.codehaus.org/plexus/plexus-utils/trunk/ [4] https://svn.codehaus.org/plexus/plexus-utils/trunk/src/main/java/org/codehaus/plexus/util/cli/ I hope you have some more information to create your plugin. With regards, Nick Stolwijk -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 2:35 PM To: Maven Users List Subject: RE: Ordering of compilation Hi Nick, I have switched to your approach and do as follows: Module 1: build first java package Module 2: translate SQLJ and build second java package (with module 1 listed as a dependency within the pom) However, whatever I seem to do, my SQLJ plugin doesn't seem to be able to find the module1.jar on the classpath. When I echo the class path (System.getProperty(java.class.path)) from within the plugin code at runtime all I get is the following: c:\maven-2.0.7/boot/classworlds-1.1.jar Which as you can see isn't the most helpful. Do you know how to display a list of all the actual jars which are being included in the classpath, or do you have any other suggestions as to what might be going wrong (incorrect installation of PLSQL packages maybe?). Regards, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 09 January 2008 12:22 To: Maven Users List Subject: RE: Ordering of compilation As an afterthought, I would still recommend two modules: module 1: compile and process-classes (which is a phase, to bind your sqlj plugin to) module 2: dependency on module 1 and compile This is much easier to understand for other developers and inline with the maven thought. Hth, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 1:17 PM To: Maven Users List Subject: RE: Ordering of compilation The target/classes directory is in the classpath (check with mvn -X clean compile). Did you generate classes or java files? If you generated classes they should be in target/classes, if you generated java files, you'll need the maven-build-helper-plugin [1]. Hth, Nick Stolwijk [1] http://mojo.codehaus.org/build-helper-maven-plugin/index.html -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 12:30 PM To: Maven Users List Subject: RE: Ordering of compilation Hi Nick, Thanks for your response. I actually decided to follow your second option of configuring a second execution of the compiler plugin. The only problem is that when the build gets to the main compilation it doesn't appear to have the target folder on the classpath and thus can't find the code I compiled in the generate-sources phase. I know that you can pass command-line arguments to the compiler, but I would want to append to the classpath and not overwrite it completely. Do you have any ideas for a solution? Thanks again, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 09 January 2008 10:15 To: Maven Users List Subject: RE: Ordering of compilation I am looking at building the initial java code in a separate module, then importing it and unpacking it as a dependency and then continuing with the build as previously designed, packing everything up in a single JAR at the end. I would go for this way. Even not unpacking the dependency, but just stay dependent on it at runtime. The reason for the mail is that I would like to avoid creating another module if possible, and was wondering if anyone had found a way in which the compilation plugin could be attached to a different phase of the build (as opposed to compile). This is possible. You can configure another execution of the compiler plugin: build plugins plugin artifactIdmaven-compiler-plugin/artifactId executions execution
RE: does ignoreSnapshots on release plugin work ?
The code of the release plugin is: /** * Whether to allow timestamped SNAPSHOT dependencies. Default is to fail when finding any SNAPSHOT. * * @parameter expression=${ignoreSnapshots} default-value=false */ private boolean allowTimestampedSnapshots; So I don't think it does what it promises. It only allows timestamped snapshots. Hth, nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of nicolas de loof Sent: Wed 1/9/2008 3:20 PM To: Maven Users List Subject: does ignoreSnapshots on release plugin work ? I'm trying the release plugin 2.0-beta-8-SNAPSHOT with -DignoreSnapshots=true, but still can't release when my project has dependencies on snapshots. Is this really supported ?
RE: A question about dependency/
There is a nice way to do it. Don't start putting your own files in your local repository. Take a look at mvn install:install-file [1] or mvn deploy:deploy-file [2] if you are working with a team. Hth, Nick Stolwijk [1] http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html [2] http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html -Original Message- From: Thomas Chang [mailto:[EMAIL PROTECTED] Sent: Tue 1/8/2008 9:37 AM To: users@maven.apache.org Subject: A question about dependency/ Hi all, Formerly I use the maven1 and in the project.xml I have the dependency/ as follow: dependency groupIdjsf-facelets/groupId artifactIdjsf-facelets/artifactId version1.1.12/version typejar/type /dependency And in the repository the dir-structure looks as follow: /repo /jsf-facelets /jars --jsf-facelets-1.1.12.jar If I have another version of jsf-facelets.jar, I can simply put them under the same dir. Now by maven2 I have the same dependency/ in POM.XML, but the repository structure must be as follow: /repo /jsf-facelets /jsf-facelets /1.1.12 --jsf-facelets-1.1.12 If I have another version of jsf-facelets.jar. I have to create a new sub-dir with the version number such as follow: /repo /jsf-facelets /jsf-facelets /1.1.12 --jsf-facelets-1.1.12 /1.1.13 --jsf-facelets-1.1.13 I find this is more complicated. Is there anyway to do as by maven 1? Regards Thomas - Ihr erstes Fernweh? Wo gibt es den schönsten Strand.
RE: How to avoid transitive Dependencies getting packaged
Which maven version are you using? There were a few problems like this in 2.0.4 and 2.05 IIRC. Hth, Nick Stolwijk -Original Message- From: amit kumar [mailto:[EMAIL PROTECTED] Sent: Wed 1/9/2008 8:16 AM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged The one reason at the moment of not including the transitive dependencies is the redundant jar files in the lib folder of the packaged WAR. For instance in the lib folder of the WAR i can see commons-logging-1.0.4(transitive dependency of something which I am not able to figure out even after using -X with maven goal) and commons-logging-1.1(explicit in the pom.xml). And there were some more similar occurrences like that of two versions of spring hibernate etc. Regards, Amit On Jan 9, 2008 3:07 AM, Brewster, Richard [EMAIL PROTECTED] wrote: Why do you want to exclude the transitive dependencies? Is it because these provided by your container (JBoss, Tomcat) and you wish to use those provided versions? How do you verify that the container's versions are compatible? Richard Brewster Senior Associate Perrin Quarles Associates [EMAIL PROTECTED] (434) 817-2640 -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 9:51 AM To: Maven Users List Subject: Re: How to avoid transitive Dependencies getting packaged The way I do this (and there may be another or better way), I add explicitly add the transitive dependencies to my pom, and mark them as scope provided. Wayne On 1/8/08, amit kumar [EMAIL PROTECTED] wrote: Hi, I am building a WAR, but I see some jar files in the lib WEB-INF\lib folder in the build which are not mentioned in the pom.xml, and probably are transitive dependencies. How do I make sure the transitive dependencies are not put in the lib folder. I looked on maven-war-plugin FAQs but not any help. Could someone please guide on that. Regards, Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A question about using Mirrors for Repositories
How did the artifacts get at your remote repository. (Your server). Do you use a maven mirror/proxy, like archiva or artifactory or are you using a local repository on the server. (Which is populated by running mvn commands on the server) If you use the second, it is not a real remote repository and then you notice things like this. (Also not updating of snapshots on your own local repository). Please take a look at archiva or artifactory for your remote repository. It is much easier in use then a remote local repository. Hth, Nick Stolwijk -Original Message- From: Thomas Chang [mailto:[EMAIL PROTECTED] Sent: Fri 1/4/2008 2:50 PM To: users@maven.apache.org Subject: Re: A question about using Mirrors for Repositories The mirror is the repository on the remote server machine. What metadata files should I use? From this mirror I can download all the jars except those of org\apache\maven\plugins. Looks like you are missing some metadata files in the mirror. How did you populate the mirror? Hi all, I have a mirror in my settings.xml as follow: ... mirror idMyMirrorId/id mirrorOf*/mirrorOf nameDependencies for DKV Projects/name urlfile:sap-dev/CVSREPO/CvsMaven/url /mirror ... I do so because I want to download the dependencies from the repository on the server machine. And this runs in most case OK. But in somecase it doesn't work. For example when I run mvn clean, I got error as follow. But the Jar maven-archetype-quickstart-1.0.jar is on the repository on the server machine. I have copy this jar into the local repository. After that the mvn clean process can go on, i.e., the other jars can be downloaded from the server repository. Such a problem happends when I run mvn eclipse:eclipse. I have to copy the maven-eclipse-plugin-2.4.jar into the local repository. Somebody knows why? Regards Thomas [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.maven.archetypes ArtifactId: maven-archetype-quickstart Version: RELEASE Reason: Unable to determine the release version Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId= maven-archetype-quickstart \ -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.maven.archetypes -DartifactId=mave n-archetype-quickstart \ -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] org.apache.maven.archetypes:maven-archetype-quickstart:jar:RELEASE [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Jan 04 11:03:38 CET 2008 [INFO] Final Memory: 4M/8M [INFO] - Ihr erstes Baby? Holen Sie sich Tipps von anderen Eltern. - Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail.
RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules?
Unfortunately it is not just a new version of a plugin, but a new version of maven itself. To build it, check out the maven trunk and follow the instructions on this page: http://maven.apache.org/guides/development/guide-building-m2.html Hth, Nick Stolwijk -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Fri 1/4/2008 3:54 PM To: Maven Users List Subject: RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? Does that mean that I have to download and build that version from scratch? If so where can I download it from? I have been looking at http://jira.codehaus.org/browse/MNG/fixforversion/13143 but there doesn't seem an obvious place where I can get the source. Is it easy to build? Regards, Matt -Original Message- From: Brian E. Fox [mailto:[EMAIL PROTECTED] Sent: 04 January 2008 13:42 To: Maven Users List Subject: RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? The fix version in the jira is 2.1-alpha-1. Mystery solved -Original Message- From: Tomasz Pik [mailto:[EMAIL PROTECTED] Sent: Friday, January 04, 2008 7:36 AM To: Maven Users List Subject: Re: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? On Jan 4, 2008 12:53 PM, Jeff MAURY [EMAIL PROTECTED] wrote: Use the zip packaging in your POM hm, according to http://jira.codehaus.org/browse/MNG-1683 there should be 'zip' packaging. But: $ cat pom.xml ?xml version=1.0 encoding=iso-8859-1? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIda.b.c/groupId artifactIdd/artifactId packagingzip/packaging version1.0-SNAPSHOT/version /project [EMAIL PROTECTED] ~/xip $ mvn -U package [INFO] Scanning for projects... [INFO] [INFO] Building Unnamed - a.b.c:d:zip:1.0-SNAPSHOT [INFO]task-segment: [package] [INFO] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Cannot find lifecycle mapping for packaging: 'zip'. Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingzip. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Jan 04 13:09:56 CET 2008 [INFO] Final Memory: 1M/4M [INFO] shows that such packaging is not supported. Anyone knows what should I do to make it working? Thanks, Tomek Jeff On Jan 4, 2008 12:18 PM, Matthew Tordoff [EMAIL PROTECTED] wrote: Hi all, Does anyone know if there is an existance of a ZIP archetype or similar for maven. I am looking to build a project organised in the following way: Super Module = contains = WAR = contains = JAR = contains = SQLJ code which depends on PL/SQL = contains = PL/SQL The PL/SQL code also has to be delivered as part of the Super Module so it can be run on the various environments upon which it will be deployed. The way I thought of solving this was to create a zip maven module which was a child module of the Super Module, and was depended upon by the JAR module which would subsequently unpack that dependency locally to allow the building of the SQLJ (which is precompiled against the database, and requires the appropriate PL/SQL to have been run on the DB, creating views, types and packages). Am I going about this in the correct way? Any ideas to help me with my approach would be greatly appreciated. Cheers, Matt The content of this e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient and may not be disclosed, copied or distributed. If you received this email in error, please contact the sender immediately by return e-mail or by telephoning +44 20 7260 2000, delete it and do not disclose its contents to any person. You should take full responsibility for checking this email for viruses. Markit reserves the right to monitor all e-mail communications through its network. Markit and its affiliated companies make no warranty as to the accuracy or completeness of any information contained in this message and hereby exclude any liability of any kind for the information contained herein. Any opinions expressed in this message are
RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules?
I guess alpha-1 is not an official release, but just the trunk, which can be downloaded here: https://svn.apache.org/repos/asf/maven/components/trunk/ Hth, Nick Stolwijk -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Fri 1/4/2008 4:21 PM To: Maven Users List Subject: RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? Apologies for continuing this however, I cannot seem to find 2.1-alpha-1 any where in the svn repository. I have searched the site with google for 2.1-alpha-1 and it returns no results. Am I looking in the wrong place? I did find: http://svn.apache.org/viewvc/maven/components/branches/MNG-612-2.1.x But this seems to be a branch created to fix bug MNG-612, and not the 2.1-alpha-1 release candidate. Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 04 January 2008 14:58 To: Maven Users List Subject: RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? Unfortunately it is not just a new version of a plugin, but a new version of maven itself. To build it, check out the maven trunk and follow the instructions on this page: http://maven.apache.org/guides/development/guide-building-m2.html Hth, Nick Stolwijk -Original Message- From: Matthew Tordoff [mailto:[EMAIL PROTECTED] Sent: Fri 1/4/2008 3:54 PM To: Maven Users List Subject: RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? Does that mean that I have to download and build that version from scratch? If so where can I download it from? I have been looking at http://jira.codehaus.org/browse/MNG/fixforversion/13143 but there doesn't seem an obvious place where I can get the source. Is it easy to build? Regards, Matt -Original Message- From: Brian E. Fox [mailto:[EMAIL PROTECTED] Sent: 04 January 2008 13:42 To: Maven Users List Subject: RE: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? The fix version in the jira is 2.1-alpha-1. Mystery solved -Original Message- From: Tomasz Pik [mailto:[EMAIL PROTECTED] Sent: Friday, January 04, 2008 7:36 AM To: Maven Users List Subject: Re: Existance of ZIP Archetype? | How to distribute DB code to different mvn modules? On Jan 4, 2008 12:53 PM, Jeff MAURY [EMAIL PROTECTED] wrote: Use the zip packaging in your POM hm, according to http://jira.codehaus.org/browse/MNG-1683 there should be 'zip' packaging. But: $ cat pom.xml ?xml version=1.0 encoding=iso-8859-1? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIda.b.c/groupId artifactIdd/artifactId packagingzip/packaging version1.0-SNAPSHOT/version /project [EMAIL PROTECTED] ~/xip $ mvn -U package [INFO] Scanning for projects... [INFO] [INFO] Building Unnamed - a.b.c:d:zip:1.0-SNAPSHOT [INFO]task-segment: [package] [INFO] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Cannot find lifecycle mapping for packaging: 'zip'. Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingzip. [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Jan 04 13:09:56 CET 2008 [INFO] Final Memory: 1M/4M [INFO] shows that such packaging is not supported. Anyone knows what should I do to make it working? Thanks, Tomek Jeff On Jan 4, 2008 12:18 PM, Matthew Tordoff [EMAIL PROTECTED] wrote: Hi all, Does anyone know if there is an existance of a ZIP archetype or similar for maven. I am looking to build a project organised in the following way: Super Module = contains = WAR = contains = JAR = contains = SQLJ code which depends on PL/SQL = contains = PL/SQL The PL/SQL code also has to be delivered as part of the Super Module so it can be run on the various environments upon which it will be deployed. The way I thought of solving this was to create a zip maven module which was a child module of the Super Module, and was depended upon by the JAR module which would subsequently unpack that dependency locally to allow the building of the SQLJ (which is precompiled against the database, and requires the appropriate
RE: A question about using Mirrors for Repositories
Afaik, that is because with normal artifacts you are looking for com.example:example:1.0 from which a complete url to the pom and jar files can be created. With plugins you are looking for org.apache.maven.plugins:maven-example-plugin:LATEST for which there should be some checking in the metadata.xml on the remote server, which you don't have. To have a quick solution (and it is always best practice), create a pluginmanagement in your pom file and version each plugin you use. It is also better for reproducible builds. You don't want a tag to break because one of the plugins the build uses is updated. Hth, Nick Stolwijk -Original Message- From: Thomas Chang [mailto:[EMAIL PROTECTED] Sent: Fri 1/4/2008 4:03 PM To: Maven Users List Subject: RE: A question about using Mirrors for Repositories You are right. I use the local repository on the server machine as a remote repository to my local client. But I wonder why the other jars can be downloaded except those of org\apache\maven\plugins? How did the artifacts get at your remote repository. (Your server). Do you use a maven mirror/proxy, like archiva or artifactory or are you using a local repository on the server. (Which is populated by running mvn commands on the server) If you use the second, it is not a real remote repository and then you notice things like this. (Also not updating of snapshots on your own local repository). Please take a look at archiva or artifactory for your remote repository. It is much easier in use then a remote local repository. Hth, Nick Stolwijk -Original Message- From: Thomas Chang [mailto:[EMAIL PROTECTED] Sent: Fri 1/4/2008 2:50 PM To: users@maven.apache.org Subject: Re: A question about using Mirrors for Repositories The mirror is the repository on the remote server machine. What metadata files should I use? From this mirror I can download all the jars except those of org\apache\maven\plugins. Looks like you are missing some metadata files in the mirror. How did you populate the mirror? Hi all, I have a mirror in my settings.xml as follow: ... mirror idMyMirrorId/id mirrorOf*/mirrorOf nameDependencies for DKV Projects/name urlfile:sap-dev/CVSREPO/CvsMaven/url /mirror ... I do so because I want to download the dependencies from the repository on the server machine. And this runs in most case OK. But in somecase it doesn't work. For example when I run mvn clean, I got error as follow. But the Jar maven-archetype-quickstart-1.0.jar is on the repository on the server machine. I have copy this jar into the local repository. After that the mvn clean process can go on, i.e., the other jars can be downloaded from the server repository. Such a problem happends when I run mvn eclipse:eclipse. I have to copy the maven-eclipse-plugin-2.4.jar into the local repository. Somebody knows why? Regards Thomas [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. GroupId: org.apache.maven.archetypes ArtifactId: maven-archetype-quickstart Version: RELEASE Reason: Unable to determine the release version Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId= maven-archetype-quickstart \ -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.maven.archetypes -DartifactId=mave n-archetype-quickstart \ -Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] org.apache.maven.archetypes:maven-archetype-quickstart:jar:RELEASE [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 1 second [INFO] Finished at: Fri Jan 04 11:03:38 CET 2008 [INFO] Final Memory: 4M/8M [INFO] - Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker.
RE: Deploying multi project as single war
If you want to make a war of one of the projects, make a packaging war of it. It will copy all dependencies as jars inside the WEB-INF/lib directory, effectively creating one WAR deployment for deployment to remote repositories or application servers (Which deploy do you mean?). Also, copy your web.xml to the war project into src/main/webapp/WEB-INF to get it in the right place in the war file. Is this what you are intending to do, or did I get the question wrong? Hth, Nick Stolwijk -Original Message- From: dddzzz [mailto:[EMAIL PROTECTED] Sent: Fri 1/4/2008 5:32 PM To: users@maven.apache.org Subject: Deploying multi project as single war Is it possible to deploy multi project as single war. Projects structure looks similar to this: rootProject (packaging POM) -commonRootProject (packaging POM) --commonCoreProject (packaging JAR - for now) --... -serverRootProject (packaging POM) --serverCoreProject (packaging JAR - for now) --... -clientRootProject (packaging POM) --clientCoreProject (packaging JAR - for now) --... How can I make a single WAR from this projects with maven2. web.xml is in one of projects for now. -- View this message in context: http://www.nabble.com/Deploying-multi-project-as-single-war-tp14619903s177p14619903.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: generated-sources class files not in final artifact
AFAIK, the compiler plugin won't take the classes from target/generated-sources itself, but only when the generating plugin add that folder to the compile directories of a project. project.addCompileSourceRoot(sourceDirectoryPath); The weblogic plugin doesn't do this. I guess, the weblogic plugin compiles the classes, but I'm not sure of that. Also, the default folder for generated sources is not target/generated-sources, but target/generated-sources/anyPluginName, so multiple plugins are not in each others way. Try the maven-build-helper to add your source folder to the compiler. It should work. Hth, Nick Stolwijk -Original Message- From: Pankaj Tandon [mailto:[EMAIL PROTECTED] Sent: Thu 1/3/2008 5:01 PM To: users@maven.apache.org Subject: Re: generated-sources class files not in final artifact OK, if I were to use the maven-build-helper plugin, the only configuration I see there is the add-source goal with the sources folder specifying where the source folder is. I don't see where I can specify the target folder so that the compiled classes go into target/classes to be bundled in the artifact. Can you please explain how I can use the maven-build-helper plugin to have my classes compiled into target/classes. Also, I am a bit puzzled why you are surprised by classes being compiled. The compile phase will compile all java classes in ${builddir}/src/main/java into target/classes AND it also picks up files in target/generated-sources and compiles them. Now if there was a way to specify where to place the result of that compilation, I would have my answer. I tried to look in the configuration of maven-compiler-plugin but do not see any configuration param there that will tell it to place the compiled source from generated-sources into target/classes. Thanks Pankaj Jeff MAURY wrote: I don't see why Maven will compile these files in this directory. Maybe the compilation is done by the clientgen task. So I persist adding the target directory with the maven-build-helper plugin. Jeff On Jan 3, 2008 4:19 PM, Pankaj Tandon [EMAIL PROTECTED] wrote: If I remove the outputDir parameter to the weblogic-maven-plugin, the sources will go into ${basedir}/src/main/java. That immediately presents a problem because of: 1/ source control constantly detects these files as modified and 2/ the inability to do a mvn clean. (mvn clean will not remove the clientgen source from src/main/java). I also confirmed that these files DO get compiled but in the same location (that is, in generated-sources). All I want is that these files get compiled in target/classes like the rest of the source under src/main/java Thanks Pankaj Jeff MAURY wrote: For me, you generated sources are not compiled. Remove the outputDir parameter and they will be compiled as the default is to generate in the standard Java source directory. Jeff On Jan 3, 2008 3:09 PM, Pankaj Tandon [EMAIL PROTECTED] wrote: Here is the pom: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdcom.crowncastle/groupId artifactIdbpm-common/artifactId packagingjar/packaging version1.0-SNAPSHOT/version namebpm-common/name urlhttp://www.crowncastle.com/url parent groupIdcom.crowncastle/groupId artifactIdbpm/artifactId version1.0-SNAPSHOT/version /parent build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdweblogic-maven-plugin/artifactId version2.9.0-SNAPSHOT/version executions execution phasegenerate-sources/phase configuration inputWSDLfile:///${basedir}/src/main/resources/operations.wsdl/inputWSDL outputDir${project.build.directory}/generated-sources/outputDir packageNamecom.crowncastle.ws.operation /packageName serviceNameOperationService/serviceName /configuration goals goalclientgen/goal /goals /execution /executions dependencies dependency groupIdcom.sun.java/groupId artifactIdtools/artifactId version1.0/version /dependency dependency groupIdweblogic/groupId artifactIdweblogic/artifactId version9.2/version /dependency dependency groupIdweblogic/groupId artifactIdwebservices/artifactId version9.2/version
RE: How to easily determine all the versions of plugins that are being used.
It's a bad idea to release it yourself as 1.0-alpha-4. Whenever there will be an official alpha 4 yours won't get updated. Better call it an alpha-3-companyname-number, so you can even update your own version with a new numbered one. Hth, Nick Stolwijk Van: Hilco Wijbenga [mailto:[EMAIL PROTECTED] Verzonden: do 3-1-2008 18:43 Aan: Maven Users List Onderwerp: Re: How to easily determine all the versions of plugins that are being used. On Jan 3, 2008 2:13 AM, Martin Höller [EMAIL PROTECTED] wrote: Any news on this one? m-enforcer-p 1.0-alpha-3 apparently doesn't support requirePluginVersions and I can't find a newer version anywhere. If you check out the sources for the enforcer plugin you can build a 1.0-alpha-4 or something like that. It's very simple. Just include the snapshot repositories, update the pom.xml (change 1.0-SNAPSHOT to 1.0-alpha4), and run mvn install. I can't live without it anymore. :-) I find it more useful than the compiler plugin! ;-) (Have a look at http://maven.apache.org/plugins/maven-enforcer-plugin/source-repository.html .) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven Site, No Anonymous Access to Source Repository
The scm.connection is the anonymous connection. So, should continuum work with the developerConnection or the anonymous connection? (Or pick the one, that is available) With regards, Nick Stolwijk -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wed 12/19/2007 3:24 PM To: continuum-users@maven.apache.org Subject: Re: Maven Site, No Anonymous Access to Source Repository On Dec 18, 2007 9:08 PM, Roger Ye [EMAIL PROTECTED] wrote: and if I try to remove the scm.connection element from my pom.xml, then I can not add my project into continuum using the pom, continuum reports I think Continuum ought to work with just an anonymous connection. Can you check JIRA and file that if it's not there? -- Wendy
RE: Maven Site, No Anonymous Access to Source Repository
I've taken another look and it seems the scm report configuration was not added in the current stable (2.0.1) but was added in 2.1, which is still a snapshot. However, the configuration anonymousConnection/ /configuration was not succesfull with both versions. It seems not to override the default. On the other hand: configuration anonymousConnectionfoo/anonymousConnection /configuration Created a report on 2.0.1, so it doesn't look at that element. On 2.1 snapshot (fresh from svn) this failed horribly, because it can't resolve the connection. Also looking at the code, it seems that this is not taken into consideration. I think this is a feature request. With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of Roger Ye Sent: Wed 12/19/2007 5:08 AM To: Maven Users List; [EMAIL PROTECTED] Subject: Maven Site, No Anonymous Access to Source Repository Hi, I just made an attempt as I've said, but it failed, I tried to to configure the project-info-reports plugin as following: reporting plugins plugin artifactIdmaven-project-info-reports-plugin/artifactId configuration anonymousConnection/anonymousConnection !-- no anonymous access to source repository -- /configuration but the result soure-repository.html of mvn project-info-reports:scm still includes the anonymous access info and if I try to remove the scm.connection element from my pom.xml, then I can not add my project into continuum using the pom, continuum reports Missing 'connection' sub-element in the 'scm' element in the POM. hmm On 12/19/07, Roger Ye [EMAIL PROTECTED] wrote: Ah, thanks, I had added the scm.connection element back because continuum had had problem to checkout the source code, So the correct solution is to configure the project info report plugin and override the anonymousConnection configuration element to avoid it defaulting to scm.connection. I'll try that tomorrow and report the result back here. Thank you very much. On 12/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In your pom file you have defined your SCM connections: scm connection/ developerConnection/ tag/ url/ /scm connection is your anonymous access on the web page. developerConnection is your developer access on the website url is your web access on the website. See also the definition on the maven model [1], the project info reports plugin scm-mojo [2] and the examples for the project info reports plug scm-mojo [3] Hth, Nick Stolwijk [1] http://maven.apache.org/ref/2.0.7/maven-model/maven.html#class_scm [2] http://maven.apache.org/plugins/maven-project-info-reports-plugin/scm-mojo.html [3] http://maven.apache.org/plugins/maven-project-info-reports-plugin/examples/scm-report.html -Original Message- From: [EMAIL PROTECTED] on behalf of Roger Ye Sent: Tue 12/18/2007 4:18 PM To: Maven Users List Subject: Maven Site, No Anonymous Access to Source Repository Hi, I'm using mvn site to generate my project site, and in the source-repository.html page, it contains the anonymous access information to my svn source repository, but the fact is that we don't provide svn anonymous acess, and authentication is mandatory, So the question is how to remove the source repository anonymous access information which is false? Thanks Roger
RE: How to deploy corporate-pom?
I didn't meant on developer basis, but on project basis. Example: corporate-pom is at version 0.1.0 Project A has as parent corporate-pom:0.1.0 Project B has as parent corporate-pom:0.1.0 Project A wants a version changed, dependency added, whatever. corporate-pom changes to version 0.1.1-SNAPSHOT Project A changes its parent pom to 0.1.1-SNAPSHOT Developers at project A automatically get the new corporate-pom when they update and build project A. Developer also get automatically once a day any new SNAPSHOTS of the corporate-pom. Changes to corporate-pom are tested and found ok. Corporate-pom is released to version 0.1.1. Project A changes the version to 0.1.1. Developers get new 0.1.0 corporate pom when updating and building. Now you can go to the team leader, responsible person, etc of project b, and also let them update the version in their pom. Developers at project B also automatically get the new corporate pom. No manually removing corporate poms from local repositories or inconsistent builds. I guess this is the Good Way. :) Hth, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Wed 12/19/2007 3:36 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? In fact, both ways are not perfect! Assuming: i change the company pom in your way and advice the developers about this change. As you know most of the email are deleted without being read, i am sure that nobody remembers that there's a new version of the company Pom. So, the effect is the same like in my way: after i changed the company pom i have to advice the developers that they delete the local company pom in the local repository. This gets forgotten as well and the people are picking up the old company Pom. Both ways are bad! And there's no good way?! Does anybody have an idea? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, December 13, 2007 01:34 PM To: Maven Users List; Maven Users List Subject: RE: How to deploy corporate-pom? This is not good. The other developers won't get the change. And if other projects (and especially their tags) rely on this and you change it, you got not reproducible builds. Also not good. Just update the other versions when needed. It's the most clean thing to do. With regards, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Thu 12/13/2007 1:27 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? I just do it this way for the company pom (-DperformRelease=true) because it would be pain if the version number for the company pom has been increased and all other projects defining this one as parent has to be edited. When i edit and doing mvn clean deploy -DperformRelease=true -U -X for the company pom i can see that the local repository has got the change. This is good so far. But what is about the other developers still having the old company pom in their local repository (using the same version number)? brgds Dominique Boeckli -Original Message- From: Siegmann Daniel, NY [mailto:[EMAIL PROTECTED] Sent: Friday, November 09, 2007 10:30 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? How do I package the corporate pom? Do I just upload it to archiva in a directory called corporate-pom with just the pom.xml file in there? No. This is a Maven project like any other. Just have the following in your POM: project packagingpom/packaging ... /project Then use the Maven deploy plugin (mvn deploy). Note that you should follow standard release procedure. i.e. if you are not releasing a snapshot you should set -DperformRelease=true and you should have this tagged in your version control system (or just use the release plugin). -- Daniel Siegmann FJA-US, Inc. 512 Seventh Ave., New York, NY 10018 (212) 840-2618 ext. 139 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to deploy corporate-pom?
I thought the problem was with developers having to remove stuff from their local repository. Now you present another problem. In my vision, they should certainly not change automatically. At least not the tags, then you can have two builds of the same tag with different parent information, based on when it's build. So should they change all, then you could write a script which replaced it in the trunks and branches. Or should they only change, when the projects get alive again. I guess you can compare it to mavens own corporate pom. There are a few versions of that, and plugins, modules and projects only update, when they think it is necessary and when it is completely tested. The parent of project is also a dependency, which after changing, should be tested whether it broke anything or not. So let me rephrase it, why would you want to change projects nobody is working on? Maybe it is easier to have it as one of the steps when reviving a project. Check whether the parent should be updated and test it if has to. Hth, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Wed 12/19/2007 4:05 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? yes, i understand, but good-way-example is based on 2 projects. But, my example is the following: Project A same. Project B same. no comes the difference 200 more projects, currently nobody working on it, some were not changed since 2 years or more, has as parent corporate-pom:0.1.0 as well. In this case the good way is a pain as well. Who goes to change all those projects to the new corporate-pom:0.1.1 ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 03:46 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? I didn't meant on developer basis, but on project basis. Example: corporate-pom is at version 0.1.0 Project A has as parent corporate-pom:0.1.0 Project B has as parent corporate-pom:0.1.0 Project A wants a version changed, dependency added, whatever. corporate-pom changes to version 0.1.1-SNAPSHOT Project A changes its parent pom to 0.1.1-SNAPSHOT Developers at project A automatically get the new corporate-pom when they update and build project A. Developer also get automatically once a day any new SNAPSHOTS of the corporate-pom. Changes to corporate-pom are tested and found ok. Corporate-pom is released to version 0.1.1. Project A changes the version to 0.1.1. Developers get new 0.1.0 corporate pom when updating and building. Now you can go to the team leader, responsible person, etc of project b, and also let them update the version in their pom. Developers at project B also automatically get the new corporate pom. No manually removing corporate poms from local repositories or inconsistent builds. I guess this is the Good Way. :) Hth, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Wed 12/19/2007 3:36 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? In fact, both ways are not perfect! Assuming: i change the company pom in your way and advice the developers about this change. As you know most of the email are deleted without being read, i am sure that nobody remembers that there's a new version of the company Pom. So, the effect is the same like in my way: after i changed the company pom i have to advice the developers that they delete the local company pom in the local repository. This gets forgotten as well and the people are picking up the old company Pom. Both ways are bad! And there's no good way?! Does anybody have an idea? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, December 13, 2007 01:34 PM To: Maven Users List; Maven Users List Subject: RE: How to deploy corporate-pom? This is not good. The other developers won't get the change. And if other projects (and especially their tags) rely on this and you change it, you got not reproducible builds. Also not good. Just update the other versions when needed. It's the most clean thing to do. With regards, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Thu 12/13/2007 1:27 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? I just do it this way for the company pom (-DperformRelease=true) because it would be pain if the version number for the company pom has been increased and all other projects defining this one as parent has to be edited. When i edit and doing mvn clean deploy -DperformRelease=true -U -X for the company pom i can see that the local repository has got the change. This is good so far. But what is about the other developers still having the old company pom in their local repository (using the same version number)? brgds Dominique Boeckli -Original Message- From: Siegmann Daniel, NY
RE: How to deploy corporate-pom?
Couldn't you put the version of the parent (corporate-pom) to LATEST instead of a version number. AFAIK, when you do a release it is changed into the current latest version. So tags won't change when you update your corporate pom. Hth, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Wed 12/19/2007 5:04 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? the problem is that things get forgotten: Assuming i start working on Project Y and i forget to check if there's a new company pom. After a few changes in my code in this project, it is builded on wrong dependencies succesfully and deployed on the test server. Deployment failes and i spent a lot of time debugging it, searching the problem in my own code. Half of the other developers doing the same error, loosing a lot of time. The script you mentioned is a solution for this problem. Does anybody have such a script? P.S. removing stuff from their local repo was not really another problem, it is only a other way to handle the same problem. In this way i don't use any snapshot version, i work and edit directly on released versions (eg 1.0). When i think the company pom is ok, i deploy it and advice my collegues to delete this versions from their local repo. In this way, they are forced to get the new parent from the intranet repo. The point is, that the version allway remains the same for the company pom. This way is ugly but it causes not more work and problems than the official way. I am not happy with it, neither, and this is the reason why i ask here around what other people are doing. brgds Dominique -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 04:16 PM To: Maven Users List; Maven Users List Subject: RE: How to deploy corporate-pom? I thought the problem was with developers having to remove stuff from their local repository. Now you present another problem. In my vision, they should certainly not change automatically. At least not the tags, then you can have two builds of the same tag with different parent information, based on when it's build. So should they change all, then you could write a script which replaced it in the trunks and branches. Or should they only change, when the projects get alive again. I guess you can compare it to mavens own corporate pom. There are a few versions of that, and plugins, modules and projects only update, when they think it is necessary and when it is completely tested. The parent of project is also a dependency, which after changing, should be tested whether it broke anything or not. So let me rephrase it, why would you want to change projects nobody is working on? Maybe it is easier to have it as one of the steps when reviving a project. Check whether the parent should be updated and test it if has to. Hth, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Wed 12/19/2007 4:05 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? yes, i understand, but good-way-example is based on 2 projects. But, my example is the following: Project A same. Project B same. no comes the difference 200 more projects, currently nobody working on it, some were not changed since 2 years or more, has as parent corporate-pom:0.1.0 as well. In this case the good way is a pain as well. Who goes to change all those projects to the new corporate-pom:0.1.1 ? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 03:46 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? I didn't meant on developer basis, but on project basis. Example: corporate-pom is at version 0.1.0 Project A has as parent corporate-pom:0.1.0 Project B has as parent corporate-pom:0.1.0 Project A wants a version changed, dependency added, whatever. corporate-pom changes to version 0.1.1-SNAPSHOT Project A changes its parent pom to 0.1.1-SNAPSHOT Developers at project A automatically get the new corporate-pom when they update and build project A. Developer also get automatically once a day any new SNAPSHOTS of the corporate-pom. Changes to corporate-pom are tested and found ok. Corporate-pom is released to version 0.1.1. Project A changes the version to 0.1.1. Developers get new 0.1.0 corporate pom when updating and building. Now you can go to the team leader, responsible person, etc of project b, and also let them update the version in their pom. Developers at project B also automatically get the new corporate pom. No manually removing corporate poms from local repositories or inconsistent builds. I guess this is the Good Way. :) Hth, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Wed 12/19/2007 3:36 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? In fact, both ways
RE: How to deploy corporate-pom?
I've created a jira issue for the enforcer rule and I'm working on it. http://jira.codehaus.org/browse/MENFORCER-28 With regards, Nick Stolwijk
RE: offline setting inside settings.xml does not work with Maven 2.0.7
Also take a look at the XSD [1]. Here the offline element is of type xs:boolean, which indicates it should be true or false. Default = false, so even if you include the element it is still false. Hth, Nick Stolwijk [1] http://maven.apache.org/xsd/settings-1.0.0.xsd. -Original Message- From: Christian Schmidt-Guetter [mailto:[EMAIL PROTECTED] Sent: Tue 12/18/2007 3:05 PM To: Maven Users List Subject: Re: offline setting inside settings.xml does not work with Maven 2.0.7 Hello Guillaume, Guillaume Lederrey schrieb: Try like this : settings offlinetrue/offline /settings ... That works fine! - Thank you very much. Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven Site, No Anonymous Access to Source Repository
In your pom file you have defined your SCM connections: scm connection/ developerConnection/ tag/ url/ /scm connection is your anonymous access on the web page. developerConnection is your developer access on the website url is your web access on the website. See also the definition on the maven model [1], the project info reports plugin scm-mojo [2] and the examples for the project info reports plug scm-mojo [3] Hth, Nick Stolwijk [1] http://maven.apache.org/ref/2.0.7/maven-model/maven.html#class_scm [2] http://maven.apache.org/plugins/maven-project-info-reports-plugin/scm-mojo.html [3] http://maven.apache.org/plugins/maven-project-info-reports-plugin/examples/scm-report.html -Original Message- From: [EMAIL PROTECTED] on behalf of Roger Ye Sent: Tue 12/18/2007 4:18 PM To: Maven Users List Subject: Maven Site, No Anonymous Access to Source Repository Hi, I'm using mvn site to generate my project site, and in the source-repository.html page, it contains the anonymous access information to my svn source repository, but the fact is that we don't provide svn anonymous acess, and authentication is mandatory, So the question is how to remove the source repository anonymous access information which is false? Thanks Roger
RE: mail-notifier
Take a look at your configuration: property namemail.smtp.socketFactory.class/name valuejavax.net.ssl.SSLSocketFactory/value /property Maybe if you try it with SocketFactory instead of SSLSocketFactory? Hth, Nick Stolwijk -Original Message- From: ivan [mailto:[EMAIL PROTECTED] Sent: Mon 12/17/2007 11:04 AM To: continuum-users@maven.apache.org Subject: mail-notifier Hi! I installed continuum as single application and have problem with notifier. I configured plexus.xml like in example (http://maven.apache.org/continuum/documentation/1_1/installation/standalone.html#Mail_server_configuration) but continuum could send mail. 853279 [pool-1-thread-1] ERROR org.apache.maven.continuum.notification.ContinuumNotificationDispatcher:default - Error while trying to use the mail notifier. org.codehaus.plexus.notification.NotificationException: Exception while sending message. at org.apache.maven.continuum.notification.mail.MailContinuumNotifier.sendMessage(MailContinuumNotifier.java:566) at org.apache.maven.continuum.notification.mail.MailContinuumNotifier.buildComplete(MailContinuumNotifier.java:387) at org.apache.maven.continuum.notification.mail.MailContinuumNotifier.sendNotification(MailContinuumNotifier.java:254) at org.apache.maven.continuum.notification.DefaultContinuumNotificationDispatcher.sendNotification(DefaultContinuumNotificationDispatcher.java:199) at org.apache.maven.continuum.notification.DefaultContinuumNotificationDispatcher.sendNotification(DefaultContinuumNotificationDispatcher.java:151) at org.apache.maven.continuum.notification.DefaultContinuumNotificationDispatcher.buildComplete(DefaultContinuumNotificationDispatcher.java:103) at org.apache.maven.continuum.buildcontroller.DefaultBuildController.endBuild(DefaultBuildController.java:221) at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:175) at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecutor.java:50) at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116) at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442) at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) Caused by: org.codehaus.plexus.mailsender.MailSenderException: Error while sending the message. at org.codehaus.plexus.mailsender.javamail.AbstractJavamailMailSender.send(AbstractJavamailMailSender.java:226) at org.apache.maven.continuum.notification.mail.MailContinuumNotifier.sendMessage(MailContinuumNotifier.java:562) ... 14 more Caused by: javax.mail.MessagingException: Exception reading response; nested exception is: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:275) at org.codehaus.plexus.mailsender.javamail.AbstractJavamailMailSender.send(AbstractJavamailMailSender.java:212) ... 15 more Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:521) at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:744) at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440) ... 19 more May be I forgot to set some other parameters? Thanks.
RE: maven2 release plugin - no dependencies update
If I recall correctly, the updateDependencies option was added recently. As you see in the plugin page, it is for a snapshot version. Perhaps you are using a stable version, which does not have this option included yet. As far as I know, the updateDependencies option is just what you need. With regards, Nick Stolwijk -Original Message- From: Tomasz Zieleniewski [mailto:[EMAIL PROTECTED] Sent: Fri 12/14/2007 9:55 AM To: users@maven.apache.org Subject: maven2 release plugin - no dependencies update Hi, I have following problem. I have a main maven project of the pom type which consists of 4 subprojects of the type jar. Two of my subprojects have dependency on the two previous ones. When I invoke mvn release:prepare -D dryRun=true everything works fine except that the dependencies from two last subrojects are not updated to the new dev version So for instance when I have following release state pom - 1.0.0-SNAPSHOT sub1 - 1.0-SNAPSHOT sub2 - 1.0-SNAPSHOT sub3 - 1.0-SNAPSHOT sub4 - 1.0-SNAPSHOT and inside sub3 pom.xml such dependency dependencies dependency groupIdgroup/groupId artifactIdsub1/artifactId version1.0-SNAPSHOT/version scopeprovided/scope /dependency /dependencies and even if the version for sub1 is increased by release the dependency version is not changed. I tried to use -D*updateDependencies http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#updateDependencies http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#updateDependencies=true but it didn't help* Is it an error or did I miss something? bests regards tomasz zieleniewski
RE: FATAL ERROR on release:prepare with a super-pom
De code at the linenumber is: if ( trunkPath.endsWith( / ) ) { trunkPath = trunkPath.substring( 0, trunkPath.length() - 1 ); } if ( tagPath.endsWith( / ) ) { tagPath = tagPath.substring( 0, tagPath.length() - 1 ); } Which will throw an exception if your trunkPath or tagPath is empty. So something is wrong with that, I don't know what. With regards, Nick Stolwijk -Original Message- From: javijava [mailto:[EMAIL PROTECTED] Sent: Fri 12/14/2007 11:04 AM To: users@maven.apache.org Subject: FATAL ERROR on release:prepare with a super-pom Hi folks, I'm trying to do a mv nrelease:prepare from a super-pom that have a lsit of proyects i want to release to the same version.. All was runing fine,asking the new version, the SCM TAG ..but just after this i have a FATAL ERROR : java.lang.ArrayIndexOutOfBoundsException: 37 at ...shared.release.phase.RewritePomsForReleasePhase.TranslateUrlPath(RewritePomForReleasePhase.java:249) If any one know this issue, reply quickly please, i need do the release this morning. Thanks a lot to all for all. Have a nice day and nice holydays!! -- View this message in context: http://www.nabble.com/FATAL-ERROR-on-release%3Aprepare--with-a-super-pom-tp14332951s177p14332951.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FATAL ERROR on release:prepare with a super-pom
This is deep down in the maven-release code, so no, you don't have to adjust it. Why are you using relativePath? If you remove it and do a mvn install the super pom is copied to your local repository and found from there. With regards, Nick Stolwijk -Original Message- From: javijava [mailto:[EMAIL PROTECTED] Sent: Fri 12/14/2007 12:46 PM To: users@maven.apache.org Subject: RE: FATAL ERROR on release:prepare with a super-pom De code at the linenumber is: if ( trunkPath.endsWith( / ) ) { trunkPath = trunkPath.substring( 0, trunkPath.length() - 1 ); } if ( tagPath.endsWith( / ) ) { tagPath = tagPath.substring( 0, tagPath.length() - 1 ); } .Where are placed this lines? in a maven-configuration fike? .i must modify this..or is only the way that maven work with paths? Which will throw an exception if your trunkPath or tagPath is empty. Is possible, that the parent tags in each sub-project are wrong? i have the super-pom in a folder like the sub projects (same level), an example of tags: parent groupIdxxx/groupId artifactIdsuper-pom/artifactId version0.1-SNAPSHOT/version relativePath../super-pom/pom.xml/relativePath /parent Thanks 4 the reply Nick. -- View this message in context: http://www.nabble.com/FATAL-ERROR-on-release%3Aprepare--with-a-super-pom-tp14332951s177p14334423.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven2 release plugin - no dependencies update
Looking at central, I see beta-7 is already there, so you don't have to use snapshot. Maybe if you try it this way: dependencies dependency groupIdgroup/groupId artifactIdsub1/artifactId version${pom.version}/version scopeprovided/scope /dependency /dependencies Hth, Nick Stolwijk -Original Message- From: Tomasz Zieleniewski [mailto:[EMAIL PROTECTED] Sent: Fri 12/14/2007 3:37 PM To: Maven Users List Subject: Re: maven2 release plugin - no dependencies update Hi, what is the vesion tag for the snapshot version?? regards tomasz On Dec 14, 2007 10:22 AM, [EMAIL PROTECTED] wrote: If I recall correctly, the updateDependencies option was added recently. As you see in the plugin page, it is for a snapshot version. Perhaps you are using a stable version, which does not have this option included yet. As far as I know, the updateDependencies option is just what you need. With regards, Nick Stolwijk -Original Message- From: Tomasz Zieleniewski [mailto: [EMAIL PROTECTED] Sent: Fri 12/14/2007 9:55 AM To: users@maven.apache.org Subject: maven2 release plugin - no dependencies update Hi, I have following problem. I have a main maven project of the pom type which consists of 4 subprojects of the type jar. Two of my subprojects have dependency on the two previous ones. When I invoke mvn release:prepare -D dryRun=true everything works fine except that the dependencies from two last subrojects are not updated to the new dev version So for instance when I have following release state pom - 1.0.0-SNAPSHOT sub1 - 1.0-SNAPSHOT sub2 - 1.0-SNAPSHOT sub3 - 1.0-SNAPSHOT sub4 - 1.0-SNAPSHOT and inside sub3 pom.xml such dependency dependencies dependency groupIdgroup/groupId artifactIdsub1/artifactId version1.0-SNAPSHOT/version scopeprovided/scope /dependency /dependencies and even if the version for sub1 is increased by release the dependency version is not changed. I tried to use -D*updateDependencies http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#updateDependencies http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#updateDependencies =true but it didn't help* Is it an error or did I miss something? bests regards tomasz zieleniewski
RE: How to deploy corporate-pom?
This is not good. The other developers won't get the change. And if other projects (and especially their tags) rely on this and you change it, you got not reproducible builds. Also not good. Just update the other versions when needed. It's the most clean thing to do. With regards, Nick Stolwijk -Original Message- From: Boeckli, Dominique [mailto:[EMAIL PROTECTED] Sent: Thu 12/13/2007 1:27 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? I just do it this way for the company pom (-DperformRelease=true) because it would be pain if the version number for the company pom has been increased and all other projects defining this one as parent has to be edited. When i edit and doing mvn clean deploy -DperformRelease=true -U -X for the company pom i can see that the local repository has got the change. This is good so far. But what is about the other developers still having the old company pom in their local repository (using the same version number)? brgds Dominique Boeckli -Original Message- From: Siegmann Daniel, NY [mailto:[EMAIL PROTECTED] Sent: Friday, November 09, 2007 10:30 PM To: Maven Users List Subject: RE: How to deploy corporate-pom? How do I package the corporate pom? Do I just upload it to archiva in a directory called corporate-pom with just the pom.xml file in there? No. This is a Maven project like any other. Just have the following in your POM: project packagingpom/packaging ... /project Then use the Maven deploy plugin (mvn deploy). Note that you should follow standard release procedure. i.e. if you are not releasing a snapshot you should set -DperformRelease=true and you should have this tagged in your version control system (or just use the release plugin). -- Daniel Siegmann FJA-US, Inc. 512 Seventh Ave., New York, NY 10018 (212) 840-2618 ext. 139 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how can I just create java files without compiling?
Try to call the goal directly by: mvn axistools:wsdl2java When that starts complaining about an unknown plugin try: mvn org.codehaus.mojo:axistools:wsdl2java Hth, Nick S. -Original Message- From: oetzi [mailto:[EMAIL PROTECTED] Sent: Thu 12/6/2007 8:56 AM To: users@maven.apache.org Subject: how can I just create java files without compiling? Hallo, I'm a maven newbie :) I have a WSDL file and I'm using the axistools-maven-plugin with the goal wsdl2java to create the associated java files. My problem: I need a command to create the java files only. At the moment I'm using the mvn compile or the mvn install command. Can anyone help me? -- View this message in context: http://www.nabble.com/how-can-I-just-create-java-files-without-compiling--tf4954517s177.html#a14187822 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven goal deploy:deploy-file skips the authentication?
If I recall correctly, there is a bug in the settings. When you have a repository and a server with the same id, Maven gets confused. So, do you also have a repository configured with id ourrepository? Normally I postfix every server id with .server, so in this case the server id becomes ourrepository.server. Hth, Nick Stolwijk -Original Message- From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 11:07 AM To: users@maven.apache.org Subject: maven goal deploy:deploy-file skips the authentication? Hello, gentlemen, we are using Artifactory to hold the modules we're using in Maven, for some weird reason we can't upload an artifact to the repository. For example I want to deploy the artifact with such command: mvn deploy:deploy-file -DgroupId=org.apache.hadoop \ -DartifactId=hadoop-core \ -Dversion=0.14.3 \ -Dpackaging=jar \ -Dfile=hadoop-0.14.3-core.jar \ -DpomFile=/home/user/tmp/hadoop-0.14.3/hadoop-pom.xml \ -DrepositoryId=ourrepository \ -Durl=http://our.domain.com:8080/artifactory/[EMAIL PROTECTED] in the ~/.m2/settings.xml I have: settings servers server idourrepository/id usernameusername/username passwordpassword/password /server /servers /settings and when doing the dump of server request/response I can see following: request== PUT /artifactory/[EMAIL PROTECTED]/org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar HTTP/1.1 User-Agent: Java/1.6.0_03-p3 Host: our.domain.com:8080 Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Content-Length: 1360922 /request= ===response== HTTP/1.1 401 Authentication_is_required WWW-Authenticate: Basic realm=Artifactory Realm Content-Type: text/html; charset=iso-8859-1 Content-Length: 1481 Server: Jetty(6.1.4) html head meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/ titleError 401 /title /head bodyh2HTTP ERROR: 401/h2preAuthentication is required./pre pRequestURI=/artifactory/[EMAIL PROTECTED]/org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar/p pismalla href=http://jetty.mortbay.org/;Powered by Jetty:///a/small/i/pbr/ ===/response= So it looks like the authentication credentials were not even sent to the server. I double checked the repositoryId used in the command line and in the settings.xml and found there's no typo. So could somebody please explain what else I could miss and how to fix the problem or what do I need to do to provide more details? Thank you in advance! -- Eugene N Dzhurinsky
RE: Using scnm command with maven.
Try using the SCM plugin [1] to checkout the files you want into the target directory. From there the assembly plugin can use them. Hth, Nick Stolwijk [1] http://maven.apache.org/scm/plugins/ -Original Message- From: Vishal Pahwa [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 12:52 PM To: users@maven.apache.org Subject: Using scnm command with maven. Hi We are using maven2.0.6. I am using assembly plugin for generating the release package. In that i am using fileset tag. but i need to give the location from SVN address so that i could get the files directly from SVN repository. In ant i know tag is available as src= target= username= password= But in maven how can i do that. Regards Vishal.
RE: Not able to pass multiple arguments to javac
According to the web page [1], this should be: plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration compilerArguments verbose / bootclasspath${java.home}\lib\rt.jar/bootclasspath /compilerArguments /configuration /plugin /plugins So can you try that? Hth, Nick Stolwijk [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html -Original Message- From: Jeff Jensen [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 3:32 PM To: 'Maven Users List' Subject: RE: Not able to pass multiple arguments to javac Try this approach: configuration forktrue/fork maxmem1024m/maxmem showDeprecationtrue/showDeprecation showWarningstrue/showWarnings etc... /configuration To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo Sent: Monday, November 26, 2007 8:25 AM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Ignore my earlier email. The suggestion actually does *not* work. When I run with -X option, it shows only the last compilerArgument. See the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' -- [DEBUG] (f) basedir = /tmp/my-app [DEBUG] (f) buildDirectory = /tmp/my-app/target [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] [DEBUG] (f) compilerArgument = -verbose [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) failOnError = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes [DEBUG] (f) outputFileName = my-app-1.0-SNAPSHOT [DEBUG] (f) projectArtifact = com.mycompany.app:my-app:jar:1.0-SNAPSHOT [DEBUG] (f) showDeprecation = false [DEBUG] (f) showWarnings = false [DEBUG] (f) staleMillis = 0 [DEBUG] (f) verbose = false [DEBUG] -- end configuration -- Thanks, Sahoo Sahoo wrote: Thanks, that works. Sahoo Wayne Fay wrote: Try this, Sahoo: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration compilerArgument-nowarn/compilerArgument compilerArgument-verbose/compilerArgument /configuration /plugin On 11/22/07, Sahoo [EMAIL PROTECTED] wrote: As suggested in [1], I tried configuring maven-compiler-plugin like this: compilerArgument-nowarn -verbose/compilerArgument But it causes compilation failure. Details given below: Failure executing javac, but could not parse the error: javac: invalid flag: -nowarn -verbose How can I pass multiple arguments to javac? Thanks, Sahoo [1] http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass- compiler-arguments.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Surefire System Properties not set?
You are configuring the wrong plugin: On the webpage: groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId In your code: groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId Hth, Nick Stolwijk -Original Message- From: Jimbog [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 3:40 PM To: users@maven.apache.org Subject: Surefire System Properties not set? Hi, Im trying to pass a system property into surefire to override a coherence cluster address, I have my surefire plugin configured as per.. http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId configuration systemProperties property nametangosol.coherence.clusteraddress/name value${tangosol.coherence.clusteraddress}/value /property property nametangosol.coherence.clusterport/name value${tangosol.coherence.clusterport}/value /property /systemProperties /configuration /plugin And when my tests run, these properties are nowhere to be seen (see below), causing my tests to fail. Am I missing something here? I have tries setting the properties in /m2/settings.xml and using -D at the mvn command line with no joy. Has someone else overridden a coherence cluster address in maven run unit tests? ?xml version=1.0 encoding=UTF-8 ? testsuite errors=4 skipped=0 tests=4 time=5.463 failures=0 name=com.willhill.bcs.persistency.tangosol.LiabilityCacheDAOImplTest properties property value=Java(TM) 2 Runtime Environment, Standard Edition name=java.runtime.name/ property value=C:\Java\jdk1.5.0_12\jre\bin name=sun.boot.library.path/ property value=1.5.0_12-b04 name=java.vm.version/ property value=Sun Microsystems Inc. name=java.vm.vendor/ property value=http://java.sun.com/; name=java.vendor.url/ property value=; name=path.separator/ property value=Java HotSpot(TM) Client VM name=java.vm.name/ property value=sun.io name=file.encoding.pkg/ property value=GB name=user.country/ property value=SUN_STANDARD name=sun.java.launcher/ property value= name=sun.os.patch.level/ property value=Java Virtual Machine Specification name=java.vm.specification.name/ property value=C:\dev\whbcs\whbcs-liability\whbcs-liability-core name=user.dir/ property value=1.5.0_12-b04 name=java.runtime.version/ property value=sun.awt.Win32GraphicsEnvironment name=java.awt.graphicsenv/ property value=C:\dev\whbcs\whbcs-liability\whbcs-liability-core name=basedir/ property value=C:\Java\jdk1.5.0_12\jre\lib\endorsed name=java.endorsed.dirs/ property value=x86 name=os.arch/ property value=C:\Users\gustardj\AppData\Local\Temp\ name=java.io.tmpdir/ property value= name=line.separator/ property value=Sun Microsystems Inc. name=java.vm.specification.vendor/ property value= name=user.variant/ property value=Windows Vista name=os.name/ property value=Cp1252 name=sun.jnu.encoding/ property value=C:\Java\jdk1.5.0_12\jre\bin;.;C:\Windows\system32;C:\Windows;C:\Java\jdk1.5.0_12\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\OpenSSH\bin;C:\Program Files\Subversion\bin;C:\Java\jdk1.5.0_12\bin;C:\maven-2.0.6\bin;C:\Program Files\TortoiseSVN\bin name=java.library.path/ property value=Java Platform API Specification name=java.specification.name/ property value=49.0 name=java.class.version/ property value=HotSpot Client Compiler name=sun.management.compiler/ property value=6.0 name=os.version/ property value=C:\Users\gustardj name=user.home/ property value=Europe/London name=user.timezone/ property value=sun.awt.windows.WPrinterJob name=java.awt.printerjob/ property value=Cp1252 name=file.encoding/ property value=1.5 name=java.specification.version/ property value=gustardj name=user.name/ property
RE: Deploying Non-Maven Created Jar
If it is only a jar file you wish to deploy: mvn deploy:deploy-file [1] Hth, Nick Stolwijk [1] http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html -Original Message- From: Thomas Jackson [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 3:36 PM To: Maven Users Subject: Deploying Non-Maven Created Jar I have a jar from a third party that I want to use in my maven project. I was wondering if there is an easy way to setup a maven project so that I can replace the jar and have it deploy to the server using mvn deploy. Does anyone have any instructions or samples of doing this? I know I can create the directory structure and files manually, but would really rather have maven do that. Any suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Surefire System Properties not set?
No, the surefire plugin runs your tests, and is by default enabled for most packagings, so if you want to pass in properties you have to override the configuration. The report plugin only does that, the reporting. It takes the results from target/surefire-reports and creates the html files from them. With regards, Nick Stolwijk -Original Message- From: Jimbog [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 4:42 PM To: users@maven.apache.org Subject: RE: Surefire System Properties not set? Hi, yes, we were only using the reports plugin, ive added the maven-surefire-plugin and the system properties get passed through, I would have thought the reports plugin would pass them in. nicklist wrote: You are configuring the wrong plugin: On the webpage: groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId In your code: groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId Hth, Nick Stolwijk -Original Message- From: Jimbog [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 3:40 PM To: users@maven.apache.org Subject: Surefire System Properties not set? Hi, Im trying to pass a system property into surefire to override a coherence cluster address, I have my surefire plugin configured as per.. http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId configuration systemProperties property nametangosol.coherence.clusteraddress/name value${tangosol.coherence.clusteraddress}/value /property property nametangosol.coherence.clusterport/name value${tangosol.coherence.clusterport}/value /property /systemProperties /configuration /plugin And when my tests run, these properties are nowhere to be seen (see below), causing my tests to fail. Am I missing something here? I have tries setting the properties in /m2/settings.xml and using -D at the mvn command line with no joy. Has someone else overridden a coherence cluster address in maven run unit tests? ?xml version=1.0 encoding=UTF-8 ? testsuite errors=4 skipped=0 tests=4 time=5.463 failures=0 name=com.willhill.bcs.persistency.tangosol.LiabilityCacheDAOImplTest properties property value=Java(TM) 2 Runtime Environment, Standard Edition name=java.runtime.name/ property value=C:\Java\jdk1.5.0_12\jre\bin name=sun.boot.library.path/ property value=1.5.0_12-b04 name=java.vm.version/ property value=Sun Microsystems Inc. name=java.vm.vendor/ property value=http://java.sun.com/; name=java.vendor.url/ property value=; name=path.separator/ property value=Java HotSpot(TM) Client VM name=java.vm.name/ property value=sun.io name=file.encoding.pkg/ property value=GB name=user.country/ property value=SUN_STANDARD name=sun.java.launcher/ property value= name=sun.os.patch.level/ property value=Java Virtual Machine Specification name=java.vm.specification.name/ property value=C:\dev\whbcs\whbcs-liability\whbcs-liability-core name=user.dir/ property value=1.5.0_12-b04 name=java.runtime.version/ property value=sun.awt.Win32GraphicsEnvironment name=java.awt.graphicsenv/ property value=C:\dev\whbcs\whbcs-liability\whbcs-liability-core name=basedir/ property value=C:\Java\jdk1.5.0_12\jre\lib\endorsed name=java.endorsed.dirs/ property value=x86 name=os.arch/ property value=C:\Users\gustardj\AppData\Local\Temp\ name=java.io.tmpdir/ property value= name=line.separator/ property value=Sun Microsystems Inc. name=java.vm.specification.vendor/ property value= name=user.variant/ property value=Windows Vista name=os.name/ property value=Cp1252 name=sun.jnu.encoding/ property value=C:\Java\jdk1.5.0_12\jre\bin;.;C:\Windows\system32;C:\Windows;C:\Java\jdk1.5.0_12\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\OpenSSH\bin;C:\Program Files\Subversion\bin;C:\Java\jdk1.5.0_12\bin;C:\maven-2.0.6\bin;C:\Program Files\TortoiseSVN\bin name=java.library.path/ property value=Java Platform API Specification name=java.specification.name/ property value=49.0 name=java.class.version/ property value=HotSpot Client Compiler
RE: Maven release plugin: Address already in use!
What does your SCM configuration look like? Which protocol are you using? Please give some more information. With regards, Nick Stolwijk -Original Message- From: Bashar Jawad [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 5:11 PM To: Maven Users List Subject: Re: Maven release plugin: Address already in use! I still can't resolve this issue. I am using Maven 2.0.7. This is a major blocker issue for me so I would really appreciate any help. Does anyone at least know what port the release plugin uses ? Thanks, Bashar Jawad wrote: I am trying to use the maven-release-plugin to prepare and perform a release. I simply created a new empty maven 2 project and added the required scm information in the POM. However any time I run the command: mvn release:clean release:prepare maven asks me for release/tag/developement version information and then exists with the following error: [INFO] Transforming 'Unnamed - ReleasePluginDemo:ReleasePluginDemo:jar:1.0-SNAPSHOT'... [INFO] Not generating release POMs [INFO] Executing goals 'clean verify'... [INFO] Executing: mvn clean verify --no-plugin-updates -P default ERROR: transport error 202: bind failed: Address already in use [transport.c,L41] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113) ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) [debugInit.c,L500] JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initialized [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Maven execution failed, exit code: '1' [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:224) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:131) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) ... 16 more Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:66) at org.apache.maven.shared.release.phase.RunPrepareGoalsPhase.execute(RunPrepareGoalsPhase.java:42) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:194) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:131) at org.apache.maven.shared.release.DefaultReleaseManager.prepare(DefaultReleaseManager.java:94) at org.apache.maven.plugins.release.PrepareReleaseMojo.execute(PrepareReleaseMojo.java:127) ... 18 more Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.exec.ForkedMavenExecutor.executeGoals(ForkedMavenExecutor.java:103)
RE: Not able to pass multiple arguments to javac
I've found the problem. Plexus (which runs the compiler and commandline) is quoting each argument. So for this configuration: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration target1.6/target source1.6/source compilerArguments verbose / bootclasspath${java.home}/lib/rt.jar/bootclasspath /compilerArguments compilerArgument-implicit:none -proc:none/compilerArgument forktrue/fork /configuration /plugin /plugins /build mvn clean compile -X gives the following output: [DEBUG] Command line options: [DEBUG] -d /home/nick/workspace/buildserver-test-project/trunk/target/classes -classpath /home/nick/workspace/buildserver-test-project/trunk/target/classes: /home/nick/workspace/buildserver-test-project/trunk/src/main/java/nl/iprofs/sandbox/buildservertest/App.java -g -nowarn -target 1.6 -source 1.6 -bootclasspath /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar -verbose -implicit:none -proc:none [INFO] Compiling 1 source file to /home/nick/workspace/buildserver-test-project/trunk/target/classes While it is actually executing: /usr/lib/jvm/java-6-sun-1.6.0.00/bin/javac -d /home/nick/workspace/buildserver-test-project/trunk/target/classes -classpath /home/nick/workspace/buildserver-test-project/trunk/target/classes: /home/nick/workspace/buildserver-test-project/trunk/src/main/java/nl/iprofs/sandbox/buildservertest/App.java -g -nowarn -target 1.6 -source 1.6 -bootclasspath /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar -verbose -implicit:none -proc:none (Much more quotes, but just for the idea) If I execute this myself, javac indeed gives the error as described. I guess, this should be a feature request for the maven-compiler-plugin, to indeed accept multiple compilerArgument options. Maybe something like this: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration target1.6/target source1.6/source compilerArguments verbose / bootclasspath${java.home}/lib/rt.jar/bootclasspath compilerArgument-implicit:none/compilerArgument compilerArgument-prox:none/compilerArgument /compilerArguments forktrue/fork /configuration /plugin /plugins /build Hth, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mon 11/26/2007 5:34 PM To: Maven Users List Subject: RE: Not able to pass multiple arguments to javac The fault message you see is actually from javac itself. You're trying to add options that are not supported by javac. All javac options are supported by the mojo, it simply passes them to javac. Why would you want to add options to javac which are not supported by javac? With regards, Nick Stolwijk -Original Message- From: [EMAIL PROTECTED] on behalf of Sahoo Sent: Mon 11/26/2007 5:12 PM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Yes, I knew that approach, but the options I actually want to pass are not supported by the mojo. nowarn and verbose were just used as examples; I want to pass -proc:none and -implicit. They are not supported by javac. There are many such options which are not supported by the mojo. I thought compilerArgument is the way to use them. But, it is *not* working. Thanks, Sahoo Jeff Jensen wrote: Try this approach: configuration forktrue/fork maxmem1024m/maxmem showDeprecationtrue/showDeprecation showWarningstrue/showWarnings etc... /configuration To know element names to use, use the Name found in the Optional Parameters section of this page: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sahoo Sent: Monday, November 26, 2007 8:25 AM To: Maven Users List Subject: Re: Not able to pass multiple arguments to javac Ignore my earlier email. The suggestion actually does *not* work. When I run with -X option, it shows only the last compilerArgument. See the following output: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' -- [DEBUG] (f) basedir = /tmp/my-app [DEBUG] (f) buildDirectory = /tmp/my-app/target [DEBUG] (f) classpathElements = [/tmp/my-app/target/classes] [DEBUG] (f) compileSourceRoots = [/tmp/my-app/src/main/java] [DEBUG] (f) compilerArgument = -verbose [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = true [DEBUG] (f) failOnError = true [DEBUG] (f) fork = false [DEBUG] (f) optimize = false [DEBUG] (f) outputDirectory = /tmp/my-app/target/classes [DEBUG] (f)
RE: [dependency plugin] Used undeclared dependencies
AFAIK, this shows the dependencies from which your code is using classes, but which are not declared in your pom file, but by another dependency. ie. You - Project A - Project B And one of your classes imports something from Project B. This will compile. Project A releases a new versions, which is not dependend anymore on Project B. You update the version of Project A to the new version, et voila, your code is not compiling anymore. It is better to declare all your dependencies your project uses, even if there are already included in one of your dependencies. Hth, Nick Stolwijk -Original Message- From: Wim Deblauwe [mailto:[EMAIL PROTECTED] Sent: Wed 11/21/2007 4:32 PM To: Maven Users List Subject: [dependency plugin] Used undeclared dependencies Why does the dependency plugin gives Used undeclared dependencies? What is the reason or how does maven know this? I looked at the docs ( http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html), but it did not give much info on why you get this and what you can do about it. This is the output: [INFO] [dependency:analyze] [INFO] Used declared dependencies: [INFO]net.java.dev.glazedlists:glazedlists_java15:jar:1.7.0:compile [INFO]net.java.dev.timingframework:timingframework:jar:1.0:compile [INFO]com.jidesoft:jide-oss:jar:2.1.3.04:compile [INFO]log4j:log4j:jar:1.2.14:compile [INFO]org.swinglabs:swing-worker:jar:1.1:compile [INFO]com.jgoodies:looks:jar:2.1.2:compile [INFO]com.thoughtworks.xstream:xstream:jar:1.2.1:compile [INFO]org.swinglabs:swingx:jar:0.9:compile [INFO]org.testng:testng:jar:jdk15:5.1:test [INFO] Used undeclared dependencies: [WARNING]com.jhlabs:filters:jar:2.0.235:compile [INFO] Unused declared dependencies: [INFO]None [WARNING] Potential problems discovered. [INFO] Found Resolved Dependency / DependencyManagement mismatches: [INFO]Nothing in DepMgt. Additionally, the docs show a target called dependency:tree but this does not seem to work. regards, Wim -- Vigilog - an open source log file viewer: http://vigilog.sourceforge.net Blog: http://www.jroller.com/page/Fester