Re: Configure FROM mailbox
The from address can be configured in WEB-INF/classes/META-INF/plexus/application.xml Emmanuel On Jan 10, 2008 1:56 PM, ivan [EMAIL PROTECTED] wrote: Hi! I configured file plexus.xml (continuum 1.1), and also section Mail. But while starting continuum, following line are printed into log: org.codehaus.plexus.notification.notifier.Notifier:mail - The from mailbox is not configured, will use the nag email address from the project. So, how can I set FROM mailbox and where? Thanks
RE: Configure FROM mailbox
I am sorry I think this is not correct Regards Pallavi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 6:38 PM To: continuum-users@maven.apache.org Subject: RE: Configure FROM mailbox Hi, You need to set your plexux.xml file under \continuum-1.1\conf from localhost to your mailServer name Below I have copied the xml file part. !-- START SNIPPET: mail -- !-- Mail Session -- resource namemail/Session/name typejavax.mail.Session/type properties property namemail.smtp.host/name valuelocalhost/value /property property namemail.smtp.port/name value25/value /property Regards Pallavi -Original Message- From: ivan [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 6:26 PM To: continuum-users@maven.apache.org Subject: Configure FROM mailbox Hi! I configured file plexus.xml (continuum 1.1), and also section Mail. But while starting continuum, following line are printed into log: org.codehaus.plexus.notification.notifier.Notifier:mail - The from mailbox is not configured, will use the nag email address from the project. So, how can I set FROM mailbox and where? Thanks
Re: Configure FROM mailbox
Olivier Lamy wrote: Hi, In the webapp, you will find the find WEB-INF/classes/META-INF/plexus/application.xml It's contains the empty elements : from-mailbox/from-mailbox from-name/from-name -- Olivier 2008/1/10, ivan [EMAIL PROTECTED]: Hi! I configured file plexus.xml (continuum 1.1), and also section Mail. But while starting continuum, following line are printed into log: org.codehaus.plexus.notification.notifier.Notifier:mail - The from mailbox is not configured, will use the nag email address from the project. So, how can I set FROM mailbox and where? Thanks Thanks! It helps, but particular. In fact, while starting continuum, I got following: org.codehaus.plexus.notification.notifier.Notifier:mail - Using '[EMAIL PROTECTED]' as the from mailbox for all emails. But when I try to register new user, I got this: INFO | jvm 1| 2008/01/10 15:29:32 | DEBUG SMTP: use8bit false INFO | jvm 1| 2008/01/10 15:29:32 | MAIL FROM:[EMAIL PROTECTED] INFO | jvm 1| 2008/01/10 15:29:32 | 550 Sender verify failed INFO | jvm 1| 2008/01/10 15:29:32 | com.sun.mail.smtp.SMTPSendFailedException: 550 Sender verify failed It is interesting, but when I got letters about building status - continuum use [EMAIL PROTECTED] May be somebody face it? Thanks
Re: how to add additional path to the compiler ?
garyng [EMAIL PROTECTED] schrieb: I followed this http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html but it seems that it is being ignored/eaten. What I want is to include the src/main/webapp/WEB-INF/lib to the compiler classpath as there are libraries not managed in maven. I believe this is pretty standard situation. compilerArgument-classpath src/main/webapp/WEB-INF/lib/compilerArgument would results in javac error compilerArguments classpathsrc/main/webapp/WEB-INF/lib/classpath /compilerArguments doesn't seem to be passed to javac, even though the mvn -X dump shows that it has been picked up by the plugin. I am wondering if the feature has even been tested before ? Adding libs to the classpath directly, bypassing maven, is not the right way to do things. I suspect you'll find that *other* compiler arguments work fine, but that classpath is not passed through because Maven wants to set that itself. You probably should declare these extra jars as normal dependency sections in your pom. If you absolutely have to, then use scopesystem/scope systemPath../systemPath although normal maven dependency resolution via the repository is better wherever possible. I haven't tried it, but maybe ${project.basedir}/ could be used in the systemPath section if the files are checked in within a subdir beneath the pom. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
classpathentry excluding=** kind=src output=src/main/resources path=src/main/resources/
Hi all, In my classpath I have the line: classpathentry excluding=** kind=src output=src/main/resources path=src/main/resources/ How do I set up Maven to omit the exluding part of this classpath entry? BR Markus Källander
Re: Exploded SAR with in an EAR
Hi Haim, Thanks for the help. But I am afraid I don't know how to use profiles, I had put it in my pom for EAR and tried, but the result was same. I am not confident enough in the way I used it. regards. Amit On Jan 10, 2008 12:50 PM, Haim Ashkenazi [EMAIL PROTECTED] wrote: On Jan 10, 2008 7:57 AM, amit kumar [EMAIL PROTECTED] wrote: I am packaging an EAR with a SAR in it. How do exploded EAR with an exploded SAR. The ear plugin by default is creating an exploded EAR but SAR within that is still packaged. Any ideas? yes. take a look at the profile below. you can change the unpackType to sar (or at least I think so). profile idexploded/id activation property nameexploded/name valuetrue/value /property /activation build plugins plugin artifactIdmaven-ear-plugin/artifactId configuration unpackTypesejb,war/unpackTypes /configuration /plugin /plugins /build /profile Bye -- Haim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to add a dependency - newbie to maven
Your first step will be a visit to mvnrepository.com. When you search artifacts there, you're sure they are on the central repository. I just checked and there are multiple swt jar files there. If you find the one you search, add the dependency to the pom.xml file and rebuild. If you can't find it there, take a look at this blog post: http://blambi.blogspot.com/2007/07/maven2-swt-builds.html. Hth, Nick Stolwijk -Original Message- From: rakeshsugirtharaj [mailto:[EMAIL PROTECTED] Sent: Thu 1/10/2008 8:59 AM To: users@maven.apache.org Subject: How to add a dependency - newbie to maven Hi folks!, I m doing a project that uses SWT for gui. How do i add the dependent jars to maven? Any help will be appeciated. Thanks in advance -- View this message in context: http://www.nabble.com/How-to-add-a-dependency---newbie-to-maven-tp14729321s177p14729321.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Exploded SAR with in an EAR
Hey Haim, It worked, and worked smooth :-). Thanks a lot again. Regards Amit On Jan 10, 2008 1:51 PM, amit kumar [EMAIL PROTECTED] wrote: Hi Haim, Thanks for the help. But I am afraid I don't know how to use profiles, I had put it in my pom for EAR and tried, but the result was same. I am not confident enough in the way I used it. regards. Amit On Jan 10, 2008 12:50 PM, Haim Ashkenazi [EMAIL PROTECTED] wrote: On Jan 10, 2008 7:57 AM, amit kumar [EMAIL PROTECTED] wrote: I am packaging an EAR with a SAR in it. How do exploded EAR with an exploded SAR. The ear plugin by default is creating an exploded EAR but SAR within that is still packaged. Any ideas? yes. take a look at the profile below. you can change the unpackType to sar (or at least I think so). profile idexploded/id activation property nameexploded/name valuetrue/value /property /activation build plugins plugin artifactIdmaven-ear-plugin/artifactId configuration unpackTypesejb,war/unpackTypes /configuration /plugin /plugins /build /profile Bye -- Haim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to add additional path to the compiler ?
thanks for the information. I want to do this is because certain jars are not in the maven repositories. I know the option I can have is to install a local repo but that can be quite time consuming and if I have multiple machines, I have to do it on each of them or must go to the length of setting up a local web server just for maven. dropping those into WEB-INF/lib means they always go with the project rather than have to setup each and every time. And given the delicacy of how a simple version change can break things, I sometimes find maven2's transitive dependency doing more harm then help having my specific WEB-INF/lib version is much better. In fact, under eclipse(and the m2eclipse plugin), I am effectively working in this mode. It is just that when I want to do it outside eclispse, I don't know how to. The main issue with local maven repo is that maintaining it requires quote some efforts. Simon Kitching-4 wrote: Adding libs to the classpath directly, bypassing maven, is not the right way to do things. I suspect you'll find that *other* compiler arguments work fine, but that classpath is not passed through because Maven wants to set that itself. You probably should declare these extra jars as normal dependency sections in your pom. If you absolutely have to, then use scopesystem/scope systemPath../systemPath although normal maven dependency resolution via the repository is better wherever possible. I haven't tried it, but maybe ${project.basedir}/ could be used in the systemPath section if the files are checked in within a subdir beneath the pom. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/how-to-add-additional-path-to-the-compiler---tp14728064s177p14730523.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: in POM.XML how to set groupID , artifactID with my corosponding directory structure
Hello Abdul, Perhaps you could start by reading the Maven Getting Started Guide about how to create project. http://maven.apache.org/guides/getting-started/index.html#How_do_I_make_ my_first_Maven_project Following that guidelines it will automatically create the proper project directory structure for you. It is best to organise your project like the Standard directory layout. http://maven.apache.org/guides/introduction/introduction-to-the-standard -directory-layout.html You can choose your groupId and artifactId yourself. Keep in mind that you do not want to choose them same as anybody else. There for the same rules should be applied to maven-modules as to java packages. In your case I would choose something like: groupId=ca.uwo.mhalin2.test artifactId=service Hope this helps. With kind regards, Marco -Original Message- From: abdul halim [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 7:31 PM To: users@maven.apache.org Subject: in POM.XML how to set groupID , artifactID with my corosponding directory structure Hello, My java project directory structure is as follows Test2 Service Src Com Ek3 Test Addition.java Could anyone please tell me how can I set groupid and artifactid in pom.xml either in super pom.xml and normal pom.xml Thanks Ah ** For information, services and offers, please visit our web site: http://www.klm.com. This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch Airlines) is registered in Amstelveen, The Netherlands, with registered number 33014286 ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to add a dependency - newbie to maven
SWT is available on the central repository groupId: org.eclipse artifactId: swt version: 3.2.1-v3235e or 3.3.0-v3346 Jeff On Jan 10, 2008 8:59 AM, rakeshsugirtharaj [EMAIL PROTECTED] wrote: Hi folks!, I m doing a project that uses SWT for gui. How do i add the dependent jars to maven? Any help will be appeciated. Thanks in advance -- View this message in context: http://www.nabble.com/How-to-add-a-dependency---newbie-to-maven-tp14729321s177p14729321.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- La mélancolie c'est communiste Tout le monde y a droit de temps en temps La mélancolie n'est pas capitaliste C'est même gratuit pour les perdants La mélancolie c'est pacifiste On ne lui rentre jamais dedans La mélancolie oh tu sais ça existe Elle se prend même avec des gants La mélancolie c'est pour les syndicalistes Il faut juste sa carte de permanent Miossec (2006) http://www.jeffmaury.com http://riadiscuss.jeffmaury.com
Excluding files from JAR
HI, Just like WAR can I as well exclude some files from JAR builds as well? I have used this, but not working. /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.1/version executions execution goals goaljar/goal /goals /execution /executions configuration excludes**/*.xsd/excludes schemaDirectorysrc/schema/xsd/schemaDirectory /configuration /plugin Am I missing something? Amit
site plugin with sub module
Houdy, I am using the latest version of the maven site plugin. In the site.xml file of the top parent project I have introduced the following : menu name=Other projects item name=XXX-API href=/xxx-project/index.html/ item name=XXX2--API href=/xxx2-project/index.html/ /menu as a special menu to new projects. I have two problems. The site generated from sub project exhibit this menu. I have tried to override it. Impossible, it is still appearing. Moreover the introduction of the '/' character is not enough to allow navigation relatively to the root site project. Generated HTML source show links as: xxx-project/index.html and xxx2-project/index.html Is there any way to by pass this behavior ? Thanx by advance -- View this message in context: http://www.nabble.com/site-plugin-with-sub-module-tp14731184s177p14731184.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
maven site plugin menu tag
Houdy, Is it still possible to generate a tag referencing a parent from a sub-module ? I am trying menu href=parent/ It does seem not to work properly -- View this message in context: http://www.nabble.com/maven-site-plugin-menu-tag-tp14731188s177p14731188.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cobertura plugin
Houdy, I am newby to Maven 2. I have Introduced the Cobertura plugin in the reporting section of the pom.xml file of my main project as follows: reporting ... plugins !-- - JUNIT test report activation -- plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId /plugin !-- - Cobertura Code coverage module -- plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId configuration formats formathtml/format /formats instrumentation/ check !-- should not stop in case of Cobertura reporting error -- haltOnFailurefalse/haltOnFailure /check /configuration /plugin /plugins ... /reporting It works fine. As I am also using the surefire reporting, it seems the test phase is run twice, one by surefire and once by cobertura. Is there any way to instrument code before surefire execution for the two plugin to share the same test sequence ? Thanx for your response ? -- View this message in context: http://www.nabble.com/Cobertura-plugin-tp14731193s177p14731193.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: site plugin with sub module
Hi, It's quite hard to understand your mail... The site plugin generates html pages from stuff it finds in the site/src/apt, site/src/fml, site/src/resources, etc. You then reference things starting from there. For you this would mean your link to href=/xxx-project/index.html points to src/site/apt/xxx-project/index.apt. If you want you can also put an index.apt in the folder site/src/apt, which will cause the site to use this for its index page, if you don't have this the site plugin will generate one for you. If this don't answer your question please pose it again more clearly. Nicole On 10/01/2008, globulon [EMAIL PROTECTED] wrote: Houdy, I am using the latest version of the maven site plugin. In the site.xml file of the top parent project I have introduced the following : menu name=Other projects item name=XXX-API href=/xxx-project/index.html/ item name=XXX2--API href=/xxx2-project/index.html/ /menu as a special menu to new projects. I have two problems. The site generated from sub project exhibit this menu. I have tried to override it. Impossible, it is still appearing. Moreover the introduction of the '/' character is not enough to allow navigation relatively to the root site project. Generated HTML source show links as: xxx-project/index.html and xxx2-project/index.html Is there any way to by pass this behavior ? Thanx by advance -- View this message in context: http://www.nabble.com/site-plugin-with-sub-module-tp14731184s177p14731184.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Configure FROM mailbox
Hi! I configured file plexus.xml (continuum 1.1), and also section Mail. But while starting continuum, following line are printed into log: org.codehaus.plexus.notification.notifier.Notifier:mail - The from mailbox is not configured, will use the nag email address from the project. So, how can I set FROM mailbox and where? Thanks
Re: Excluding files from JAR
Hi, No you don't miss something here. It's a know issue [1] and it's fixed in trunk. You can try last snapshot to test the fix. -- Olivier [1] http://jira.codehaus.org/browse/MJAR-30 2008/1/10, amit kumar [EMAIL PROTECTED]: HI, Just like WAR can I as well exclude some files from JAR builds as well? I have used this, but not working. /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.1/version executions execution goals goaljar/goal /goals /execution /executions configuration excludes**/*.xsd/excludes schemaDirectorysrc/schema/xsd/schemaDirectory /configuration /plugin Am I missing something? Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Configure FROM mailbox
Hi, You need to set your plexux.xml file under \continuum-1.1\conf from localhost to your mailServer name Below I have copied the xml file part. !-- START SNIPPET: mail -- !-- Mail Session -- resource namemail/Session/name typejavax.mail.Session/type properties property namemail.smtp.host/name valuelocalhost/value /property property namemail.smtp.port/name value25/value /property Regards Pallavi -Original Message- From: ivan [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 6:26 PM To: [EMAIL PROTECTED] Subject: Configure FROM mailbox Hi! I configured file plexus.xml (continuum 1.1), and also section Mail. But while starting continuum, following line are printed into log: org.codehaus.plexus.notification.notifier.Notifier:mail - The from mailbox is not configured, will use the nag email address from the project. So, how can I set FROM mailbox and where? Thanks
A question about using BATCH to run mvn-commands
Hi all, My question seems has not so much to do with mvn. I want to deploy many jars onto the remote repository. I use the mvn-command as follow: deploy:deploy-file -Dfile=mytest-1.0.jar -DgroupId=mytest -DartifactId=mytest -Dversion=1.0 -Dpackaging=jar -Durl=file:sap-dev/CVSREPO/CvsMaven/apache-archiva-1.0/data/repositories/internal Since I don't want to type so many text everytime I deploy a jar, so I want to write a BATCH to do so. Assumed the batch fiole call mydeploy.bat. Everytime I deploy a jar, I just need to start myDeploy.bat and give the parameters to Dfile, DgroupId, DartifactId etc. Soemone has good idea? Regards Thomas - Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker.
Re: Maven Multimodule Site plugins
This is a known problem in maven. you need to run maven once (to build all the child reports) On the first run there are no child reports (because the parent is run first) Then you need to run maven a second time (to rebuild the parent report) The good news is that you need only run the parent module, e.g. mvn site mvn -N site should do the trick for you. You will have problems though if you have grandchildren modules, then you'll have the mvn site mvn site as the only way to get it to work. On Jan 9, 2008 10:34 PM, Morgovsky, Alexander (US - Glen Mills) [EMAIL PROTECTED] wrote: Hello. Could someone please tell me if there are any multimodule site reporting plugs which produce multimodule reports? I have tried many plugins like javaNCSS but all the resulting sites return all 0's. This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]
Re: maven site plugin menu tag
On Jan 10, 2008 5:18 AM, globulon [EMAIL PROTECTED] wrote: Is it still possible to generate a tag referencing a parent from a sub-module ? I am trying menu href=parent/ It does seem not to work properly I think it's just menu ref=parent/ (not 'href' as you wrote.) If that wasn't just a typo, we need more information-- Maven version, Site plugin version, relevant bits of your site descriptor, and what results you're currently getting. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Release plugin - switch default values
Hi all, I'm trying to simplify the release process of my project. I run the following command: call mvn -DpreparationGoals=clean,install -DautoVersionSubmodules=true release:clean release:prepare Since my project have dependences against other projects (SNAPSHOT dependeces) I get the following question: There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: I have to answer yes to change the default and from this point over accept all defaults prompted. The question is: can I change, in same way, the above default so I can use --batch-mode ??? Consider that I can't change manuallly the dependences before to start the release process. Best regards. Alex -- View this message in context: http://www.nabble.com/Release-plugin---switch-default-values-tp14735852s177p14735852.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven2 build and package targets' classpath
Hi, I want to add a JAR archive to the CLASSPATH for the targets build/package. I don't want to include that JAR archive in my final WAR file. I read the documentation, and for that purpose I added in my pom.xml the following to the build element: extensions extension groupIdoracle/groupId artifactIdoracle-jdbc/artifactId version14/version /extension /extensions This artifact was successfully added by me doing: mvn install:install-file -Dfile=/opt/oracle/product/10g/jdbc/lib/ojdbc14.jar -DgroupId=oracle -DartifactId=oracle-jdbc -Dversion=14 -Dpackaging=jar Although when I run mvn package or mvn compile I get errors telling that the packages/classes defined in that JAR archive were not found in the classpath. How can I achieve this? Thank you. -- Filipe David Manana, [EMAIL PROTECTED] Obvious facts are like secrets to those not trained to see them.
CVS and Branches
Hello ! I have a really dumb question, but i cant seem to find the answer. I'm more used to SVN and I am a bit lost with branches in CVS ... How do you configure scm in a pom so that it points to a CVS branch ? I thought I should use tag, but it doesnt seem to work : connection scm:cvs:pserver:@server:/path/to/repo:Module /connection tagBRANCH_NAME/tag But when trying a release:prepare, I get [INFO] Cannot add release POM to SCM: Exception while executing SCM command. password is required. You must run a 'cvs -d :pserver:@server:2401/path/to/repo login' first or provide it in the connection url. Of course, I tried running that command, but no success. Passing -Dusername=... and -Dpassword=... doesnt help either. mvn -e release:prepare doesnt give more information. I have another project with almost the same kind of SCM config, but no branch. That project works fine. If I use mvn scm:validate, it tells me that my config is correct. Am I missing anything else ? Is there a way to get more logging infos (except -e) ? Thanks for your help ! -- Jabber : [EMAIL PROTECTED] Skype : Guillaume.Lederrey Projects : * http://rwanda.wordpress.com/ * http://rwandatech.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: site plugin with sub module
globulon [EMAIL PROTECTED] schrieb: I am using the latest version of the maven site plugin. In the site.xml file of the top parent project I have introduced the following : menu name=Other projects item name=XXX-API href=/xxx-project/index.html/ item name=XXX2--API href=/xxx2-project/index.html/ /menu as a special menu to new projects. I have two problems. The site generated from sub project exhibit this menu. I have tried to override it. Impossible, it is still appearing. It should not appear unless the child has a menu of the same name, with the inherit flag set. You really have no menu of this name in the child site.xml? Moreover the introduction of the '/' character is not enough to allow navigation relatively to the root site project. Generated HTML source show links as: xxx-project/index.html and xxx2-project/index.html Yes, url handling in site.xml is just *weird* in my experience. The only solution I know of that works is to specify all urls as absolute paths. When the site is generated, any url that starts with a value matching the url tag in the pom is then transformed into a relative url in the generated site. Having all the paths as absolute values in site.xml is pretty ugly though. I would love to hear of a better solution. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excluding files from JAR
amit kumar [EMAIL PROTECTED] schrieb: Just like WAR can I as well exclude some files from JAR builds as well? Not until the next version of the jar plugin is released. For the moment, the usual workaround is to use the antrun plugin to remove the unwanted files before the jar is created. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven2 build and package targets' classpath
Filipe David Manana [EMAIL PROTECTED] schrieb: Hi, I want to add a JAR archive to the CLASSPATH for the targets build/package. I don't want to include that JAR archive in my final WAR file. I read the documentation, and for that purpose I added in my pom.xml the following to the build element: extensions extension groupIdoracle/groupId artifactIdoracle-jdbc/artifactId version14/version /extension /extensions This artifact was successfully added by me doing: mvn install:install-file -Dfile=/opt/oracle/product/10g/jdbc/lib/ojdbc14.jar -DgroupId=oracle -DartifactId=oracle-jdbc -Dversion=14 -Dpackaging=jar Although when I run mvn package or mvn compile I get errors telling that the packages/classes defined in that JAR archive were not found in the classpath. How can I achieve this? I believe the extensions attribute is intended to make dynamically discoverable libraries available to maven plugins. In your case, probably what you want is scopeprovided/scope which tells maven that the jar is needed for compilation and for tests, but that the environment the artifact will finally be deployed into already provides a copy of this so it should not be in the final bundle. Or maybe scope optional is what you are looking for. Again, optional jars are not in the final bundle although they are present in the classpath for compile and test phases. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excluding files from JAR
Hi, I have downloaded the patches from the link mentioned by you. But I don't know how to apply them. regards, Amit On Jan 10, 2008 6:29 PM, Olivier Lamy [EMAIL PROTECTED] wrote: Hi, No you don't miss something here. It's a know issue [1] and it's fixed in trunk. You can try last snapshot to test the fix. -- Olivier [1] http://jira.codehaus.org/browse/MJAR-30 2008/1/10, amit kumar [EMAIL PROTECTED]: HI, Just like WAR can I as well exclude some files from JAR builds as well? I have used this, but not working. /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.1/version executions execution goals goaljar/goal /goals /execution /executions configuration excludes**/*.xsd/excludes schemaDirectorysrc/schema/xsd/schemaDirectory /configuration /plugin Am I missing something? Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven bypassing repository declarations?
Probably because some dependency you are using has added a repository (maven.openqa.org). This is why we suggest that putting repos into poms is not a good idea. -Original Message- From: Brewster, Richard [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 5:58 PM To: users@maven.apache.org Subject: Maven bypassing repository declarations? We have set up Artifactory at our company and the only references in repositories refer to Artifactory. Yet Maven seems to go around Artificatory for some artifacts. When building up a clean, empty local repository, some artifacts are found that are not cached in Artifactory. How can this be happening? Some examples: Downloading: http://maven.openqa.org/bouncycastle/bcprov-jdk15/135/bcprov-jdk15-135.j ar Downloading: http://maven.openqa.org/bouncycastle/bcprov-jdk15/135/bcprov-jdk15-135.p om Downloading: http://maven.openqa.org/org/codehaus/mojo/mojo/15/mojo-15.pom Downloading: http://maven.openqa.org/org/openqa/selenium/core/selenium-core/0.8.3/sel enium-core-0.8.3.jar Downloading: http://maven.openqa.org/org/openqa/selenium/core/selenium-core/0.8.3/sel enium-core-0.8.3.pom Richard Brewster Senior Associate Perrin Quarles Associates [EMAIL PROTECTED] (434) 817-2640 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven2 build and package targets' classpath
It works! :) Thank you. On 1/10/08, Simon Kitching [EMAIL PROTECTED] wrote: Filipe David Manana [EMAIL PROTECTED] schrieb: Hi, I want to add a JAR archive to the CLASSPATH for the targets build/package. I don't want to include that JAR archive in my final WAR file. I read the documentation, and for that purpose I added in my pom.xml the following to the build element: extensions extension groupIdoracle/groupId artifactIdoracle-jdbc/artifactId version14/version /extension /extensions This artifact was successfully added by me doing: mvn install:install-file -Dfile=/opt/oracle/product/10g/jdbc/lib/ojdbc14.jar -DgroupId=oracle -DartifactId=oracle-jdbc -Dversion=14 -Dpackaging=jar Although when I run mvn package or mvn compile I get errors telling that the packages/classes defined in that JAR archive were not found in the classpath. How can I achieve this? I believe the extensions attribute is intended to make dynamically discoverable libraries available to maven plugins. In your case, probably what you want is scopeprovided/scope which tells maven that the jar is needed for compilation and for tests, but that the environment the artifact will finally be deployed into already provides a copy of this so it should not be in the final bundle. Or maybe scope optional is what you are looking for. Again, optional jars are not in the final bundle although they are present in the classpath for compile and test phases. Regards, Simon -- Filipe David Manana, [EMAIL PROTECTED] Obvious facts are like secrets to those not trained to see them.
[Surefire2.3] Resources classpath problem
Hello, We have a few problems with the classpath used by surefire. Some tests fail randomly due to the order of the classpath managed by Surefire. During the execution of unit tests, it seems that the classpath used by maven differs from the classpath used by my IDE (IntelliJ). In IntelliJ, resources are loaded with the following order : /target/test-classes /target/classes .../aLib.jar .../anotherLib.jar ... But, by using maven2, the order is : ... .../aLib.jar /target/test-classes /target/classes .../anotherLib.jar ... Our projects use Surefire2.3. Is it possible to patch surefire to get a correct classpath (such as IntelliJ) ? Has this bug been fixed with maven2.0.8 ? Thanks. Regards, Alexandre Bunod and Olivier Catteau
Re: remote repositories verse proxy connectors...??
I was not able to see the artifact in my browser or on the file system. On Jan 9, 2008 11:04 PM, Maria Odea Ching [EMAIL PROTECTED] wrote: Hi Mick, Sorry, I got a little confused there. You got the The following resource does not exist when you tried browsing the artifact in Archiva? Where you able to see in the file system whether the artifact was actually downloaded in the Proxy Repository? Thanks, Deng On Jan 10, 2008 6:17 AM, Mick Knutson [EMAIL PROTECTED] wrote: I can't even seem to get access to the jar like: http://rc-sun66e.ut.dentegra.lab:8080/archiva/repository/internal/org/codehaus/mojo/dashboard-maven-plugin/1.0-SNAPSHOT/dashboard-maven-plugin-1.0-SNAPSHOT.jar Error 404 Not Found The following resource does not exist: http://rc-sun66e.ut.dentegra.lab:8080/repository/org/codehaus/mojo/dashboard-maven-plugin/1.0-SNAPSHOT/dashboard-maven-plugin-1.0-SNAPSHOT.jar On Jan 9, 2008 1:57 PM, Mick Knutson [EMAIL PROTECTED] wrote: I am trying to crate a project mirror where my team only accesses our repository. But I am now having issues getting http://snapshots.repository.codehaus.org/; resources like dashboard-plugin. Here is my proxy connector setting: Proxy Connector Codehaus-Maven-Snapshot Codehaus-Maven-Snapshot http://snapshots.maven.codehaus.org/maven2 Proxy Connector codehaus Codehaus Snapshots http://snapshots.repository.codehaus.org/ Expand http://rc-sun66e.ut.dentegra.lab:8080/archiva/admin/proxyConnectors.action# THen I still get this error: Reason: Unable to download the artifact from any repository org.codehaus.mojo:dashboard-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: central ( http://repo1.maven.org/maven2), dap.internal ( http://rc-sun66e.ut.dentegra.lab:8080/archiva/repository/internal/ ), dap.snapshots ( http://rc-sun66e.ut.dentegra.lab:8080/archiva/repository/snapshots/) [INFO] [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.codehaus.mojo:dashboard-maven-plugin': POM ' org.codehaus.mo jo:dashboard-maven-plugin' not found in repository: Unable to download the artifact from any repository org.codehaus.mojo:dashboard-maven-plugin:pom:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2), dap.internal ( http://rc-sun66e.ut.dentegra.lab:8080/archiva/repository/internal/ ), dap.snapshots ( http://rc-sun66e.ut.dentegra.lab:8080/archiva/repository/snapshots/) for project org.codehaus.mojo:dashboard-maven-plugin at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin( DefaultLifecycleExecutor.java:1274) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle( DefaultLifecycleExecutor.java :1221) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings (DefaultLifecycleExecutor.java:987) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (DefaultLifecycleExecutor.java :458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures (DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute ( DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java :334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java :125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke (Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced( Launcher.java :315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode ( Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.codehaus.mojo:dashboard-maven-plugin ': POM ' org.codehaus .mojo:dashboard-maven-plugin' not found in repository: Unable to download the artifact from any repository -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com
Re: Excluding files from JAR
Nothing to patch locally. The snapshot with this patch is available in snapshot plugin repositories. In order to test this have a look here [1] (first section How to include the plugin snapshot repositories as part of your build). If you have any issues let us know, Thanks, -- Olivier [1] http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html 2008/1/10, amit kumar [EMAIL PROTECTED]: Hi, I have downloaded the patches from the link mentioned by you. But I don't know how to apply them. regards, Amit On Jan 10, 2008 6:29 PM, Olivier Lamy [EMAIL PROTECTED] wrote: Hi, No you don't miss something here. It's a know issue [1] and it's fixed in trunk. You can try last snapshot to test the fix. -- Olivier [1] http://jira.codehaus.org/browse/MJAR-30 2008/1/10, amit kumar [EMAIL PROTECTED]: HI, Just like WAR can I as well exclude some files from JAR builds as well? I have used this, but not working. /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.1/version executions execution goals goaljar/goal /goals /execution /executions configuration excludes**/*.xsd/excludes schemaDirectorysrc/schema/xsd/schemaDirectory /configuration /plugin Am I missing something? Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excluding files from JAR
Hi Simon, Being totally unaware of ANT although I tried but of no use. I used this with google's help plugin artifactIdmaven-antrun-plugin/artifactId executions execution phaseprepare-package/phase configuration tasks target name=jar-file depends=compile-src,copy jar destfile=${root}/target/file.jar basedir=${build} excludes=*.xsd,*.xsb / /target /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin Where am I lacking? Regards, Amit On Jan 10, 2008 9:45 PM, amit kumar [EMAIL PROTECTED] wrote: Hi, I have downloaded the patches from the link mentioned by you. But I don't know how to apply them. regards, Amit On Jan 10, 2008 6:29 PM, Olivier Lamy [EMAIL PROTECTED] wrote: Hi, No you don't miss something here. It's a know issue [1] and it's fixed in trunk. You can try last snapshot to test the fix. -- Olivier [1] http://jira.codehaus.org/browse/MJAR-30 2008/1/10, amit kumar [EMAIL PROTECTED]: HI, Just like WAR can I as well exclude some files from JAR builds as well? I have used this, but not working. /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.1/version executions execution goals goaljar/goal /goals /execution /executions configuration excludes**/*.xsd/excludes schemaDirectorysrc/schema/xsd/schemaDirectory /configuration /plugin Am I missing something? Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dependency version range not working. The artifact has no valid ranges is given when it certainly looks like it has a valid range.
Thanks. Looks like I had another library that I was dependent on that still had a dependency on the 2.1 branch of the dba.library. This is actually a good thing as this kind of inconsistent dependency could have burned me in runtime. But it would have been nice if maven gave me a better error message explaining the problem. The error messages said I had no valid ranges when in fact I had valid ranges, they were just too many of them! It should explicitly say that it has an over constrained dependency. Thanks again. -Original Message- From: Michael McCallum [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 2:40 PM To: Maven Users List Subject: Re: Dependency version range not working. The artifact has no valid ranges is given when it certainly looks like it has a valid range. For some reason the over constrained exception is hidden try mvn dependency:resolve -X and look for the OverConstrainedException which means you have two non overlapping ranges for the same artifact in the resolution tree On Thu, 10 Jan 2008 08:14:05 Chris Andersen wrote: New user to maven. Loving it so far. But I've encountered a real hair puller. I have a controller project that uses maven to manage its dependencies. One of its dependencies is on a library (dba.library) that is also built using maven. The library has two release branches (current versions are 2.1.10 and 2.2.5). I'm in the process of switching the controller from using the 2.1 release of the library to using the 2.2 release. mvn -version output: Maven version: 2.0.8 Java version: 1.5.0_10] OS name: linux version: 2.4.21-32.0.1.el arch: i386 Family: unix The controller pom.xml had the following dependency: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version[2.1,2.2)/version optionaltrue/optional /dependency Which worked just fine. It consistently gives me the 2.1.10 version of the jar. I changed it to: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version[2.2,2.3)/version optionaltrue/optional /dependency Thinking this would give me the 2.2.5 version of the jar. Instead, I got the following errors: [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. The artifact has no valid ranges com.metro1:dba.library:jar:2.2.5 Path to dependency: 1) com.metro1:skynet-controller:jar:3.6.8-SNAPSHOT If I change the dependency to specify the current build of the 2.2 dba.library: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.2.5/version optionaltrue/optional /dependency Then the dependency is picked up just fine. Am I doing something wrong? For additional info, here's the maven-metadata-central.xml file for dba.library from my local repository: ?xml version=1.0 encoding=UTF-8?metadata groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.1.10/version versioning release2.2.5/release versions version2.1.10/version version2.2.5/version /versions lastUpdated20080109183939/lastUpdated /versioning /metadata And here's maven-metadata-local.xml: ?xml version=1.0 encoding=UTF-8?metadata groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.1.10/version versioning versions version2.1.10/version version2.2.5/version /versions lastUpdated20080109183936/lastUpdated /versioning /metadata Any help would be appreciated. -- Michael McCallum Enterprise Engineer mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-changes-plugin / Problem
Hi Dennis, first of all thanks for the reply... That should make the plugin create *only* the changes-report. Yeah, but the message i got is already there... But i have figured out the following: urlhttp://supose.soebes.de/url If i add simply a trailing slash to this url all links in the changes report now a correctly linked... Kind regards Karl Heinz Marbaise -- SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 Würselen http://www.soebes.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dependency version range not working. The artifact has no valid ranges is given when it certainly looks like it has a valid range.
yes better message would be good you might want to change your deps to [2.1,2.2-!) other wise if you someone deploys a 2.2-SNAPSHOT its calculated as 2.2 and included in the range [2.1,2.2) On Fri, 11 Jan 2008 06:40:16 Chris Andersen wrote: Thanks. Looks like I had another library that I was dependent on that still had a dependency on the 2.1 branch of the dba.library. This is actually a good thing as this kind of inconsistent dependency could have burned me in runtime. But it would have been nice if maven gave me a better error message explaining the problem. The error messages said I had no valid ranges when in fact I had valid ranges, they were just too many of them! It should explicitly say that it has an over constrained dependency. Thanks again. -Original Message- From: Michael McCallum [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 2:40 PM To: Maven Users List Subject: Re: Dependency version range not working. The artifact has no valid ranges is given when it certainly looks like it has a valid range. For some reason the over constrained exception is hidden try mvn dependency:resolve -X and look for the OverConstrainedException which means you have two non overlapping ranges for the same artifact in the resolution tree On Thu, 10 Jan 2008 08:14:05 Chris Andersen wrote: New user to maven. Loving it so far. But I've encountered a real hair puller. I have a controller project that uses maven to manage its dependencies. One of its dependencies is on a library (dba.library) that is also built using maven. The library has two release branches (current versions are 2.1.10 and 2.2.5). I'm in the process of switching the controller from using the 2.1 release of the library to using the 2.2 release. mvn -version output: Maven version: 2.0.8 Java version: 1.5.0_10] OS name: linux version: 2.4.21-32.0.1.el arch: i386 Family: unix The controller pom.xml had the following dependency: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version[2.1,2.2)/version optionaltrue/optional /dependency Which worked just fine. It consistently gives me the 2.1.10 version of the jar. I changed it to: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version[2.2,2.3)/version optionaltrue/optional /dependency Thinking this would give me the 2.2.5 version of the jar. Instead, I got the following errors: [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. The artifact has no valid ranges com.metro1:dba.library:jar:2.2.5 Path to dependency: 1) com.metro1:skynet-controller:jar:3.6.8-SNAPSHOT If I change the dependency to specify the current build of the 2.2 dba.library: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.2.5/version optionaltrue/optional /dependency Then the dependency is picked up just fine. Am I doing something wrong? For additional info, here's the maven-metadata-central.xml file for dba.library from my local repository: ?xml version=1.0 encoding=UTF-8?metadata groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.1.10/version versioning release2.2.5/release versions version2.1.10/version version2.2.5/version /versions lastUpdated20080109183939/lastUpdated /versioning /metadata And here's maven-metadata-local.xml: ?xml version=1.0 encoding=UTF-8?metadata groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.1.10/version versioning versions version2.1.10/version version2.2.5/version /versions lastUpdated20080109183936/lastUpdated /versioning /metadata Any help would be appreciated. -- Michael McCallum Enterprise Engineer mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
outputDirectory for hibernate3-maven-plugin not working properly
Hi, I am using the maven plugin to generate java pojo's from hibernate mapping files(hbm.xml). Here is the plugin details in pom.xml. plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.0-alpha-2/version configuration hibernate configurationFile/src/main/resources/hibernate.cfg.xml/configurationFile /hibernate outputDirectory hbm2javasrc/main/java/hbm2java /outputDirectory /configuration /plugin When i run mvn hibernate3:hbm2java command, the POJO's are created but in the target folder target/src/java not in the src folder src/main/java. Can anyone tell me what the problem is? -- View this message in context: http://www.nabble.com/outputDirectory-for-hibernate3-maven-plugin-not-working-properly-tp14742354s177p14742354.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven2 dependencies
Hi, is it possible to specify that a dependency is always needed for compilation, unit testing and plugin execution (jetty plugin) only? That is, it should only not be included in my final WAR archive. If so, how can I do it? Thank you -- Filipe David Manana, [EMAIL PROTECTED] Obvious facts are like secrets to those not trained to see them.
RE: Dependency version range not working. The artifact has no valid ranges is given when it certainly looks like it has a valid range.
Thanks -Original Message- From: Michael McCallum [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 10:57 AM To: Maven Users List Subject: Re: Dependency version range not working. The artifact has no valid ranges is given when it certainly looks like it has a valid range. yes better message would be good you might want to change your deps to [2.1,2.2-!) other wise if you someone deploys a 2.2-SNAPSHOT its calculated as 2.2 and included in the range [2.1,2.2) On Fri, 11 Jan 2008 06:40:16 Chris Andersen wrote: Thanks. Looks like I had another library that I was dependent on that still had a dependency on the 2.1 branch of the dba.library. This is actually a good thing as this kind of inconsistent dependency could have burned me in runtime. But it would have been nice if maven gave me a better error message explaining the problem. The error messages said I had no valid ranges when in fact I had valid ranges, they were just too many of them! It should explicitly say that it has an over constrained dependency. Thanks again. -Original Message- From: Michael McCallum [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 09, 2008 2:40 PM To: Maven Users List Subject: Re: Dependency version range not working. The artifact has no valid ranges is given when it certainly looks like it has a valid range. For some reason the over constrained exception is hidden try mvn dependency:resolve -X and look for the OverConstrainedException which means you have two non overlapping ranges for the same artifact in the resolution tree On Thu, 10 Jan 2008 08:14:05 Chris Andersen wrote: New user to maven. Loving it so far. But I've encountered a real hair puller. I have a controller project that uses maven to manage its dependencies. One of its dependencies is on a library (dba.library) that is also built using maven. The library has two release branches (current versions are 2.1.10 and 2.2.5). I'm in the process of switching the controller from using the 2.1 release of the library to using the 2.2 release. mvn -version output: Maven version: 2.0.8 Java version: 1.5.0_10] OS name: linux version: 2.4.21-32.0.1.el arch: i386 Family: unix The controller pom.xml had the following dependency: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version[2.1,2.2)/version optionaltrue/optional /dependency Which worked just fine. It consistently gives me the 2.1.10 version of the jar. I changed it to: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version[2.2,2.3)/version optionaltrue/optional /dependency Thinking this would give me the 2.2.5 version of the jar. Instead, I got the following errors: [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. The artifact has no valid ranges com.metro1:dba.library:jar:2.2.5 Path to dependency: 1) com.metro1:skynet-controller:jar:3.6.8-SNAPSHOT If I change the dependency to specify the current build of the 2.2 dba.library: dependency groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.2.5/version optionaltrue/optional /dependency Then the dependency is picked up just fine. Am I doing something wrong? For additional info, here's the maven-metadata-central.xml file for dba.library from my local repository: ?xml version=1.0 encoding=UTF-8?metadata groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.1.10/version versioning release2.2.5/release versions version2.1.10/version version2.2.5/version /versions lastUpdated20080109183939/lastUpdated /versioning /metadata And here's maven-metadata-local.xml: ?xml version=1.0 encoding=UTF-8?metadata groupIdcom.metro1/groupId artifactIddba.library/artifactId version2.1.10/version versioning versions version2.1.10/version version2.2.5/version /versions lastUpdated20080109183936/lastUpdated /versioning /metadata Any help would be appreciated. -- Michael McCallum Enterprise Engineer mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven2 dependencies
On Thu, 2008-01-10 at 21:42 +0100, Filipe David Manana wrote: Hi, is it possible to specify that a dependency is always needed for compilation, unit testing and plugin execution (jetty plugin) only? That is, it should only not be included in my final WAR archive. No. But I think you can define it as scope=provided, and then have a separate profile for running jetty, where it is declared with scope=runtime. You would then need to run jetty via mvn -PtheProfileName jetty:run Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven2 dependencies
And is it possible to automatically trigger a profile based on the requested goal (like jetty:run) ? Let's say, I would have different profiles for different goals. (just to avoid explicitly specifying the profile to use) On Jan 10, 2008 9:51 PM, simon [EMAIL PROTECTED] wrote: On Thu, 2008-01-10 at 21:42 +0100, Filipe David Manana wrote: Hi, is it possible to specify that a dependency is always needed for compilation, unit testing and plugin execution (jetty plugin) only? That is, it should only not be included in my final WAR archive. No. But I think you can define it as scope=provided, and then have a separate profile for running jetty, where it is declared with scope=runtime. You would then need to run jetty via mvn -PtheProfileName jetty:run Regards, Simon -- Filipe David Manana, [EMAIL PROTECTED] Obvious facts are like secrets to those not trained to see them.
Re: Cobertura plugin
Danger! Will Robinson! Danger! How will you know that instrumenting your tests is not causing them to pass? Seriously, we had hand tweaked the pom to run the tests only once when they were instrumented, and as the instrumentation was forcing synchronisation (in order to track code path execution) it was eliminating a major concurrency bug that our unit tests were trying to prove was not there... IMHO, you _want_ to run the tests twice. -Stephen On Jan 10, 2008 12:26 PM, globulon [EMAIL PROTECTED] wrote: Houdy, I am newby to Maven 2. I have Introduced the Cobertura plugin in the reporting section of the pom.xml file of my main project as follows: reporting ... plugins !-- - JUNIT test report activation -- plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-report-plugin/artifactId /plugin !-- - Cobertura Code coverage module -- plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId configuration formats formathtml/format /formats instrumentation/ check !-- should not stop in case of Cobertura reporting error -- haltOnFailurefalse/haltOnFailure /check /configuration /plugin /plugins ... /reporting It works fine. As I am also using the surefire reporting, it seems the test phase is run twice, one by surefire and once by cobertura. Is there any way to instrument code before surefire execution for the two plugin to share the same test sequence ? Thanx for your response ? -- View this message in context: http://www.nabble.com/Cobertura-plugin-tp14731193s177p14731193.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
possible maven defect?
We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT/uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} Reason: Cannot find parent: org.apache.uima:uimaj-ee for project: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} for project org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} I found (as a workaround) that if I modified the parent POM to have no children (commenting out the module elements), then mvn install for the parent POM would run; furthermore, I could then uncomment out the module children and mvn install on the parent POM would now build the children OK (I guess because the parent POM was findable in the local repository). This problem doesn't seem to occur if the parent POM doesn't use substitutable property values for its own version number. In that case the parent POM need not be previously installed in the local repository. Is this expected behavior in Maven, or is this a defect? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: - possible maven defect?
Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT /uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] -- -- [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} Reason: Cannot find parent: org.apache.uima:uimaj-ee for project: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} for project org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} I found (as a workaround) that if I modified the parent POM to have no children (commenting out the module elements), then mvn install for the parent POM would run; furthermore, I could then uncomment out the module children and mvn install on the parent POM would now build the children OK (I guess because the parent POM was findable in the local repository). This problem doesn't seem to occur if the parent POM doesn't use substitutable property values for its own version number. In that case the parent POM need not be previously installed in the local repository. Is this expected behavior in Maven, or is this a defect? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Surefire2.3] Resources classpath problem
Yes this does appear to be a problem still in Maven 2.0.8 and I've raised what seems to be a similar issue here: http://jira.codehaus.org/browse/SUREFIRE-427 Although my issue is focusing on test-resources completely missing in the test-classpath. -- Cory Olivier Catteau wrote: Hello, We have a few problems with the classpath used by surefire. Some tests fail randomly due to the order of the classpath managed by Surefire. During the execution of unit tests, it seems that the classpath used by maven differs from the classpath used by my IDE (IntelliJ). In IntelliJ, resources are loaded with the following order : /target/test-classes /target/classes .../aLib.jar .../anotherLib.jar ... But, by using maven2, the order is : ... .../aLib.jar /target/test-classes /target/classes .../anotherLib.jar ... Our projects use Surefire2.3. Is it possible to patch surefire to get a correct classpath (such as IntelliJ) ? Has this bug been fixed with maven2.0.8 ? Thanks. Regards, Alexandre Bunod and Olivier Catteau - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: - possible maven defect?
William Ferguson wrote: Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William Hi William - I must have not communicated well. All of the libraries are manged by Maven. The situation where the failure occurs is like a startup - when a user first checks out the set of projects (having child POMs) and the main parent POM, then tries to do a mvn install on the parent. (I'm assuming here that they check out a development level, where the components have not been installed to any repository, yet). This first mvn install is intended to install of the parts into the local repository, but it only works if you don't use ${ ... } variable substitution in the way I was trying to use it. My question is whether this limitation on use of variable substitution is a maven defect, or whether it is working as designed (in which case - I'd appreciate learning what the philosophy is behind this design choice). -Marshall -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT /uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] -- -- [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} Reason: Cannot find parent: org.apache.uima:uimaj-ee for project: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} for project org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} I found (as a workaround) that if I modified the parent POM to have no children (commenting out the module elements), then mvn install for the parent POM would run; furthermore, I could then uncomment out the module children and mvn install on the parent POM would now build the children OK (I guess because the parent POM was findable in the local repository). This problem doesn't seem to occur if the parent POM doesn't use substitutable property values for its own version number. In that case the parent POM need not be previously installed in the local repository. Is this expected behavior in Maven, or is this a defect? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excluding files from JAR
I don't think Simon is telling you to use Ant's jar command -- instead he is suggesting that you use Ant's delete task to physically remove the unwanted files out of /target/ before allowing Maven to do its own packaging step. (Right, Simon?) You would probably want to bind this to prepare-package as you have done below. Here's the Ant Delete task page: http://ant.apache.org/manual/CoreTasks/delete.html Also, you should be using -X to get full debugging information. And if it doesn't work this time, please reply back with a lot more details about what exactly happened when you tried this eg what errors were reported, what seemed to happen, etc. Simply saying it didn't work tells us absolutely nothing about what actually happened vs what you were expecting etc. Wayne On 1/10/08, amit kumar [EMAIL PROTECTED] wrote: Hi Simon, Being totally unaware of ANT although I tried but of no use. I used this with google's help plugin artifactIdmaven-antrun-plugin/artifactId executions execution phaseprepare-package/phase configuration tasks target name=jar-file depends=compile-src,copy jar destfile=${root}/target/file.jar basedir=${build} excludes=*.xsd,*.xsb / /target /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin Where am I lacking? Regards, Amit On Jan 10, 2008 9:45 PM, amit kumar [EMAIL PROTECTED] wrote: Hi, I have downloaded the patches from the link mentioned by you. But I don't know how to apply them. regards, Amit On Jan 10, 2008 6:29 PM, Olivier Lamy [EMAIL PROTECTED] wrote: Hi, No you don't miss something here. It's a know issue [1] and it's fixed in trunk. You can try last snapshot to test the fix. -- Olivier [1] http://jira.codehaus.org/browse/MJAR-30 2008/1/10, amit kumar [EMAIL PROTECTED]: HI, Just like WAR can I as well exclude some files from JAR builds as well? I have used this, but not working. /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.1/version executions execution goals goaljar/goal /goals /execution /executions configuration excludes**/*.xsd/excludes schemaDirectorysrc/schema/xsd/schemaDirectory /configuration /plugin Am I missing something? Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: - possible maven defect?
My apologies Marshall, not quite sure how it occurred but my answer was for an entirely different question by someone else. To answer your question, Maven seems to be working largely as designed. I'm actually surprised that your child POMs could build in any scenario if their reference to the parent POM contains a build property only found in the parent POM. Because that would be a circular reference. You should really have groupId, artifactId and version hard-coded in all POMs. The standard Maven way of doing things would be to have the version hard-coded with a similar value as the version of the parent in the child POMs. You would then use the release-plugin to manage the increment of the version. Is there a particular reason that you needed to define ? uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT/uimaj-re lease-version I think you need to reconsider your project version. I think you want it as 0.7.0-SNAPSHOT. incubating would seem to belong as part of an artifactId or assembly annotation (see the asembly plugin). I hope this helps. William -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 10:06 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - Re: - possible maven defect? - Sender is forged (SPF Fail) William Ferguson wrote: Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William Hi William - I must have not communicated well. All of the libraries are manged by Maven. The situation where the failure occurs is like a startup - when a user first checks out the set of projects (having child POMs) and the main parent POM, then tries to do a mvn install on the parent. (I'm assuming here that they check out a development level, where the components have not been installed to any repository, yet). This first mvn install is intended to install of the parts into the local repository, but it only works if you don't use ${ ... } variable substitution in the way I was trying to use it. My question is whether this limitation on use of variable substitution is a maven defect, or whether it is working as designed (in which case - I'd appreciate learning what the philosophy is behind this design choice). -Marshall -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT /uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] -- -- [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} Reason: Cannot find parent: org.apache.uima:uimaj-ee for project: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} for project org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} I found (as a workaround) that if I modified the parent POM to have no children (commenting out the module elements), then mvn install for the parent POM would run; furthermore, I could then uncomment out the module children and mvn install on the parent POM would now build the children OK (I guess because the parent POM was findable in the local repository). This problem doesn't seem to occur if the parent POM doesn't use substitutable property values for its own version number. In that case the parent POM need not be previously installed in the local repository. Is this expected behavior in Maven, or is this a defect? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: - possible maven defect?
not a defect and IMO you should never install parents you can just do an install on the parent with mvn -N for my projects any user first gets a settings.xml and then can check out and build any artifact in isotation without the need to mvn install anything relying on the parent to inherit version numbers etc gets pretty ugly and error prone you would be best to encasulate dependencies like that in a pom project On Fri, 11 Jan 2008 13:05:37 Marshall Schor wrote: William Ferguson wrote: Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William Hi William - I must have not communicated well. All of the libraries are manged by Maven. The situation where the failure occurs is like a startup - when a user first checks out the set of projects (having child POMs) and the main parent POM, then tries to do a mvn install on the parent. (I'm assuming here that they check out a development level, where the components have not been installed to any repository, yet). This first mvn install is intended to install of the parts into the local repository, but it only works if you don't use ${ ... } variable substitution in the way I was trying to use it. My question is whether this limitation on use of variable substitution is a maven defect, or whether it is working as designed (in which case - I'd appreciate learning what the philosophy is behind this design choice). -Marshall -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT /uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] -- -- [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} Reason: Cannot find parent: org.apache.uima:uimaj-ee for project: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} for project org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} I found (as a workaround) that if I modified the parent POM to have no children (commenting out the module elements), then mvn install for the parent POM would run; furthermore, I could then uncomment out the module children and mvn install on the parent POM would now build the children OK (I guess because the parent POM was findable in the local repository). This problem doesn't seem to occur if the parent POM doesn't use substitutable property values for its own version number. In that case the parent POM need not be previously installed in the local repository. Is this expected behavior in Maven, or is this a defect? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael McCallum Enterprise Engineer mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: - possible maven defect?
Thank you for your reply. I tried to look up what the command line parameter -N was for maven - but couldn't find any reference to it. Can you please point me to where the command line parameters for maven are defined so I can learn what this does? I'm a little confused on why parents are not to be installed. Did you mean that parents shouldn't be installed using the mvn install command? Thanks for your help. -Marshall Michael McCallum wrote: not a defect and IMO you should never install parents you can just do an install on the parent with mvn -N for my projects any user first gets a settings.xml and then can check out and build any artifact in isotation without the need to mvn install anything relying on the parent to inherit version numbers etc gets pretty ugly and error prone you would be best to encasulate dependencies like that in a pom project On Fri, 11 Jan 2008 13:05:37 Marshall Schor wrote: William Ferguson wrote: Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William Hi William - I must have not communicated well. All of the libraries are manged by Maven. The situation where the failure occurs is like a startup - when a user first checks out the set of projects (having child POMs) and the main parent POM, then tries to do a mvn install on the parent. (I'm assuming here that they check out a development level, where the components have not been installed to any repository, yet). This first mvn install is intended to install of the parts into the local repository, but it only works if you don't use ${ ... } variable substitution in the way I was trying to use it. My question is whether this limitation on use of variable substitution is a maven defect, or whether it is working as designed (in which case - I'd appreciate learning what the philosophy is behind this design choice). -Marshall -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT /uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] -- -- [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} Reason: Cannot find parent: org.apache.uima:uimaj-ee for project: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} for project org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} I found (as a workaround) that if I modified the parent POM to have no children (commenting out the module elements), then mvn install for the parent POM would run; furthermore, I could then uncomment out the module children and mvn install on the parent POM would now build the children OK (I guess because the parent POM was findable in the local repository). This problem doesn't seem to occur if the parent POM doesn't use substitutable property values for its own version number. In that case the parent POM need not be previously installed in the local repository. Is this expected behavior in Maven, or is this a defect? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: - possible maven defect?
William Ferguson wrote: My apologies Marshall, not quite sure how it occurred but my answer was for an entirely different question by someone else. To answer your question, Maven seems to be working largely as designed. I'm actually surprised that your child POMs could build in any scenario if their reference to the parent POM contains a build property only found in the parent POM. Because that would be a circular reference. True, but that's not what we're doing, exactly. In our code, the reference to the parent POM *is* *hard-coded, and doesn't contain any references such as ${property-defined-in-parent} for the very reason you describe. You should really have groupId, artifactId and version hard-coded in all POMs. Well, that's the question. We have groupId and artifactId hard-coded. The version *is* inheriting from the parent, via a ${property-defined-in-parent} (*this is working*). What's not working is the parent itself being able to have a ${property-defined-in-itself} value for the version value. The standard Maven way of doing things would be to have the version hard-coded with a similar value as the version of the parent in the child POMs. You would then use the release-plugin to manage the increment of the version. Is there a particular reason that you needed to define ? uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT/uimaj-release-version I think you need to reconsider your project version. I think you want it as 0.7.0-SNAPSHOT. incubating would seem to belong as part of an artifactId or assembly annotation (see the asembly plugin). I hope this helps. Because we are a project in the Apache Incubator, our version names include the word incubator in them to insure that users realize they are working with an incubating project. The reason we define version numbers this way is that we have some conflicting naming standards - some require 0.7.0-incubating-SNAPSHOT, while others (Eclipse plugins, in particular) want 0.7.0.incubating-SNAPSHOT (not the . instead of the '-' in front of the word incubating. So we thought that we could put all this kind of stuff in one common, factored out, parent, and be done with it :-) -Marshall William -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 10:06 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - Re: - possible maven defect? - Sender is forged (SPF Fail) William Ferguson wrote: Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William Hi William - I must have not communicated well. All of the libraries are manged by Maven. The situation where the failure occurs is like a startup - when a user first checks out the set of projects (having child POMs) and the main parent POM, then tries to do a mvn install on the parent. (I'm assuming here that they check out a development level, where the components have not been installed to any repository, yet). This first mvn install is intended to install of the parts into the local repository, but it only works if you don't use ${ ... } variable substitution in the way I was trying to use it. My question is whether this limitation on use of variable substitution is a maven defect, or whether it is working as designed (in which case - I'd appreciate learning what the philosophy is behind this design choice). -Marshall -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT /uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] -- -- [INFO] Error building POM (may not be this project's POM). Project ID:
Re: - possible maven defect?
Marshall Schor wrote: Thank you for your reply. I tried to look up what the command line parameter -N was for maven - but couldn't find any reference to it. Can you please point me to where the command line parameters for maven are defined so I can learn what this does? I found documentation for this by typing mvn -?. mvn -N install on the parent would appear to install the parent to the local repo, without executing the subgoals. -Marshall I'm a little confused on why parents are not to be installed. Did you mean that parents shouldn't be installed using the mvn install command? Thanks for your help. -Marshall Michael McCallum wrote: not a defect and IMO you should never install parents you can just do an install on the parent with mvn -N for my projects any user first gets a settings.xml and then can check out and build any artifact in isotation without the need to mvn install anything relying on the parent to inherit version numbers etc gets pretty ugly and error prone you would be best to encasulate dependencies like that in a pom project On Fri, 11 Jan 2008 13:05:37 Marshall Schor wrote: William Ferguson wrote: Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William Hi William - I must have not communicated well. All of the libraries are manged by Maven. The situation where the failure occurs is like a startup - when a user first checks out the set of projects (having child POMs) and the main parent POM, then tries to do a mvn install on the parent. (I'm assuming here that they check out a development level, where the components have not been installed to any repository, yet). This first mvn install is intended to install of the parts into the local repository, but it only works if you don't use ${ ... } variable substitution in the way I was trying to use it. My question is whether this limitation on use of variable substitution is a maven defect, or whether it is working as designed (in which case - I'd appreciate learning what the philosophy is behind this design choice). -Marshall -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT /uimaj-release-version . . . version0.7.0-incubating-SNAPSHOT/version I noticed I might be able to replace the version0.7.0-incubating-SNAPSHOT/version with version${uimaj-ee-release-version}/version This only kind of worked. The way it would fail, would be if there were no existing versions of the parent POM in any repository, then the mvn install command for the parent POM would fail when scanning the child POMs, saying, for example: [ERROR] FATAL ERROR [INFO] -- -- [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} Reason: Cannot find parent: org.apache.uima:uimaj-ee for project: org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} for project org.apache.uima:uimaj-ee-core:jar:${uimaj-ee-release-version} I found (as a workaround) that if I modified the parent POM to have no children (commenting out the module elements), then mvn install for the parent POM would run; furthermore, I could then uncomment out the module children and mvn install on the parent POM would now build the children OK (I guess because the parent POM was findable in the local repository). This problem doesn't seem to occur if the parent POM doesn't use substitutable property values for its own version number. In that case the parent POM need not be previously installed in the local repository. Is this expected behavior in Maven, or is this a defect? -Marshall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: - possible maven defect?
From what you've said it seems that all your problems are solved by hardcoding the version in the parent. Ie don't use the property. Which is standard practice. I don't know what causes the problem that you are describing, but if it goes away when you stop punishing yourself with it then that would be a good option IMHO. William -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 12:42 PM To: Maven Users List Subject: [***POSSIBLE SPAM***] - Re: - possible maven defect? - Sender is forged (SPF Fail) William Ferguson wrote: My apologies Marshall, not quite sure how it occurred but my answer was for an entirely different question by someone else. To answer your question, Maven seems to be working largely as designed. I'm actually surprised that your child POMs could build in any scenario if their reference to the parent POM contains a build property only found in the parent POM. Because that would be a circular reference. True, but that's not what we're doing, exactly. In our code, the reference to the parent POM *is* *hard-coded, and doesn't contain any references such as ${property-defined-in-parent} for the very reason you describe. You should really have groupId, artifactId and version hard-coded in all POMs. Well, that's the question. We have groupId and artifactId hard-coded. The version *is* inheriting from the parent, via a ${property-defined-in-parent} (*this is working*). What's not working is the parent itself being able to have a ${property-defined-in-itself} value for the version value. The standard Maven way of doing things would be to have the version hard-coded with a similar value as the version of the parent in the child POMs. You would then use the release-plugin to manage the increment of the version. Is there a particular reason that you needed to define ? uimaj-ee-version0.7.0/uimaj-version uimaj-ee-release-version${uimaj-version}-incubating-SNAPSHOT/uimaj- release-version I think you need to reconsider your project version. I think you want it as 0.7.0-SNAPSHOT. incubating would seem to belong as part of an artifactId or assembly annotation (see the asembly plugin). I hope this helps. Because we are a project in the Apache Incubator, our version names include the word incubator in them to insure that users realize they are working with an incubating project. The reason we define version numbers this way is that we have some conflicting naming standards - some require 0.7.0-incubating-SNAPSHOT, while others (Eclipse plugins, in particular) want 0.7.0.incubating-SNAPSHOT (not the . instead of the '-' in front of the word incubating. So we thought that we could put all this kind of stuff in one common, factored out, parent, and be done with it :-) -Marshall William -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 10:06 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - Re: - possible maven defect? - Sender is forged (SPF Fail) William Ferguson wrote: Marshall, the standard solution for what you are attempting would be to install/deploy those libraries not managed by Maven into your own repository or corporate repository and then you *would* have access to them. William Hi William - I must have not communicated well. All of the libraries are manged by Maven. The situation where the failure occurs is like a startup - when a user first checks out the set of projects (having child POMs) and the main parent POM, then tries to do a mvn install on the parent. (I'm assuming here that they check out a development level, where the components have not been installed to any repository, yet). This first mvn install is intended to install of the parts into the local repository, but it only works if you don't use ${ ... } variable substitution in the way I was trying to use it. My question is whether this limitation on use of variable substitution is a maven defect, or whether it is working as designed (in which case - I'd appreciate learning what the philosophy is behind this design choice). -Marshall -Original Message- From: Marshall Schor [mailto:[EMAIL PROTECTED] Sent: Friday, 11 January 2008 9:40 AM To: Maven Users List Subject: [***POSSIBLE SPAM***] - possible maven defect? - Sender is forged (SPF Fail) We define shared values as property elements in a parent POM and use them in child POMs. We have fragments like this, near the top of the parent POM: . . . properties . . . uimaj-ee-version0.7.0/uimaj-version
Re: How can I specify different configurations for one plugin with multiple goals?
[EMAIL PROTECTED] wrote: Hi, I´m using the maven-depgraph-plugin to generate dependency-visualization graphics, which I want to include in the generated website. This plugin has 2 goals and I need a different configuration for each goal 1) for depgraph goal no groupFilter is necessary, I want to see all the dependencies 2) for fullgraph goal a groupFilter com.mycompany is necessary, I want to see only the com.mycompany module dependencies. I tried to configure it like below, but it doesn´t work. [...] I'd say what you're trying to do really is desirable behaviour. If that doesn't work, try the usual workaround: put each config in a profile ... -dirk -- A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
plug-in vs dependency
What is the difference between a plug-in and a dependency? Examples? -- View this message in context: http://www.nabble.com/plug-in-vs-dependency-tp14750516s177p14750516.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error on maven-clean-plugin
simon a écrit : On Wed, 2008-01-09 at 11:35 +0100, François Xavier Gendrin wrote: Hi, I updated some plugin and crash, an error. Error says to specify: '-Dproject.reporting.outputDirectory=VALUE', but I prefer to use pom configuration file, but I didn't find how to configure it with pom file ... Some one could help ? Have you tried adding this at the bottom of your pom? properties project.reporting.outputDirectory VALUE /project.reporting.outputDirectory /properties I add reporting.outputDirectory./reporting.outputDirectory or project.reporting.outputDirectory./project.reporting.outputDirectory in properties tag, but nothing change. Best regards, -- François Xavier Gendrin IT Engineer [EMAIL PROTECTED] __ STORE ELECTRONIC SYSTEMS 1-7 rue Henri de France 95870 Bezons - France Tél. : + 33 1 34 34 61 61 Fax : + 33 1 34 34 61 62 www.store-electronic-systems.com www.ses-esl.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]