Re: Possible bug in Subversion SCM or release plugin
On 19 October 2010 23:43, Phillip Hellewell ssh...@gmail.com wrote: Thanks Stephen. See comments below... On Tue, Oct 19, 2010 at 4:16 PM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: I suspect that this is because you are not using remoteTagging=true for your release, so it is trying to create the tag from the working copy. Ok, but it still shouldn't use the path from the working copy URL with the protocol from the pom scm connection. the pom is not really designed to handle more than two valid scm connection urls (1 is the at least read-only url and the other dev connection is at least read-write) Unfortunately, half our developers are using http:// and the other half are using svn+ssh://, and I don't see that changing. when making a release you really should be using the connection specified in the devConnection part of the scm section. Sounds kinda like an excuse :) How do you handle this scenario in general? I'm sure many companies out there allow more than one way to access SVN. So you have to make a rule that only developers who check out code with a specific protocol can do releases? for svn, setting remote tagging to true should work around your issue somewhat. Yep, sure enough it that did the trick. Thanks for that workaround! But anyway, should I still submit a bug? I don't know if it is the release plugin or SCM plugin at fault though... Also, what about my idea that the release plugin ought to just use the working copy URL when an scm connection is not defined? Seems like that would really simplify things, and I don't see any downsides. the world does not revolve around svn...we'd have to check _LL_ providers Phillip - 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: scm connection in parent pom
Hi Phillip, Phillip Hellewell wrote: On Tue, Oct 19, 2010 at 11:47 AM, Phillip Hellewell ssh...@gmail.com wrote: Also, is there a common way to let each developer decide which protocol they want to use, e.g., svn+ssh:// instead of http://. Of course, the big problem with svn+ssh:// is that you have to have the username in the URL too. Is there a varaible, e.g., ${username}, that I can shove in there? ${user.name} However, the release plugin will rewrite the SCM URLs during release and reolve all properties with their real values - unfortunately. Otherwise you could also use a property for the protocol defined in the settings of each developer. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
Hi Phillip, Does it make sense and will it work to define the scm connection in a parent pom if all my projects follow the same layout in SVN? i.e., connectionscm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/connection in theory, the above makes sense, but in practice you will encounter a problem: if scm/connection is inherited by a child POM, Maven automatically appends the equivalent of /${project.artifactId} to your SCM URL. Thus, you end up with scm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/${project.artifactId};, which is in all likelihood not what you intended. (You are aiming for a flat repository layout here, which parent and child on the same level, right?) Unfortunately, Maven is extremely prejudiced in favour of a hierarchical layout. But if there are any good workarounds other than copy-and-pasting scm/connection in all the child POMs I would love to hear about them. I hope this helps. Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
On 20 October 2010 08:38, Andreas Sewe s...@st.informatik.tu-darmstadt.de wrote: Hi Phillip, Does it make sense and will it work to define the scm connection in a parent pom if all my projects follow the same layout in SVN? i.e., connectionscm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/connection in theory, the above makes sense, but in practice you will encounter a problem: if scm/connection is inherited by a child POM, Maven automatically appends the equivalent of /${project.artifactId} to your SCM URL. IIRC the appending is controlled by the presence of a / at the end of the URI if the URI ends with a slash then it will not append the module name in children if the URI does not end with a slash then it will append the module name in children of course I could be mistaken and this might only apply to /project/url but I thought it also applied to /project/scm/* Another thing is that the use of ${artifactId} is deprecated and you should reference those properties with the project. prefix, e.g. ${project.artifactId} -Stephen Thus, you end up with scm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/${project.artifactId};, which is in all likelihood not what you intended. (You are aiming for a flat repository layout here, which parent and child on the same level, right?) Unfortunately, Maven is extremely prejudiced in favour of a hierarchical layout. But if there are any good workarounds other than copy-and-pasting scm/connection in all the child POMs I would love to hear about them. I hope this helps. Andreas - 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: scm connection in parent pom
On 20 October 2010 08:51, Stephen Connolly stephen.alan.conno...@gmail.com wrote: On 20 October 2010 08:38, Andreas Sewe s...@st.informatik.tu-darmstadt.de wrote: Hi Phillip, Does it make sense and will it work to define the scm connection in a parent pom if all my projects follow the same layout in SVN? i.e., connectionscm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/connection in theory, the above makes sense, but in practice you will encounter a problem: if scm/connection is inherited by a child POM, Maven automatically appends the equivalent of /${project.artifactId} to your SCM URL. IIRC the appending is controlled by the presence of a / at the end of the URI if the URI ends with a slash then it will not append the module name in children if the URI does not end with a slash then it will append the module name in children of course I could be mistaken and this might only apply to /project/url but I thought it also applied to /project/scm/* Another thing is that the use of ${artifactId} is deprecated and you should reference those properties with the project. prefix, e.g. ${project.artifactId} -Stephen Finally, I am not condoning the use of properties in /project/url or /project/scm/* I used to do this and gave up because it can have unforseen consequences... basically a whole slew of projects went bad because of this and as a result I just went for including the details correctly. I have a bash script to update the details on a branch, etc... I am looking into the possibility of adding this into the maven-scm-plugin, e.g. mvn scm:infer -Dprovider=svn of course given that this would involve rewriting the pom.xml I'll have to decide how to handle that... versions-maven-plugin is currently the best plugin for rewriting the pom.xml [i.e. it does not mess up any human formatting] but scm details may not be obviously relevant to v-m-p and I don't really want v-m-p ending up as a dumping ground for all the pom rewriting mojos... I'll probably end up refactoring the rewriting into a separate artifact... might play nicer with polyglot anyway... of course i'd probably need to finish xevpp.codehaus.org first ;-) -Stephen Thus, you end up with scm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/${project.artifactId};, which is in all likelihood not what you intended. (You are aiming for a flat repository layout here, which parent and child on the same level, right?) Unfortunately, Maven is extremely prejudiced in favour of a hierarchical layout. But if there are any good workarounds other than copy-and-pasting scm/connection in all the child POMs I would love to hear about them. I hope this helps. Andreas - 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: Strange behaviour on resource plugin
Hi! fond it by myself: The -X helps a lot in between. The properties were specified in a profile which was not active when running from the command line. Sorry for bothering you! On 10/19/2010 04:09 PM, Søren Krum wrote: Hi! I have detected a strange bahaviour of the maven resource plugin, and i am wondering if someone can give me a hint, what is going wrong here. One of my maven projects uses the resource plugin to copy some configuration files with some placeholders in them. When running maven from eclipse, the placeholders are nicely replaced with some values from the pom file, but when starting maven from the console, this replacement does not take place. My eclipse uses a maven 3.0 snapshot, while i tried maven 2.2.1 and 3.0 from the command line, both not eager to do the replacement. To make this behaviour even stranger, i detected this failing replacement after i updated my os from ubuntu 8/04 to 10/04, but i have no idea if that is really connected. I did not touch the maven installations at all, so it is a bit confusing Any idea is highly welcome :-) -- Med vennlig hilsen Søren D. Krum Systemutvikler/system developer UNINETT FAS + 47 73557859 There are 10 different kind of people in the world, those who understand binary and those who don't - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Surefire-Report and Cobertura
Hello, I've got a question concerning the surefire-report-plugin and the cobertura-plugin. Is it possible to find out which classes have been covered by which testclasses? From the surefire-report-plugin I get the information about which testclass throws a failure and from the cobertura-plugin I get the line-rate and information about the class itself. I kind of need to know which testclass referres to which class. Is it by any chance possible? thanks in advance -kidow- -- View this message in context: http://maven.40175.n5.nabble.com/Surefire-Report-and-Cobertura-tp3228229p3228229.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
maven3 profile activation by absense of property
I am using the following profile profiles profile iddocumentation/id activation property name!skipDocs/name /property /activation modules moduledocumentation/module /modules /profile /profiles However, since the switch to maven3 this does not worka anymore and mvn -DskipDocs install will still include the documentation module. Do I have to do something different to make this work in maven3? Thanks for the help, Joachim - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven3 profile activation by absense of property
Could be a regression then. Create a test project and file a ticket. /Anders On Wed, Oct 20, 2010 at 11:32, Joachim Van der Auwera joac...@triathlon98.com wrote: I am using the following profile profiles profile iddocumentation/id activation property name!skipDocs/name /property /activation modules moduledocumentation/module /modules /profile /profiles However, since the switch to maven3 this does not worka anymore and mvn -DskipDocs install will still include the documentation module. Do I have to do something different to make this work in maven3? Thanks for the help, Joachim - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven3 profile activation by absense of property
On Wed, Oct 20, 2010 at 5:32 AM, Joachim Van der Auwera joac...@triathlon98.com wrote: However, since the switch to maven3 this does not worka anymore and mvn -DskipDocs install will still include the documentation module. Do I have to do something different to make this work in maven3? What happens if you do -DskipDocs=abc ? That will test the difference between 'present but empty' and 'present (with a value)'. That may give you a workaround, and if it worked as 'present but empty' in Maven 2, a JIRA issue with a sample project would be the next step (assuming this isn't called out in the release/compatibility notes, I haven't checked.) -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: maven is a swamp
IDEs from my experience are tools to create (workspace) environments and to create xml scripts ant/maven to compile, package and deploy wars and ears the useful life of an IDE passes when the webapp is promoted to production and the op implements the goals in the pom.xml to deploy to appserver Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 19 Oct 2010 15:03:28 -0400 Subject: Re: maven is a swamp From: rick.ma...@mtvn.com To: users@maven.apache.org I think that's the main point. Nobody thinks XML is wonderful to read or write, but it's easily read by any tools, languages and by humans. XML is a standard, like it or not. It's a glue. Glue is good. Glue lets the logic be language neutral and portable. On 10/15/10 6:40 PM, Ron Wheeler rwhee...@artifact-software.com wrote: Who cares what language Maven uses? There are IDEs with editors that eliminate the need to look at XML. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Additional dependencies in assembly
Hello Apache Maven users, It seems it's not possible to introduce additional dependencies through assembly descriptor, one can only filter (include/exclude) dependencies defined in module pom. Can someone please verify this? Btw, current assembly plugin site documents that assembly descriptor schema v1.1.2 should be used for assembly plugin 2.2-beta-6 and higher (see herehttp://maven.apache.org/plugins/maven-assembly-plugin/#Assembly_Descriptor_Schemas_XSD), but there is no such assembly-1.1.2.xsdhttp://maven.apache.org/xsd/assembly-1.1.2.xsdfile. Link for that file on assembly plugin site points to v1.1.1 XSD. Maybe assembly-1.1.2.xsd exists in sources but it didn't get published with 2.2-beta-6 release. Regards, Stevo.
Re: Additional dependencies in assembly
2010/10/20 Stevo Slavić ssla...@gmail.com: It seems it's not possible to introduce additional dependencies through assembly descriptor, one can only filter (include/exclude) dependencies defined in module pom. Can someone please verify this? Yes it's true. This is one of the reasons because so many people suggest to create a separate module to create assemblies. Antonio - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
Andreas Sewe wrote: But if there are any good workarounds other than copy-and-pasting scm/connection in all the child POMs I would love to hear about them. A lot of people (30 at last count, including myself) would be interested to see a solution for this. Many related bugs funnel to http://jira.codehaus.org/browse/MNG-3244 -- View this message in context: http://maven.40175.n5.nabble.com/scm-connection-in-parent-pom-tp3224641p3228537.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
Hi Stephen, IIRC the appending is controlled by the presence of a / at the end of the URI if the URI ends with a slash then it will not append the module name in children if the URI does not end with a slash then it will append the module name in children of course I could be mistaken and this might only apply to /project/url but I thought it also applied to /project/scm/* you are right. This is indeed the case -- at least with Maven 3.0 (just tested it), although I do recall that it didn't always work like this (see http://jira.codehaus.org/browse/MNG-3244, which Luke pointed to.) That being said, can you comment on what went wrong in your setup? Would be interesting to know why you are so against using properties in /project/scm/*. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
On 20 October 2010 14:29, Andreas Sewe s...@st.informatik.tu-darmstadt.de wrote: Hi Stephen, IIRC the appending is controlled by the presence of a / at the end of the URI if the URI ends with a slash then it will not append the module name in children if the URI does not end with a slash then it will append the module name in children of course I could be mistaken and this might only apply to /project/url but I thought it also applied to /project/scm/* you are right. This is indeed the case -- at least with Maven 3.0 (just tested it), although I do recall that it didn't always work like this (see http://jira.codehaus.org/browse/MNG-3244, which Luke pointed to.) That being said, can you comment on what went wrong in your setup? Would be interesting to know why you are so against using properties in /project/scm/*. I gave up and moved on... I forget the why... I only remember the conculsion ;-) -Stephen Best wishes, Andreas - 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: maven is a swamp
On 20/10/2010 7:17 AM, Martin Gainty wrote: IDEs from my experience are tools to create (workspace) environments and to create xml scriptsant/maven to compile, package and deploy wars and ears the useful life of an IDE passes when the webapp is promoted to production and the op implements the goals in the pom.xml to deploy to appserver Get the ANT out of your workflow if you want a happy life. Pick one or the other. Both are good tools. ANT is a great tool on its own but when it comes in contact with Maven workflow, the combination can produce toxic or explosive byproducts. :-) If you need to edit a pom that late in your cycle and you do not want to edit XML, then you need to provide a GUI editor. I am not sure why op is changing a POM file at that point in the cycle. Sounds like a problem in the workflow or POM structure. Could they not just invoke a Maven deploy with their settings.xml file or Maven arguments set up to do the deployment with the unedited POM? Perhaps I am missing something but I am not comfortable with op modifying a tested and approved application - not the Java, not the scripts and certainly not the POM. Ron Martin Gainty __ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 19 Oct 2010 15:03:28 -0400 Subject: Re: maven is a swamp From: rick.ma...@mtvn.com To: users@maven.apache.org I think that's the main point. Nobody thinks XML is wonderful to read or write, but it's easily read by any tools, languages and by humans. XML is a standard, like it or not. It's a glue. Glue is good. Glue lets the logic be language neutral and portable. On 10/15/10 6:40 PM, Ron Wheelerrwhee...@artifact-software.com wrote: Who cares what language Maven uses? There are IDEs with editors that eliminate the need to look at XML. - 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: maven is a swamp
On 20 Oct 2010, at 1:17 PM, Martin Gainty wrote: IDEs from my experience are tools to create (workspace) environments and to create xml scripts ant/maven to compile, package and deploy wars and ears the useful life of an IDE passes when the webapp is promoted to production and the op implements the goals in the pom.xml to deploy to appserver What you're describing sounds monolithic. Any great big monolithic application is going to be painful to manage, and maven won't be able to help you if you try have one pom file to rule them all. Break your projects into bits, and then assemble the bits at the end in a separate project. Then in a separate project again, configure the magic install behaviour that you want. When your project is made of many bits, you want to be able to repeat your build - maven steps in and ensures that everything is pinned to the correct dependencies correctly. Maven only does this however if you've asked it to. Regards, Graham -- - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Now seriously: how can I manage dependencies of own projects with maven
On Wed, Oct 20, 2010 at 8:12 AM, Michael McCallum mich...@redengine.co.nz wrote: You could try something like... mvn -s special-settings-file.xml verify install haha. Hudson has a horrible bug involving -s that the maintainers keep claiming to fix and failing to fix. Perhaps some day. set that up for the jobs in hudson that should share snapshots... and for the others mvn verify So you end up with two sets of jobs * those the build the head of an artifact against the heads of the others * those that build the head of an artifact against the latest releases of the others (assuming you use ranges of course) cheers Michael On Wednesday 20 October 2010 00:25:33 Benson Margulies wrote: If you are using 'downstream', how do you avoid the need to publish to at least a common local repo? I've been facing the following variation on this: I do not want to publish snapshots to nexus, since they mess up people who download stale ones into their development process. I do want to split a hudson build into multiple jobs with dependencies. Short of an extra repo in nexus that is used only for intra-hudson snapshots, I haven't thought of anything. Have you? - 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: maven3 profile activation by absense of property
On 10/20/2010 12:35 PM, Wendy Smoak wrote: On Wed, Oct 20, 2010 at 5:32 AM, Joachim Van der Auwera joac...@triathlon98.com wrote: However, since the switch to maven3 this does not worka anymore and mvn -DskipDocs install will still include the documentation module. Do I have to do something different to make this work in maven3? What happens if you do -DskipDocs=abc ? That will test the difference between 'present but empty' and 'present (with a value)'. That doesn't seem to make a difference. I haven't seen this mentioned in the compatibility notes, so I guess it is a bug (though it admittedly is a little documented feature). Thanks for the help, Joachim - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
Andreas Sewe wrote: ... Would be interesting to know why you are so against using properties in /project/scm/*. Based on what I've experienced, described earlier by Jörg - Jörg Schaible wrote: ... the release plugin will rewrite the SCM URLs during release and reolve all properties with their real values - unfortunately. (which I think is http://jira.codehaus.org/browse/MRELEASE-412), there is no gain in using properties since the release plugin currently just resolves/replaces in-place anyways. You would have to manually edit and reinsert the property expressions in the trunk's pom after every time you released. -- View this message in context: http://maven.40175.n5.nabble.com/scm-connection-in-parent-pom-tp3224641p3228825.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
On Wed, Oct 20, 2010 at 1:38 AM, Andreas Sewe s...@st.informatik.tu-darmstadt.de wrote: Hi Phillip, Does it make sense and will it work to define the scm connection in a parent pom if all my projects follow the same layout in SVN? i.e., connectionscm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/connection in theory, the above makes sense, but in practice you will encounter a problem: if scm/connection is inherited by a child POM, Maven automatically appends the equivalent of /${project.artifactId} to your SCM URL. Doh! That's too bad :( Thus, you end up with scm:svn:http://mysvnrep.com/svn/projects/${artifactId}/trunk/${project.artifactId};, which is in all likelihood not what you intended. (You are aiming for a flat repository layout here, which parent and child on the same level, right?) Right. Unfortunately, Maven is extremely prejudiced in favour of a hierarchical layout. But if there are any good workarounds other than copy-and-pasting scm/connection in all the child POMs I would love to hear about them. Yeah, me too :) I hope this helps. It does, thanks. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
On Wed, Oct 20, 2010 at 1:51 AM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: IIRC the appending is controlled by the presence of a / at the end of the URI if the URI ends with a slash then it will not append the module name in children if the URI does not end with a slash then it will append the module name in children Ok, thanks. Maybe I will give this a try, or maybe I won't worry about it since I think your next email may convince me it's not worth it... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Mirror of Central in France
Hello, At Antelink, we love Maven, and we thank the Maven people every day for maintaining the Central repository! So we thought we could give back a little to the community. We just set up a mirror of the Central, based in France, so that European Maven users enjoy a better bandwidth. We did more than that : we installed a Sonatype Nexus repository manager, in order to perform some searches, browse easily, etc. It is plugged directly to the Central, so any requested artifact which is not there yet is downloaded on-the-fly, and stored for subsequent uses. Sonatype announced today that they set up a mirror of the Central in UK. All this is aimed at the same goal: having a better Maven experience, and keeping Central healthy. You can reach the interface of the repository manager here : http://maven.antelink.com/ To make Maven use it, point your own repository manager to it, or add this to your ~/.m2/settings.xml file : settings mirrors mirror idantelink.com/id nameAntelink Mirror/name urlhttp://maven.antelink.com/content/groups/public//url mirrorOfcentral/mirrorOf /mirror /mirrors /settings Enjoy ! -- Samuel Langlois - Antelink http://www.antelink.com/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: scm connection in parent pom
On Wed, Oct 20, 2010 at 1:58 AM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: (snip) I have a bash script to update the details on a branch, etc... I am looking into the possibility of adding this into the maven-scm-plugin, e.g. mvn scm:infer -Dprovider=svn of course given that this would involve rewriting the pom.xml I'll have to decide how to handle Yeah, I really like the idea of having an scm:infer. You definitely got my vote! But if it can be inferred while the plugin is running, why exactly does it need to get written back into the pom? Of course, I don't mind it being written into the pom on a tag, and in the pom that goes to the repo, but in the trunk and branches the whole idea is to not have it present in there so it is always inferred. Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven-site-plugin 3: how to properly add to inherited reportPlugins?
Hi all, I am currently having trouble configuring the maven-site-plugin 3.0-beta-2. The setting is slightly more complex than the one described in the wiki https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html: A parent POM configures a some reportPlugins and a child POM wants to add some more -- without having to repeat the parent's reportPlugins again. Configuring an additional execution of site:site doesn't seem the way to go; it completely messes up the Project Documentation menu (on some pages, Project Information is the only submenu, on others it is Project Reports). Can someone point me in the right direction? Thanks. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven-site-plugin 3: how to properly add to inherited reportPlugins?
Hi, There is an issue regarding this which is recorded here http://jira.codehaus.org/browse/MSITE-484. Btw properly handling this inheritance case will probably need some hack in maven core. 2010/10/20 Andreas Sewe s...@st.informatik.tu-darmstadt.de: Hi all, I am currently having trouble configuring the maven-site-plugin 3.0-beta-2. The setting is slightly more complex than the one described in the wiki https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html: A parent POM configures a some reportPlugins and a child POM wants to add some more -- without having to repeat the parent's reportPlugins again. Configuring an additional execution of site:site doesn't seem the way to go; it completely messes up the Project Documentation menu (on some pages, Project Information is the only submenu, on others it is Project Reports). Can someone point me in the right direction? Thanks. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Olivier http://twitter.com/olamy http://www.linkedin.com/in/olamy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Possible bug in Subversion SCM or release plugin
On Wed, Oct 20, 2010 at 12:29 AM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: On 19 October 2010 23:43, Phillip Hellewell ssh...@gmail.com wrote: Also, what about my idea that the release plugin ought to just use the working copy URL when an scm connection is not defined? Seems like that would really simplify things, and I don't see any downsides. the world does not revolve around svn...we'd have to check _LL_ providers I see what you mean; asking it to infer not only the URL but also the SCM you're using is probably asking too much. So how about a solution where you still have to tell it the SCM just not the URL, e.g., if the connection could be set to like scm:svn:infer. FYI, on another thread Stephen brought up possibly working on some type of infer functionality. Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Possible bug in Subversion SCM or release plugin
On Tue, Oct 19, 2010 at 4:43 PM, Phillip Hellewell ssh...@gmail.com wrote: But anyway, should I still submit a bug? I don't know if it is the release plugin or SCM plugin at fault though... FYI, I created this bug: http://jira.codehaus.org/browse/MRELEASE-609 Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Possible bug in Subversion SCM or release plugin
On Oct 20, 2010, at 12:57 PM, Phillip Hellewell ssh...@gmail.com wrote: On Wed, Oct 20, 2010 at 12:29 AM, Stephen Connolly stephen.alan.conno...@gmail.com wrote: On 19 October 2010 23:43, Phillip Hellewell ssh...@gmail.com wrote: Also, what about my idea that the release plugin ought to just use the working copy URL when an scm connection is not defined? Seems like that would really simplify things, and I don't see any downsides. the world does not revolve around svn...we'd have to check _LL_ providers I see what you mean; asking it to infer not only the URL but also the SCM you're using is probably asking too much. So how about a solution where you still have to tell it the SCM just not the URL, e.g., if the connection could be set to like scm:svn:infer. This would make project materialization from a pom impossible. Stephen's addition to the scm plugin makes far more sense. Stephen - Rick Mangi has access to an svn implementation of this and I have a git implementation. Let me know if you want these (I'll have to ask Rick nicely for the svn one). Justin FYI, on another thread Stephen brought up possibly working on some type of infer functionality. Phillip - 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: Possible bug in Subversion SCM or release plugin
On Wed, Oct 20, 2010 at 11:16 AM, Justin Edelson justinedel...@gmail.com wrote: On Oct 20, 2010, at 12:57 PM, Phillip Hellewell ssh...@gmail.com wrote: So how about a solution where you still have to tell it the SCM just not the URL, e.g., if the connection could be set to like scm:svn:infer. This would make project materialization from a pom impossible. Stephen's addition to the scm plugin makes far more sense. Stephen - Rick Mangi has access to an svn implementation of this and I have a git implementation. Let me know if you want these (I'll have to ask Rick nicely for the svn one). But what if I don't care about being able to materialize a project from a pom? Anyone not using the scm or release plugins doesn't have a connection in their poms, so why should I have to have one if I don't need materialization from a pom? Now don't get me wrong. I actually do want to be able to materialize a project from a pom. I think that is cool and I really do want it. But due to our layout in SVN I already know just from the artifactId and version exactly where the tag I need is at. So I really don't need a connection setting in the pom to be able to materialize a project from it. Having said all that, I'm not opposed at all to the release pluign adding a connection section to the pom in the tag that gets created and to the pom that is deployed. It's just on the trunk (and branches) that it would be nice to never have have that defined in there and have to make sure it stays in sync and no one screws it up. Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
My first plugin to build dependencies from source
Hi all, Before I go down the road of writing my own plugin, can anyone tell me if there already exists a plugin that provides this functionality? 1. Resolve all dependencies using functionality similar to dependency:tree. - (only fetch poms to local repo, not the jar/zip/etc package) 2. Perform the following steps for each dependency (in reverse dependency order): a. Read the scm connection out of the dependency pom. b. Perform an scm:checkout for the dependency. c. Compile and install the dependency. The reasons for wanting a plugin to do this are: 1. Automate checking out the corresponding source code of dependencies. a. Make it easier to modify dependencies. (but of course, the changes can't be committed directly from where the tag was checked out) 2. Avoid downloading binary packages (for remote employees it may be faster to build the code than to download binaries). Any advice on how to approach this would be appreciated. Thanks, Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Property for the location of the local repository
On 11 October 2010 21:48, Hilco Wijbenga hilco.wijbe...@gmail.com wrote: I could have sworn I've used ${localRepository} before but it doesn't seem to work. I've also tried ${settings.localRepository} and ${maven.repo.local}. How do I refer to the location of the local repository in a portable way? Is there a difference between Maven2 and Maven3? I had a look in the source code and found the following: hi...@centaur ~/open-source/maven/maven3 $ find . -name '.svn' -prune -o -type f | xargs grep LOCAL_REPO_PROPERTY ./maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java: public static final String LOCAL_REPO_PROPERTY = maven.repo.local; ./maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java: String localRepoProperty = request.getUserProperties().getProperty( MavenCli.LOCAL_REPO_PROPERTY ); ./maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java: localRepoProperty = request.getSystemProperties().getProperty( MavenCli.LOCAL_REPO_PROPERTY ); So maven.repo.local seems to be the right property. As far as I can tell, however, it never gets set? hi...@centaur ~/open-source/maven/maven3 $ find . -name '.svn' -prune -o -type f | xargs grep maven.repo.local ./maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java: public static final String LOCAL_REPO_PROPERTY = maven.repo.local; (see above) ./maven-embedder/src/test/resources/settings/invalid-settings.xml: localRepository/Users/jvanzyl/maven-repo-local/localRepository (test code) ./build.xml:ant -Dmaven.repo.local=/my/integration/repository ./build.xml:property name=maven.repo.local value=${user.home}/.m2/repository / ./build.xml:echomaven.repo.local = ${maven.repo.local}/echo ./build.xml: localRepository path=${maven.repo.local} / ./build.xml: localRepository path=${maven.repo.local} / ./build.xml: localRepository path=${maven.repo.local} / ./build.xml: localRepository path=${maven.repo.local} / ./build.xml: arg value=-Dmaven.repo.local=${maven.repo.local} / (ant stuff) ./maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java: String ALT_LOCAL_REPOSITORY_LOCATION = maven.repo.local; (never used anywhere) ./maven-core/src/main/resources/org/apache/maven/messages/messages_de.properties:maven.repo.local.unset.warning=maven.repo.local ist nicht gesetzt. ./maven-core/src/main/resources/org/apache/maven/messages/messages_ja.properties:maven.repo.local.unset.warning=maven.repo.local \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093. ./maven-core/src/main/resources/org/apache/maven/messages/messages_el.properties:maven.repo.local.unset.warning=maven.repo.local \u00e4\u00e5\u00ed \u00dd\u00f7\u00e5\u00e9 \u00ef\u00f1\u00e9\u00f3\u00f4\u00e5\u00df. ./maven-core/src/main/resources/org/apache/maven/messages/messages_es.properties:maven.repo.local.unset.warning=\u00a1maven.repo.local no est\u00e1 definido! ./maven-core/src/main/resources/org/apache/maven/messages/messages_nl.properties:maven.repo.local.unset.warning=maven.repo.local is niet ingesteld. ./maven-core/src/main/resources/org/apache/maven/messages/messages_fr.properties:maven.repo.local.unset.warning=maven.repo.local n'est pas d\u00e9fini. ./maven-core/src/main/resources/org/apache/maven/messages/messages.properties:maven.repo.local.unset.warning=maven.repo.local is not set. ./maven-core/src/main/resources/org/apache/maven/messages/messages_no.properties:maven.repo.local.unset.warning=maven.repo.local er ikke definert. ./maven-core/src/main/resources/org/apache/maven/messages/messages_zh_CN.properties:maven.repo.local.unset.warning=\u6ca1\u6709\u8bbe\u7f6e maven.repo.local \u5c5e\u6027\u3002 ./maven-core/src/main/resources/org/apache/maven/messages/messages_pl.properties:maven.repo.local.unset.warning=maven.repo.local nie jest zdefiniowane. ./maven-core/src/main/resources/org/apache/maven/messages/messages_ko.properties:maven.repo.local.unset.warning = maven.repo.local \uC774 \uC124\uC815\uB418\uC5B4\uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. (i18n messages) ./maven-core/src/site/apt/configuration-management.apt: maven.repo.local (system,user,default=${maven.user.config.dir}/repository) (documentation) ./maven-core/src/test/java/org/apache/maven/settings/PomConstructionWithSettingsTest.java: System.getProperty( maven.repo.local, System.getProperty( user.home ) + /.m2/repository ); ./maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java: System.getProperty( maven.repo.local, System.getProperty( user.home ) + /.m2/repository ); (more tests) ./maven-compat/src/main/resources/META-INF/maven/plugin-expressions/rootless.paramdoc.xml: key-Dmaven.repo.local=/path/to/local/repo/key (documentation) ./pom.xml: idmaven-repo-local/id ./pom.xml: namemaven.repo.local/name ./pom.xml: namemaven.repo.local/name ./pom.xml: value${maven.repo.local}/value (use it) I can't tell where maven.repo.local is being set and
Maven SCM plugin and CCRC
I'm having an issue getting the Maven SCM Plugin configured to use CCRC (ClearCase Remote Client v7.1.1). 1. What should the clearcase-settings.xml for Clear Case and location 2. What are the SCM setting SCM settings /SCM 3. Is there anything in the POM that is needed for configuration of the SCM plugin Thanks, Jeff CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information or otherwise protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Re: Maven SCM plugin and CCRC
I tried to get this to work but have up after getting no where for a few days. Chris On Oct 20, 2010, at 12:59, Lucas, Jeffrey A. jeffrey.lu...@anthem.com wrote: I'm having an issue getting the Maven SCM Plugin configured to use CCRC (ClearCase Remote Client v7.1.1). 1. What should the clearcase-settings.xml for Clear Case and location 2. What are the SCM setting SCM settings /SCM 3. Is there anything in the POM that is needed for configuration of the SCM plugin Thanks, Jeff CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information or otherwise protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven SCM plugin and CCRC
Hello, as far as I know, there is no scm implementation of CCRC for Maven. Clearcase Base/UCM are partially supported, it is far from perfect to be able to do the checkout/release roundtrip. I am guessing you read the documentation for the Clearcase (heavy client) implementation Cheers, Vincent 2010/10/20 Lucas, Jeffrey A. jeffrey.lu...@anthem.com I'm having an issue getting the Maven SCM Plugin configured to use CCRC (ClearCase Remote Client v7.1.1). 1. What should the clearcase-settings.xml for Clear Case and location 2. What are the SCM setting SCM settings /SCM 3. Is there anything in the POM that is needed for configuration of the SCM plugin Thanks, Jeff CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information or otherwise protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. -- Vincent
Re: maven3 profile activation by absense of property
Joachim, Profiles can be activated by a property not having a certain value. This includes the absence of a property. For you the profile would become: profiles profile iddocumentation/id activation property nameskipDocs/name value!true/value /property /activation ... /profile /profiles Profile activation can easily be checked with: mvn help:active-profiles -DskipDocs mvn help:active-profiles -DskipDocs=true mvn help:active-profiles -DskipDocs=false (not specifying a value makes it true). Regards, Kees -- Squins | IT, Honestly Oranjestraat 23 2983 HL Ridderkerk The Netherlands Phone: +31 (0)180 415559 Mobile: +31 (0)6 30413841 www.squins.com http://twitter.com/keesvandieren Chamber of commerce Rotterdam: 22048547 Boeken voor school en werk bestel je op studieboekencenter.nl 2010/10/20 Joachim Van der Auwera joac...@progs.be On 10/20/2010 12:35 PM, Wendy Smoak wrote: On Wed, Oct 20, 2010 at 5:32 AM, Joachim Van der Auwera joac...@triathlon98.com wrote: However, since the switch to maven3 this does not worka anymore and mvn -DskipDocs install will still include the documentation module. Do I have to do something different to make this work in maven3? What happens if you do -DskipDocs=abc ? That will test the difference between 'present but empty' and 'present (with a value)'. That doesn't seem to make a difference. I haven't seen this mentioned in the compatibility notes, so I guess it is a bug (though it admittedly is a little documented feature). Thanks for the help, Joachim - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoking a plugin programmatically using maven 3 and scala
Hello, I am still banging my head on this problem, though I got a bit farther. I found a link via Google pointing to the maven site plugin and there to the DefaultMavenReportExecutor. I have tried to mimick the behavior in my special case and for testing I want to invoke the maven dependency plugin, namely the unpack dependencies goal. It seems to work if I provide all the missing paramters (like project etc.) into the configuration as expressions as follows val config : Xpp3Dom = Xpp3DomUtils.mergeXpp3Dom( buildConfiguration( Map( outputDirectory - test, project - ${project}, local - ${localRepository}, reactorProjects - ${reactorProjects} , remoteRepos - ${project.remoteArtifactRepositories} ) ), convert(md) ) That approach doesn't give me any Exceptions. I would have expected that all parameters except the non-default output directory would be resolved as the dependency plugin gives default expressions for them. However, this approach removes the parameter exceptions from before, but calling it doesn't unpack the dependencies (nothing happens really). I have tried to use the LifecycleExecutor.executeForkedExecutions BuildPluginManager.executeMojo and even tried to call execute on the configured Mojo (which I probably shouldn't do ?) I have attached a sample build output and also the code of my scala based mojo. Apart from studying the source code of the API and some sample plugins, is there documentation how the new plugin API is supposed to work ? Am I trying to do something out of the ordinary here ? (I know I could configure the dependency plugin in the pom but as this is *such* an essential step in the final mojo I don't want to give the user the option of leaving it out ... and I wanted to learn some more maven internals). Has anyone an example of initializing and calling a mojo from within a mojo using the new API ? - Java is fine as well, I can adopt it to scala as a learning exercise. I think I might be missing something in terms of hooking up or registering the project with the dependency plugin though the build output indicates that the project is referenced correctly. Any hints would be really appreciated; if I am hitting the wrong list, please let me know. Thanks in advance Andreas Am 10/13/10 9:27 AM, schrieb Andreas Gies: Hello Maveners , mainly for self learning purposes I am trying to build some plugins for Maven 3 using the Scala language. One of the things I had going before (Maven 2 Java based) is to invoke another plugin programmatically. Now I am trying to invoke the dependency plugin, namely the unpack-dependencies goal and am running into a rather cryptic error message: [ERROR] Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cli) on project test-plugin: The parameters 'proje ct', 'local', 'remoteRepos', 'reactorProjects' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies are missing or invali d - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cl i) on project test-plugin: The parameters 'project', 'local', 'remoteRepos', 'reactorProjects' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies are missing or invalid at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:157) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:88) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:80) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:87) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:315) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168) at org.apache.maven.cli.MavenCli.main(MavenCli.java:132) 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:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at
Re: Invoking a plugin programmatically using maven 3 and scala
Hello, I forgot to mention that the output from the scala plugin is embedded in the build.log produced by the mavan invoker plugin. Best regards Andreas Am 10/20/10 8:22 PM, schrieb Andreas Gies: Hello, I am still banging my head on this problem, though I got a bit farther. I found a link via Google pointing to the maven site plugin and there to the DefaultMavenReportExecutor. I have tried to mimick the behavior in my special case and for testing I want to invoke the maven dependency plugin, namely the unpack dependencies goal. It seems to work if I provide all the missing paramters (like project etc.) into the configuration as expressions as follows val config : Xpp3Dom = Xpp3DomUtils.mergeXpp3Dom( buildConfiguration( Map( outputDirectory - test, project - ${project}, local - ${localRepository}, reactorProjects - ${reactorProjects} , remoteRepos - ${project.remoteArtifactRepositories} ) ), convert(md) ) That approach doesn't give me any Exceptions. I would have expected that all parameters except the non-default output directory would be resolved as the dependency plugin gives default expressions for them. However, this approach removes the parameter exceptions from before, but calling it doesn't unpack the dependencies (nothing happens really). I have tried to use the LifecycleExecutor.executeForkedExecutions BuildPluginManager.executeMojo and even tried to call execute on the configured Mojo (which I probably shouldn't do ?) I have attached a sample build output and also the code of my scala based mojo. Apart from studying the source code of the API and some sample plugins, is there documentation how the new plugin API is supposed to work ? Am I trying to do something out of the ordinary here ? (I know I could configure the dependency plugin in the pom but as this is *such* an essential step in the final mojo I don't want to give the user the option of leaving it out ... and I wanted to learn some more maven internals). Has anyone an example of initializing and calling a mojo from within a mojo using the new API ? - Java is fine as well, I can adopt it to scala as a learning exercise. I think I might be missing something in terms of hooking up or registering the project with the dependency plugin though the build output indicates that the project is referenced correctly. Any hints would be really appreciated; if I am hitting the wrong list, please let me know. Thanks in advance Andreas Am 10/13/10 9:27 AM, schrieb Andreas Gies: Hello Maveners , mainly for self learning purposes I am trying to build some plugins for Maven 3 using the Scala language. One of the things I had going before (Maven 2 Java based) is to invoke another plugin programmatically. Now I am trying to invoke the dependency plugin, namely the unpack-dependencies goal and am running into a rather cryptic error message: [ERROR] Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cli) on project test-plugin: The parameters 'proje ct', 'local', 'remoteRepos', 'reactorProjects' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies are missing or invali d - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cl i) on project test-plugin: The parameters 'project', 'local', 'remoteRepos', 'reactorProjects' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies are missing or invalid at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:157) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:88) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:80) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:87) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:315) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168) at org.apache.maven.cli.MavenCli.main(MavenCli.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
Maven 3.0 and m-war-p 2.1: Duplicate entries in generated WAR?
Hi, I have a multi-module project structure that basically produces an EAR and some other artifacts: root +- pom.xml | +- module-common | + pom.xml | \ ... | +- module-war | + pom.xml | \ ... | +- module-ear | + pom.xml | \ ... | ... The project fully uses standard Maven directory layout, and there are some inter-module dependencies: - module-war depends on module-common - module-ear depends on module-war - each module has a parent entry to reference the project root The war module's web.xml (src/main/webapp/WEB-INF/web-xml) is automatically filtered when building the war so that Maven replaces display name and description with the values from my pom: web.xml: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; id=WebApp_ID display-name${project.name}/display-name description${project.description} ${project.version}/description ... /web-app From the war module's pom.xml: ... packagingwar/packaging ... build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.1-beta-1/version configuration filteringDeploymentDescriptorstrue/filteringDeploymentDescriptors /configuration /plugin /plugins /build ... Everything quite basic, and all according to the docs on http://maven.apache.org/plugins/maven-war-plugin/faq.html. As long as I'm using m-war-p 2.1-beta-1, everything works fine. With m-war-p 2.1 the WAR suddenly contains duplicate web.xml entries in the WEB-INF folder so that the ear module can't be packaged successfully. Am I doing something wrong? Or is this a bug (feature)? Environment: - Maven 3.0 - JDK 1.6.0_22 - Windows XP Regards Thorsten PGP.sig Description: Signierter Teil der Nachricht
Re: My first plugin to build dependencies from source
2. Avoid downloading binary packages (for remote employees it may be faster to build the code than to download binaries). I very much doubt that! Performing a build will take time to compile and test (don't forget the unit tests) as well as downloading test dependencies, which aren't downloaded otherwise. /Anders
Re: Maven SCM plugin and CCRC
Some time ago I investigated this and found some mail from an IBM guy looking into this. Apparently they had some support customer asking. However, not too surprisingly he didn't report back... /Anders On Wed, Oct 20, 2010 at 20:04, Vincent Latombe vincent.lato...@gmail.comwrote: Hello, as far as I know, there is no scm implementation of CCRC for Maven. Clearcase Base/UCM are partially supported, it is far from perfect to be able to do the checkout/release roundtrip. I am guessing you read the documentation for the Clearcase (heavy client) implementation Cheers, Vincent 2010/10/20 Lucas, Jeffrey A. jeffrey.lu...@anthem.com I'm having an issue getting the Maven SCM Plugin configured to use CCRC (ClearCase Remote Client v7.1.1). 1. What should the clearcase-settings.xml for Clear Case and location 2. What are the SCM setting SCM settings /SCM 3. Is there anything in the POM that is needed for configuration of the SCM plugin Thanks, Jeff CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information or otherwise protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. -- Vincent
Re: Maven 3.0 and m-war-p 2.1: Duplicate entries in generated WAR?
You probably got affected by http://jira.codehaus.org/browse/MWAR-235 S. On Wed, Oct 20, 2010 at 8:45 PM, Thorsten Heit th...@gmx.de wrote: Hi, I have a multi-module project structure that basically produces an EAR and some other artifacts: root +- pom.xml | +- module-common | + pom.xml | \ ... | +- module-war | + pom.xml | \ ... | +- module-ear | + pom.xml | \ ... | ... The project fully uses standard Maven directory layout, and there are some inter-module dependencies: - module-war depends on module-common - module-ear depends on module-war - each module has a parent entry to reference the project root The war module's web.xml (src/main/webapp/WEB-INF/web-xml) is automatically filtered when building the war so that Maven replaces display name and description with the values from my pom: web.xml: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; id=WebApp_ID display-name${project.name}/display-name description${project.description} ${project.version}/description ... /web-app From the war module's pom.xml: ... packagingwar/packaging ... build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.1-beta-1/version configuration filteringDeploymentDescriptorstrue/filteringDeploymentDescriptors /configuration /plugin /plugins /build ... Everything quite basic, and all according to the docs on http://maven.apache.org/plugins/maven-war-plugin/faq.html. As long as I'm using m-war-p 2.1-beta-1, everything works fine. With m-war-p 2.1 the WAR suddenly contains duplicate web.xml entries in the WEB-INF folder so that the ear module can't be packaged successfully. Am I doing something wrong? Or is this a bug (feature)? Environment: - Maven 3.0 - JDK 1.6.0_22 - Windows XP Regards Thorsten
Re: [ANN] Maven Release Plugin 2.1 Released
[MRELEASE-128] - SCM properties being replaced during release:perform This is still not working for me: http://jira.codehaus.org/browse/MRELEASE-128 Regards, Lars
RE: Maven-site-plugin 3: how to properly add to inherited reportPlugins?
Andreas- can you provide the site.xml your plugin is using and a rough layout of the report you desire also could you explain which report-plugins you will be implementing ? Martin __ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Date: Wed, 20 Oct 2010 17:58:54 +0200 From: s...@st.informatik.tu-darmstadt.de To: users@maven.apache.org Subject: Maven-site-plugin 3: how to properly add to inherited reportPlugins? Hi all, I am currently having trouble configuring the maven-site-plugin 3.0-beta-2. The setting is slightly more complex than the one described in the wiki https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html: A parent POM configures a some reportPlugins and a child POM wants to add some more -- without having to repeat the parent's reportPlugins again. Configuring an additional execution of site:site doesn't seem the way to go; it completely messes up the Project Documentation menu (on some pages, Project Information is the only submenu, on others it is Project Reports). Can someone point me in the right direction? Thanks. Best wishes, Andreas - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven rpm plugin
Does maven RPM plugin support configuration via existing spec file? What kind of configuration do you want to extract and use in your existing spec file? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven wants to get plugin versions that don't exist
I'm not sure what I did to screw things up, but lately it is failing to download plugins because it is trying to use a version that doesn't exist. I'm using Nexus as a mirror of everything. E.g., I just tried to do a mvn archetype:create to create a new plugin and it gave an error because it's trying to download the maven-archetype-plugin version 2.0-alpha-6, which doesn't exist. What did I do that screwed things up? Is something wrong with Nexus? Do I need to do a sync or something? Thanks, Phillip P.S. Here's the actual output: C:\mycomps\maven\plugin\hellomvn archetype:create -DgroupId=ad.maven.plugin -DartifactId=maven-hello-plugin -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-mojo [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.plugins:maven-archetype-plugin Reason: Error getting POM for 'org.apache.maven.plugins:maven-archetype-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.apache.maven.plugins:maven-archetype-plugin:pom:2.0-alpha-6-SNAPSHOT from the specified remote repositories: all-mirror (http://maven:8080/nexus/content/groups/public) for project org.apache.maven.plugins:maven-archetype-plugin - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: My first plugin to build dependencies from source
On Wed, Oct 20, 2010 at 12:46 PM, Anders Hammar and...@hammar.net wrote: 2. Avoid downloading binary packages (for remote employees it may be faster to build the code than to download binaries). I very much doubt that! Performing a build will take time to compile and test (don't forget the unit tests) as well as downloading test dependencies, which aren't downloaded otherwise. You'd be surprised how big some static libs can get :) But anyway, it doesn't matter. #1 is the real/main goal. Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven rpm plugin
Hi Wayne, It could be anything standard in the spec file (%build, %install etc.). The problem is a third party is providing the spec file for our use. Instead of having to reverse engineer it, we would like to simply point the plugin to it's location and build the RPM based on those parameters. Is this possible? I don't have much experience with RPMs, so let me know if I'm off base here. Thanks. On Wed, Oct 20, 2010 at 1:23 PM, Wayne Fay wayne...@gmail.com wrote: Does maven RPM plugin support configuration via existing spec file? What kind of configuration do you want to extract and use in your existing spec file? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Plugin versions
Hi all, I'm going to add a pluginManagement section to my parent pom, but I want to understand these things so I can do it right. 1. How does maven decide what version to get if it's not defined in the super pom? 2. How do I find out what version of all the plugins my pom is using (help:effective-pom?) 3. How do I find out what versions are available (latest stable). Thanks, Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Plugin versions
Try the dependency plugin dependency:resolve-plugins http://maven.apache.org/plugins/maven-dependency-plugin/resolve-plugins- mojo.html Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time -Original Message- From: Phillip Hellewell [mailto:ssh...@gmail.com] Sent: Wednesday, October 20, 2010 5:46 PM To: Maven Users List Subject: Plugin versions Hi all, I'm going to add a pluginManagement section to my parent pom, but I want to understand these things so I can do it right. 1. How does maven decide what version to get if it's not defined in the super pom? 2. How do I find out what version of all the plugins my pom is using (help:effective-pom?) 3. How do I find out what versions are available (latest stable). Thanks, Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven rpm plugin
It could be anything standard in the spec file (%build, %install etc.). The problem is a third party is providing the spec file for our use. Instead of having to reverse engineer it, we would like to simply point the plugin to it's location and build the RPM based on those parameters. Is this possible? I don't have much experience with RPMs, so let me know if I'm off base here. I generally doubt the maven-rpm-plugin does what you require -- but I could certainly be wrong. Review the plugin documentation and have fun exploring. If you modify the plugin to add functionality that you require and think it might be helpful for others, it would be nice if you donated it back. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugin versions
On Wed, Oct 20, 2010 at 4:11 PM, Yanko, Curtis curt_ya...@uhc.com wrote: Try the dependency plugin dependency:resolve-plugins Thanks. I also found versions:display-plugin-updates, which was the main one I was trying to remember. I should specify versions for all plugins I'm using in my parent pom, and not just rely on the super pom, right? Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven wants to get plugin versions that don't exist
On Wed, Oct 20, 2010 at 3:22 PM, Phillip Hellewell ssh...@gmail.com wrote: I'm not sure what I did to screw things up, but lately it is failing to download plugins because it is trying to use a version that doesn't exist. I'm using Nexus as a mirror of everything. E.g., I just tried to do a mvn archetype:create to create a new plugin and it gave an error because it's trying to download the maven-archetype-plugin version 2.0-alpha-6, which doesn't exist. What did I do that screwed things up? Is something wrong with Nexus? Do I need to do a sync or something? I tried Expire Cache, Rebuild Metadata, ReIndex, etc. and I'm still having problems :( How did a version 2.0-alpha-6-SNAPSHOT for the maven-archetype-plugin get into Nexus and how do I get rid of it? Another one is the maven-help-plugin; it wants to use version 2.2-SNAPSHOT which isn't available. Please help! This is driving me nuts; I'm tired of typing everything out the long way, e.g.: mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:help instead of mvn help:help Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
A plugin that doesn't require a pom.xml
How do I create a plugin that doesn't require a pom.xml? Even the hello world described on this page requires it: http://maven.apache.org/guides/plugin/guide-java-plugin-development.html You get this error if you try to run it where no pom.xml is present. [INFO] Cannot execute mojo: sayhi. It requires a project with an existing pom.xml, but the build is not using one. Surely it must be possible. mvn help:help is an example of one that it lets me run from anywhere. Thanks, Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: A plugin that doesn't require a pom.xml
I've taken a look at the source of the help:describe goal and it seems you need RequireProject. http://svn.apache.org/viewvc/maven/plugins/tags/maven-help-plugin-2.1.1/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java?view=markup With regards, Nick Stolwijk ~Java Developer~ IPROFS BV. Claus Sluterweg 125 2012 WS Haarlem http://www.iprofs.nl On Thu, Oct 21, 2010 at 1:08 AM, Phillip Hellewell ssh...@gmail.com wrote: How do I create a plugin that doesn't require a pom.xml? Even the hello world described on this page requires it: http://maven.apache.org/guides/plugin/guide-java-plugin-development.html You get this error if you try to run it where no pom.xml is present. [INFO] Cannot execute mojo: sayhi. It requires a project with an existing pom.xml, but the build is not using one. Surely it must be possible. mvn help:help is an example of one that it lets me run from anywhere. Thanks, Phillip - 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
Shared Assembly With Additional Files
I'd like my shared assembly to be used to import additional files I'd like to include in my final assembly. Something like: shared-assembly/pom.xml shared-assembly/src/main/resources/assemblies/my-assembly.xml shared-assembly/src/main/resources/common/README my-assembly.xml: ... fileSet directorycommon/directory includes includeREADME/include /includes outputDirectory//outputDirectory /fileSet ... So, whatever project uses my-assembly.xml from shared-assemby will get the README file as well. I've seen this done alternatively by putting README in it's own project, using dependency:unpack during the process-resources phase, and then referencing that file in the assembly. But, it seems like the above is cleaner. Thanks, Mike - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoking a plugin programmatically using maven 3 and scala
Hello, another update on this. From studying the source code I was under the impression that mojoDescriptor.getConfiguration would give me the default configuration, but it is mojoDescriptor.getMojoConfiguration. A debug session has shown, that the dependency plugin actually executes, but somehow doesn't recognize the dependencies of the project. Best regards Andreas Am 10/20/10 8:28 PM, schrieb Andreas Gies: Hello, I forgot to mention that the output from the scala plugin is embedded in the build.log produced by the mavan invoker plugin. Best regards Andreas Am 10/20/10 8:22 PM, schrieb Andreas Gies: Hello, I am still banging my head on this problem, though I got a bit farther. I found a link via Google pointing to the maven site plugin and there to the DefaultMavenReportExecutor. I have tried to mimick the behavior in my special case and for testing I want to invoke the maven dependency plugin, namely the unpack dependencies goal. It seems to work if I provide all the missing paramters (like project etc.) into the configuration as expressions as follows val config : Xpp3Dom = Xpp3DomUtils.mergeXpp3Dom( buildConfiguration( Map( outputDirectory - test, project - ${project}, local - ${localRepository}, reactorProjects - ${reactorProjects} , remoteRepos - ${project.remoteArtifactRepositories} ) ), convert(md) ) That approach doesn't give me any Exceptions. I would have expected that all parameters except the non-default output directory would be resolved as the dependency plugin gives default expressions for them. However, this approach removes the parameter exceptions from before, but calling it doesn't unpack the dependencies (nothing happens really). I have tried to use the LifecycleExecutor.executeForkedExecutions BuildPluginManager.executeMojo and even tried to call execute on the configured Mojo (which I probably shouldn't do ?) I have attached a sample build output and also the code of my scala based mojo. Apart from studying the source code of the API and some sample plugins, is there documentation how the new plugin API is supposed to work ? Am I trying to do something out of the ordinary here ? (I know I could configure the dependency plugin in the pom but as this is *such* an essential step in the final mojo I don't want to give the user the option of leaving it out ... and I wanted to learn some more maven internals). Has anyone an example of initializing and calling a mojo from within a mojo using the new API ? - Java is fine as well, I can adopt it to scala as a learning exercise. I think I might be missing something in terms of hooking up or registering the project with the dependency plugin though the build output indicates that the project is referenced correctly. Any hints would be really appreciated; if I am hitting the wrong list, please let me know. Thanks in advance Andreas Am 10/13/10 9:27 AM, schrieb Andreas Gies: Hello Maveners , mainly for self learning purposes I am trying to build some plugins for Maven 3 using the Scala language. One of the things I had going before (Maven 2 Java based) is to invoke another plugin programmatically. Now I am trying to invoke the dependency plugin, namely the unpack-dependencies goal and am running into a rather cryptic error message: [ERROR] Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cli) on project test-plugin: The parameters 'proje ct', 'local', 'remoteRepos', 'reactorProjects' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies are missing or invali d - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cl i) on project test-plugin: The parameters 'project', 'local', 'remoteRepos', 'reactorProjects' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies are missing or invalid at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:157) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:88) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:80) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:87) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:315) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at
Re: Maven wants to get plugin versions that don't exist
having problems :( How did a version 2.0-alpha-6-SNAPSHOT for the maven-archetype-plugin get into Nexus and how do I get rid of it? Another one is the maven-help-plugin; it wants to use version 2.2-SNAPSHOT which isn't available. There's a Nexus Users list that would be more appropriate for this line of questioning... Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven wants to get plugin versions that don't exist
On Wed, Oct 20, 2010 at 5:22 PM, Phillip Hellewell ssh...@gmail.com wrote: What did I do that screwed things up? Is something wrong with Nexus? Do I need to do a sync or something? Usually when Maven is trying to update plugin snapshots, it's because one has gotten into your local repository. Try removing the directory tree for the archetype plugin from your local repo, and see if it goes back to using the released version. You can also use the long form of the plugin execution command, and specify groupId:artifactId:version to force it to use the version you want. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Invoking a plugin programmatically using maven 3 and scala
Hello, a last update for today. I have compared a debug session of mvn dependency:resolve with what happens in my code. It seems, that when calling the plugin from the command line, at the end of the day a class named org.apache.maven.lifecycle.internal.MojoExecutor kind of controlls he execution and also takes initiates the desired dependency resolution before the plugin code is called. Therefore the dependency plugin finds the dependencies and all is good. However, when i invoke BuildPluginManager.executeMojo the dependency resolution does not happen and the dependency plugin doesnt find them. I have now the options to use a non-public API and reuse the MojoExecutor code or kinfd of Mimick that behavior. I kind of have the feeling that I am missing something very obvious in the API. A pointer to a correct call triggering dependency resolution would be great. Perhaps I have selected the wrong entrypoint into the API ? Thanks and best regards Andreas Am 10/21/10 2:12 AM, schrieb Andreas Gies: Hello, another update on this. From studying the source code I was under the impression that mojoDescriptor.getConfiguration would give me the default configuration, but it is mojoDescriptor.getMojoConfiguration. A debug session has shown, that the dependency plugin actually executes, but somehow doesn't recognize the dependencies of the project. Best regards Andreas Am 10/20/10 8:28 PM, schrieb Andreas Gies: Hello, I forgot to mention that the output from the scala plugin is embedded in the build.log produced by the mavan invoker plugin. Best regards Andreas Am 10/20/10 8:22 PM, schrieb Andreas Gies: Hello, I am still banging my head on this problem, though I got a bit farther. I found a link via Google pointing to the maven site plugin and there to the DefaultMavenReportExecutor. I have tried to mimick the behavior in my special case and for testing I want to invoke the maven dependency plugin, namely the unpack dependencies goal. It seems to work if I provide all the missing paramters (like project etc.) into the configuration as expressions as follows val config : Xpp3Dom = Xpp3DomUtils.mergeXpp3Dom( buildConfiguration( Map( outputDirectory - test, project - ${project}, local - ${localRepository}, reactorProjects - ${reactorProjects} , remoteRepos - ${project.remoteArtifactRepositories} ) ), convert(md) ) That approach doesn't give me any Exceptions. I would have expected that all parameters except the non-default output directory would be resolved as the dependency plugin gives default expressions for them. However, this approach removes the parameter exceptions from before, but calling it doesn't unpack the dependencies (nothing happens really). I have tried to use the LifecycleExecutor.executeForkedExecutions BuildPluginManager.executeMojo and even tried to call execute on the configured Mojo (which I probably shouldn't do ?) I have attached a sample build output and also the code of my scala based mojo. Apart from studying the source code of the API and some sample plugins, is there documentation how the new plugin API is supposed to work ? Am I trying to do something out of the ordinary here ? (I know I could configure the dependency plugin in the pom but as this is *such* an essential step in the final mojo I don't want to give the user the option of leaving it out ... and I wanted to learn some more maven internals). Has anyone an example of initializing and calling a mojo from within a mojo using the new API ? - Java is fine as well, I can adopt it to scala as a learning exercise. I think I might be missing something in terms of hooking up or registering the project with the dependency plugin though the build output indicates that the project is referenced correctly. Any hints would be really appreciated; if I am hitting the wrong list, please let me know. Thanks in advance Andreas Am 10/13/10 9:27 AM, schrieb Andreas Gies: Hello Maveners , mainly for self learning purposes I am trying to build some plugins for Maven 3 using the Scala language. One of the things I had going before (Maven 2 Java based) is to invoke another plugin programmatically. Now I am trying to invoke the dependency plugin, namely the unpack-dependencies goal and am running into a rather cryptic error message: [ERROR] Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cli) on project test-plugin: The parameters 'proje ct', 'local', 'remoteRepos', 'reactorProjects' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies are missing or invali d - [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.progress.maven.plugins:plugin-sandbox:8.0-SNAPSHOT:echo (default-cl i) on project test-plugin: The parameters 'project', 'local',
RE: Plugin versions
Yeah, a *company* pom even that all Parent POMs load as a parent. I like to nail down everything, to me, it's a build specification and I want it all defined and (self) documented. Curt Yanko | Continuous Integration Services | UnitedHealth Group IT Making IT Happen, one build at a time -Original Message- From: Phillip Hellewell [mailto:ssh...@gmail.com] Sent: Wednesday, October 20, 2010 6:51 PM To: Maven Users List Subject: Re: Plugin versions On Wed, Oct 20, 2010 at 4:11 PM, Yanko, Curtis curt_ya...@uhc.com wrote: Try the dependency plugin dependency:resolve-plugins Thanks. I also found versions:display-plugin-updates, which was the main one I was trying to remember. I should specify versions for all plugins I'm using in my parent pom, and not just rely on the super pom, right? Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Property for the location of the local repository
Hi! On Wednesday 20 October 2010 Hilco Wijbenga wrote: On 11 October 2010 21:48, Hilco Wijbenga hilco.wijbe...@gmail.com wrote: I could have sworn I've used ${localRepository} before but it doesn't seem to work. I've also tried ${settings.localRepository} and ${maven.repo.local}. How do I refer to the location of the local repository in a portable way? Is there a difference between Maven2 and Maven3? I had a look in the source code and found the following: [...] Is there some documentation on how properties are handled internally? How *does* project.build.directory get its value? Example POM: ?xml version=1.0 encoding=UTF-8? 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/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdorg.example/groupId artifactIdmaven-local-repo/artifactId packagingjar/packaging version0.1-SNAPSHOT/version name${x} - {y}/name properties x${maven.local.repo}/x y${project.build.directory}/y /properties build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId version1.6/version executions execution phaseclean/phase goals goalrun/goal /goals configuration target echo${x}/echo echo${y}/echo /target /configuration /execution /executions /plugin /plugins /build /project Simply run mvn clean. I don't know what is actually the prefered way of accessing the path to the local repository (but I'm quite sure I saw discussions about it on this list before). However, running your example pom.xml works as soon as I changed ${maven.local.repo} to ${settings.localRepository}. This is working with maven 2.2.1 and maven 3.0-beta-3. hth, - martin signature.asc Description: This is a digitally signed message part.