Accessing MavenSession from a plugin component
Hello Maven users, Can anyone please point me to some docs or example on how one can access a maven session from a plugin plexus.component? Regards, Stevo.
How to create a maven local repository
Hi, In preceeding Maven version, there was a way to build and initiate a local repository via the CLI : %MAVEN_HOME%\bin\install_repo.bat %HOME%\.maven\repository And this command created a repository and loaded some core .jar By now, when I unzip maven2, under \bin I don't find any more a script to build a local repository. Looking at the Maven doc, I found I have to use Nexus ?!? Why not, but it's a so different way to build a local repository ! And, on Nexus site, I found either to buy Nexus pro !!! or use m2eclipse ; why should I use eclipe ?? Well, I'm lost. Isn't it a simple way as before to build and initiate de local repository ? Thanks for help
Re: How to create a maven local repository
Hi, Just run Maven on a project and everything will solve itself! Or is there a specific reason you only want this initial repository? Roland Hi, In preceeding Maven version, there was a way to build and initiate a local repository via the CLI : %MAVEN_HOME%\bin\install_repo.bat %HOME%\.maven\repository And this command created a repository and loaded some core .jar By now, when I unzip maven2, under \bin I don't find any more a script to build a local repository. Looking at the Maven doc, I found I have to use Nexus ?!? Why not, but it's a so different way to build a local repository ! And, on Nexus site, I found either to buy Nexus pro !!! or use m2eclipse ; why should I use eclipe ?? Well, I'm lost. Isn't it a simple way as before to build and initiate de local repository ? Thanks for help - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins and their versions
Indeed it does! Works like a charm! Only one problem now: it reports on several SNAPSHOT plugins, which I actually DO want! I know it's not good practice to use snapshots, but let me explain my case here: I have a multi-module build, which is ALWAYS released in a single go. One of my modules is a plug-in that I actually need in the build, and I always want to use it in the same version as the whole project is in. Now, during development, this would lead to a snapshot version, which at time of release would make it a release version (I use the property 'project.version' as a reference for the plug-in. Now, how can I explain to the enforcer-plugin that this single plug-in indeed is allowed to be a snapshot? I'm hoping for a solution that doesn't mean implementing my own enforcer-rule... But if that what it takes, I'll do that. Just wanted to check if this is already possible, because I think this is not a very unusual use-case... Roland Understood, but I'm not interested in the updates, I'm trying to track down the plugins that have no version configured. The enforcer plugin can help you find plugins with missing versions, too. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins and their versions
Hi Roland, On Thu, Dec 31, 2009 at 7:47 AM, Roland Asmann roland.asm...@adesso.at wrote: Now, how can I explain to the enforcer-plugin that this single plug-in indeed is allowed to be a snapshot?. Roland Even the most casual examination of the documentation reveals the unCheckedPluginsList - A comma separated list of plugins to skip version checking. Ie allow no version, or snapshots, etc. The plugins should be specified in the form: group:artifactId configuration option. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins and their versions
Thanks Jesse. It appears there's some old documentation floating around on the site, because I hadn't seen that option before! For the maintainers of the plug-in site: From the usage-page you can get to old (2007!) descriptions of the plug-in which should probably be updated/removed. Roland Hi Roland, On Thu, Dec 31, 2009 at 7:47 AM, Roland Asmann roland.asm...@adesso.at wrote: Now, how can I explain to the enforcer-plugin that this single plug-in indeed is allowed to be a snapshot?. Roland Even the most casual examination of the documentation reveals the unCheckedPluginsList - A comma separated list of plugins to skip version checking. Ie allow no version, or snapshots, etc. The plugins should be specified in the form: group:artifactId configuration option. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins and their versions
Also, the parameter 'unCheckedPluginsList' doesn't have a setter, so can't be used! Using the previous parameter (unCheckedPlugins) gives a deprecation-warning, but at least it still works. Roland Thanks Jesse. It appears there's some old documentation floating around on the site, because I hadn't seen that option before! For the maintainers of the plug-in site: From the usage-page you can get to old (2007!) descriptions of the plug-in which should probably be updated/removed. Roland Hi Roland, On Thu, Dec 31, 2009 at 7:47 AM, Roland Asmann roland.asm...@adesso.at wrote: Now, how can I explain to the enforcer-plugin that this single plug-in indeed is allowed to be a snapshot?. Roland Even the most casual examination of the documentation reveals the unCheckedPluginsList - A comma separated list of plugins to skip version checking. Ie allow no version, or snapshots, etc. The plugins should be specified in the form: group:artifactId configuration option. -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins and their versions
2009/12/31 Roland Asmann roland.asm...@adesso.at: Indeed it does! Works like a charm! Only one problem now: it reports on several SNAPSHOT plugins, which I actually DO want! I know it's not good practice to use snapshots, but let me explain my case here: I have a multi-module build, which is ALWAYS released in a single go. One of my modules is a plug-in that I actually need in the build, and I always want to use it in the same version as the whole project is in. That is not allowed. All the plugins must be resolved before the build starts. When you start a release, the plugin will not have been built, so will not be available prior to setting up the build plan. in m3 IIRC your build will refuse to work full stop. You must release plugins separately from builds that consume them -Stephen Now, during development, this would lead to a snapshot version, which at time of release would make it a release version (I use the property 'project.version' as a reference for the plug-in. Now, how can I explain to the enforcer-plugin that this single plug-in indeed is allowed to be a snapshot? I'm hoping for a solution that doesn't mean implementing my own enforcer-rule... But if that what it takes, I'll do that. Just wanted to check if this is already possible, because I think this is not a very unusual use-case... Roland Understood, but I'm not interested in the updates, I'm trying to track down the plugins that have no version configured. The enforcer plugin can help you find plugins with missing versions, too. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins and their versions
2009/12/31 Roland Asmann roland.asm...@adesso.at: Indeed it does! Works like a charm! Only one problem now: it reports on several SNAPSHOT plugins, which I actually DO want! I know it's not good practice to use snapshots, but let me explain my case here: I have a multi-module build, which is ALWAYS released in a single go. One of my modules is a plug-in that I actually need in the build, and I always want to use it in the same version as the whole project is in. That is not allowed. All the plugins must be resolved before the build starts. When you start a release, the plugin will not have been built, so will not be available prior to setting up the build plan. in m3 IIRC your build will refuse to work full stop. You must release plugins separately from builds that consume them -Stephen That sucks... But in m2.0.10 it still works, so I'll keep it in for now. Roland Now, during development, this would lead to a snapshot version, which at time of release would make it a release version (I use the property 'project.version' as a reference for the plug-in. Now, how can I explain to the enforcer-plugin that this single plug-in indeed is allowed to be a snapshot? I'm hoping for a solution that doesn't mean implementing my own enforcer-rule... But if that what it takes, I'll do that. Just wanted to check if this is already possible, because I think this is not a very unusual use-case... Roland Understood, but I'm not interested in the updates, I'm trying to track down the plugins that have no version configured. The enforcer plugin can help you find plugins with missing versions, too. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: How to create a maven local repository
Hi Roland, Thanks for your advice. You are certainly right ; to be true, I should say you are surely right ! :) Of course, I have no reason to initiate a local repository, but, why was this necessary in the previous version of Maven ?? And I've not found any advertisement about this in release notes. Alain -Message d'origine- De : Roland Asmann [mailto:roland.asm...@adesso.at] Envoyé : jeudi 31 décembre 2009 1:42 Juliane À : Maven Users List Objet : Re: How to create a maven local repository Hi, Just run Maven on a project and everything will solve itself! Or is there a specific reason you only want this initial repository? Roland Hi, In preceeding Maven version, there was a way to build and initiate a local repository via the CLI : %MAVEN_HOME%\bin\install_repo.bat %HOME%\.maven\repository And this command created a repository and loaded some core .jar By now, when I unzip maven2, under \bin I don't find any more a script to build a local repository. Looking at the Maven doc, I found I have to use Nexus ?!? Why not, but it's a so different way to build a local repository ! And, on Nexus site, I found either to buy Nexus pro !!! or use m2eclipse ; why should I use eclipe ?? Well, I'm lost. Isn't it a simple way as before to build and initiate de local repository ? Thanks for help - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to create a maven local repository
On 12/31/09 10:15 AM, Mezigue wrote: Hi Roland, Thanks for your advice. You are certainly right ; to be true, I should say you are surely right ! :) Of course, I have no reason to initiate a local repository, but, why was this necessary in the previous version of Maven ?? And I've not found any advertisement about this in release notes. Just a word of advice - don't think of Maven 2 and Maven 1 as being the same piece of software - they share some concepts, but ultimately are very different. Maven 2 release notes are unlikely to reference changes from Maven 1. Justin - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to create a maven local repository
On 12/31/09 10:15 AM, Mezigue wrote: Hi Roland, Thanks for your advice. You are certainly right ; to be true, I should say you are surely right ! :) Of course, I have no reason to initiate a local repository, but, why was this necessary in the previous version of Maven ?? And I've not found any advertisement about this in release notes. Just a word of advice - don't think of Maven 2 and Maven 1 as being the same piece of software - they share some concepts, but ultimately are very different. Maven 2 release notes are unlikely to reference changes from Maven 1. Justin And exactly THAT was probably the reason you needed to do that before: because you were using Maven 1. :-) Roland - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Assembly Plugin: Include empty directories?
Hi, I'm trying to create an assembly that contains an empty directory (log) and have been unable to do so. I've tried a few things, including the workarounds and suggestions at http://jira.codehaus.org/browse/MASSEMBLY-108but have not been able to get the empty directory to show up in my zip assembly. Here's the assembly descriptor I'm using: assembly idbundle/id includeBaseDirectoryfalse/includeBaseDirectory formats formatzip/format /formats fileSets fileSet directorysrc/main/resources/env//directory outputDirectory//outputDirectory useDefaultExcludestrue/useDefaultExcludes fileMode0644/fileMode directoryMode0755/directoryMode /fileSet /fileSets /assembly and the src/main/resource/env directory contains the following: bin conf doc log All of those contain files except log which is an empty directory. Any suggestion on how to do this would be greatly appreciated. I'm using Maven 2.2.1 and maven-assembly-plugin 2.2-beta-5. Thanks in advance, Jeff
Re: Assembly Plugin: Include empty directories?
All of those contain files except log which is an empty directory. Any suggestion on how to do this would be greatly appreciated. Can you not add a file ignore.me to the log directory which will make it work just like any other directory which has files? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Need to execute class before unit test
Happy New Year to everybody! Do you know if this problem can be resolved in Maven? I need to execute some java code before my unit tests. Since I am using TestNG, it could be resolved using BeforeSuite tag but I would prefer to configure Mavenl. So far I was not able to understand how to implement this into surefire plugin or if it is possible at all. Also I would like to use mutli-module. Thanks, Vladimir Kravtsov TeleCommunication Systems 949-453-3491 (desk) 425-443-4502 (cell)
Re: Assembly Plugin: Include empty directories?
Wayne, Thanks for the response... turns out that the plugin was indeed including my empty directory and I failed to notice because of how I was viewing the zip file. Thanks again, Jeff On Thu, Dec 31, 2009 at 12:13 PM, Wayne Fay wayne...@gmail.com wrote: All of those contain files except log which is an empty directory. Any suggestion on how to do this would be greatly appreciated. Can you not add a file ignore.me to the log directory which will make it work just like any other directory which has files? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Usage of maven-dependency-plugin in a multi-modul ebuild
Hi, I'd like to use the maven-dependency-plugin's copy-dependencies goal to copy all project dependencies of a complete multi-module build to a single output directory. Is this actually achievable ? So far I have only come across examples for simple projects where things seem to be straight-forward. But in my case (castor.codehaus.org), we have got plenty of modules, and we'd like to finish a few remaining tasks of a long-running migration from Ant to Maven. Right now, we are using Maven 100% for builds, release management of code artifacts, etc. But as it stands right now, for building our HTML docs, we still rely on an Ant build file that assumes all our dependencies to be available at $PROJECT_ROOT/lib. And I'd really like to automate an otherwise manual process as much as I can (whilst we are still relying on Ant to be used in this context). I was thinking about using dependencies:copy-dependencies to achieve this from within Maven, but somehow I seem to be stuck, as explained above. Any help ? Regards Werner - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Usage of maven-dependency-plugin in a multi-modul ebuild
I assume all you want to dump all project dependencies and associcate transitive deps? create a project which depends on all modules in your build, inthere execute dependency:copy-dependency to to your desired location On Thu, Dec 31, 2009 at 12:22 PM, Werner Guttmann werner.guttm...@gmx.net wrote: Hi, I'd like to use the maven-dependency-plugin's copy-dependencies goal to copy all project dependencies of a complete multi-module build to a single output directory. Is this actually achievable ? So far I have only come across examples for simple projects where things seem to be straight-forward. But in my case (castor.codehaus.org), we have got plenty of modules, and we'd like to finish a few remaining tasks of a long-running migration from Ant to Maven. Right now, we are using Maven 100% for builds, release management of code artifacts, etc. But as it stands right now, for building our HTML docs, we still rely on an Ant build file that assumes all our dependencies to be available at $PROJECT_ROOT/lib. And I'd really like to automate an otherwise manual process as much as I can (whilst we are still relying on Ant to be used in this context). I was thinking about using dependencies:copy-dependencies to achieve this from within Maven, but somehow I seem to be stuck, as explained above. Any help ? Regards Werner - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Need to execute class before unit test
setup your pom to run a exec-maven-plugin's execution before test phase -D On Thu, Dec 31, 2009 at 11:31 AM, Vladimir Kravtsov (NIM Contractor) vkravt...@networksinmotion.com wrote: Happy New Year to everybody! Do you know if this problem can be resolved in Maven? I need to execute some java code before my unit tests. Since I am using TestNG, it could be resolved using BeforeSuite tag but I would prefer to configure Mavenl. So far I was not able to understand how to implement this into surefire plugin or if it is possible at all. Also I would like to use mutli-module. Thanks, Vladimir Kravtsov TeleCommunication Systems 949-453-3491 (desk) 425-443-4502 (cell) - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Need to execute class before unit test
Thanks! Could you hint me a little should it be done within surefire plugin or somewhere else? Vladimir Kravtsov 949-453-3491 (desk) 425-443-4502 (cell) -Original Message- From: Dan Tran [mailto:dant...@gmail.com] Sent: Thursday, December 31, 2009 12:50 PM To: Maven Users List Subject: Re: Need to execute class before unit test setup your pom to run a exec-maven-plugin's execution before test phase -D On Thu, Dec 31, 2009 at 11:31 AM, Vladimir Kravtsov (NIM Contractor) vkravt...@networksinmotion.com wrote: Happy New Year to everybody! Do you know if this problem can be resolved in Maven? I need to execute some java code before my unit tests. Since I am using TestNG, it could be resolved using BeforeSuite tag but I would prefer to configure Mavenl. So far I was not able to understand how to implement this into surefire plugin or if it is possible at all. Also I would like to use mutli-module. Thanks, Vladimir Kravtsov TeleCommunication Systems 949-453-3491 (desk) 425-443-4502 (cell) - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Need to execute class before unit test
should not in surefire, please exec-maven-plugin usage for detail -Dan On Thu, Dec 31, 2009 at 12:52 PM, Vladimir Kravtsov (NIM Contractor) vkravt...@networksinmotion.com wrote: Thanks! Could you hint me a little should it be done within surefire plugin or somewhere else? Vladimir Kravtsov 949-453-3491 (desk) 425-443-4502 (cell) -Original Message- From: Dan Tran [mailto:dant...@gmail.com] Sent: Thursday, December 31, 2009 12:50 PM To: Maven Users List Subject: Re: Need to execute class before unit test setup your pom to run a exec-maven-plugin's execution before test phase -D On Thu, Dec 31, 2009 at 11:31 AM, Vladimir Kravtsov (NIM Contractor) vkravt...@networksinmotion.com wrote: Happy New Year to everybody! Do you know if this problem can be resolved in Maven? I need to execute some java code before my unit tests. Since I am using TestNG, it could be resolved using BeforeSuite tag but I would prefer to configure Mavenl. So far I was not able to understand how to implement this into surefire plugin or if it is possible at all. Also I would like to use mutli-module. Thanks, Vladimir Kravtsov TeleCommunication Systems 949-453-3491 (desk) 425-443-4502 (cell) - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Accessing MavenSession from a plugin component
Hi, Maybe : /** * The Maven Session Object * * @parameter expression=${session} * @required * @readonly */ protected MavenSession session; ? HTH, -- Olivier 2009/12/31 Stevo Slavić ssla...@gmail.com: Hello Maven users, Can anyone please point me to some docs or example on how one can access a maven session from a plugin plexus.component? Regards, Stevo. -- Olivier - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven changelog plugin with git
Hi, I would like to use the git provider with maven-changelog-plugin, but I need to wait for the fix committed in version 2.2 for the issue described here: http://jira.codehaus.org/browse/MCHANGELOG-92 When will maven-changelog-plugin version 2.2 be in the official Maven plugin repository? Is there some other way for me to get the development branch of the plugin in my POM? -- View this message in context: http://old.nabble.com/Maven-changelog-plugin-with-git-tp26983558p26983558.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Aggregating Javadocs during site generation
I am building the site of a multi-module project. I want all the javadocs of the child modules to be aggregated for the parent's site, but want the individual javadocs absent in the site of the child modules. What is the configuration to do this? Paul - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Settings.xml : Maven repositories releases, updatePolicy = utility
It should be ignored, it stems from the fact that both fields use the same modello object internally. On Tue, Dec 29, 2009 at 5:18 AM, fabrice.mercier1 beufm...@yahoo.fr wrote: hi I am wonder me the utility of the updatePolicy rule for releases repositories. I set i to always for snapshots repository but in my opinion updatePolicy for releases repo is not needed. Except if Maven works like nexus with a request cache ? Fabrice - http://old.nabble.com/file/u1297858/ft.gif Architect Almerys, activité santé d'Orange Business Services, TOULOUSE http://www.orange-business.com http://www.orange-business.com -- View this message in context: http://old.nabble.com/Settings.xml-%3A-Maven-repositories-releases%2C-updatePolicy-%3D%3E-utility-tp26952952p26952952.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Settings.xml : Maven repositories releases, updatePolicy = utility
The update policy for releases isn't use to define when metadata are updated when you use a range for example ? On Friday, January 1, 2010, Brian Fox bri...@infinity.nu wrote: It should be ignored, it stems from the fact that both fields use the same modello object internally. On Tue, Dec 29, 2009 at 5:18 AM, fabrice.mercier1 beufm...@yahoo.fr wrote: hi I am wonder me the utility of the updatePolicy rule for releases repositories. I set i to always for snapshots repository but in my opinion updatePolicy for releases repo is not needed. Except if Maven works like nexus with a request cache ? Fabrice - http://old.nabble.com/file/u1297858/ft.gif Architect Almerys, activité santé d'Orange Business Services, TOULOUSE http://www.orange-business.com http://www.orange-business.com -- View this message in context: http://old.nabble.com/Settings.xml-%3A-Maven-repositories-releases%2C-updatePolicy-%3D%3E-utility-tp26952952p26952952.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Arnaud Héritier Software Factory Manager eXo platform - http://www.exoplatform.com --- http://www.aheritier.net - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org