Re: Plugin insantiation: once per execution? Once per build?
Hi, I suppose that you ask that.because you're writing a mojo yourself. I don't know the answer but it seems to me it would quite simple to check it by code: just add a log in your constructor and see if displays once or many times. By the way, also think abt thread-safing your code to prevent having bugs using -T switch. Cheers Le 7 sept. 2011 21:21, Laird Nelson ljnel...@gmail.com a écrit : What is the lifespan of a Mojo? Is a new one created for each execution? Is it discarded thereafter, or does Maven retain a reference to it? Or is only one created and then reconfigured/reset? I didn't find any obvious documentation explaining this, but as usual my apologies if I've overlooked something. Thanks, Laird -- http://about.me/lairdnelson
Re: -gs does not apply to the forked maven execution in release:prepare
Hi, I don't know if it was the original motivation, but at least this gives us kind of a feature. Releasing is a particular milestone in a project lifecycle. So having to think twice abt it is not totally bad imo. For example, passing -DskipTests during a release would be plain nonsense to me. And you might end up doing this kind of thing without a conscious choice. -Darguments forces you to think: ok this is what I want to pass to my release. Cheers Le 4 sept. 2011 20:51, Ansgar Konermann ansgar.konerm...@googlemail.com a écrit : Am 04.09.2011 20:43 schrieb Benson Margulies bimargul...@gmail.com: On Sun, Sep 4, 2011 at 2:34 PM, Ansgar Konermann ansgar.konerm...@googlemail.com wrote: Am 04.09.2011 20:29 schrieb Brian Fox bri...@infinity.nu: Release forks the build and therefore not all the parameters are passed through. There is a parameter for the plugin though to specify which agurments to pass, I forget what it is, but I'm sure you know how to find it ;-) -Darguments=... I wonder: why? Does anyone know a use case in which it's important to make the setttings or global settings different in the forked execution? I'm not a Maven guru, but no, all the use cases I encountered involved passing the same set of parameters to the forked lifecycle. I'd also love to understand the motivation behind making this *not* the default behaviour. Best Ansgar On Sun, Sep 4, 2011 at 1:48 PM, Benson Margulies bimargul...@gmail.com wrote: I was a bit taken aback when a run of the maven release plugin failed because I ran mvn -gs my_settings.xml release:prepare and then the build couldn't find the repositories from the global settings? Is there really on purpose, or should I write up a JIRA? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Site plugin in maven 3.
Hi, See comments in-line... Michael Haefele wrote: The question on using site with aggregated projects got me to trying out the maven 3 version of the site plugin.. Thought I'd post a little list of the steps required and a report card. My use case is I want to generate a site in some directory in a nightly CI build for an aggregated project. I don't really care what the site looks like beyond maybe adding any reporting plugins that sound interesting. I certainly don't want to deploy it anywhere as it's already web accessible as an artifact of the nightly build (this has the added benefit of being able to compare Tuesday's site with Wednesday's site). Basically i want to run the plugin and use whatever the default output is In Maven 2, this use case didn't fare very well (specifically this use case. If this is an outlandish use case, that's fine). Basically I jumped through 4 or 5 flaming hoops and gave up (again, it's a nice to have, but not part of core business in any way, so the last 3 hoops were more out of stubbornness than a good use of my time). So hopefully Maven 3 would be a little more forgiving. Apart from some issues with reporting plugins [1] it shouldn't matter whether you run it with maven 2 or 3, it's rather a question of which version of the site-plugin you're using. Version 3 of the site plugin is compatible with maven 2 and 3. [1] http://maven.apache.org/plugins/maven-site-plugin/maven-3.html To get started, I followed the link sent in the other post. ( http://maven.apache.org/**plugins/maven-site-plugin/faq.** html#Why_dont_the_links_**between_parent_and_child_** modules_work_when_I_run_mvn_**sitehttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_dont_the_links_between_parent_and_child_modules_work_when_I_run_mvn_site ) I need to use site:stage, but this requires the site to be generated... So... mvn clean site:site mvn site:stage (mvn clean site:site site:stage does not work well I discovered) why not? Yields: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:stage (default-cli) on project pep-parent-dep-mgmt: Missing site information in the distribution management of the project pep-parent-dep-mgmt (com.pep:pep-parent-dep-mgmt:3.10-SNAPSHOT) - [Help 1] So I'll count this as Hoop #1. Why does maven need this information (as in, why can't maven leave this blank or put in a fix-me value)? site:stage is just a local preview of site:deploy for which this information is needed. In particular relative links between modules are constructed using this information. There were lots of problems with this in older versions of the plugin, see [2] and linked issues. So even though in your particular case the distMngmt.site info is not directly needed, it is necessary to ensure that that the staged site is exactly the same as the deployed site. [2] http://jira.codehaus.org/browse/MSITE-533 I tried adding distributionManagement site idwww.yourcompany.com/id urlscp://www.yourcompany.com/www/docs/project//url /site /distributionManagement , straight out of http://maven.apache.org/plugins/maven-site-plugin/usage.html#Deploying_a_Site (even though i'm not actually deploying). But this eventually causes some weird directory names in the site links (they include the scp://), so I took that out and just used url/ that doesn't sound right, do you have a test case? This one actually deployed everything except the grandparent module (we have a grandparent, a parent which has grandparent as parent, and an aggregating project, which does not have the parent or grandparent as a parent) to target/staging/../../../../ (which turned out to be just above my ~ directory). I don't know where all the ../../../ came from (maybe the relativePath in theparent tag?). I can only guess but I assume that you have a complicated project structure, maybe with non-default directory layout? Did you read [3], especially the 'Note' under 'Staging and deploying'? Otherwise please provide a simple test project. [3] http://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html I finally goldilocked on urlmysite/url Which doesn't really make any sense, but seems to do the least crazy to the staging directory structure.. I added this to the aggregating project and the grandparent project mvn clean site:site mvn site:stage This now works except the grandparent project doesn't seem to have it's own directory (clicking on the module link takes you to the staging directory).. But certainly good enough for my purposes.. In summary, I'd probably give the 3.0 site plugin a B- for this use case, which is a HUGE improvement over maven 2. My main issue is with configuring thesite tag, which seems like an unnecessary step if site:stage doesn't need it (especially since getting it wrong can do odd things to where the files are staged). It would be great if this defaulted to
Unable to load the mojo
I am using Maven on a Spring Roo generated project and have pushed in all the aspects and am adding some new behaviors that have new dependencies centered on the Spring Portlet MVC Framework. I am using Eclipse with maven-2.2.1 on mvn package I am getting the following. [ERROR] BUILD ERROR [INFO] [INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-war-plugin:2.1.1:war': Unable to load the mojo 'org.apache.maven.plugins:maven-war-plugin:2.1.1:war' in the plugin 'org.apache.maven.plugins:maven-war-plugin'. A required class is missing: org/codehaus/plexus/components/io/resources/PlexusIoResourceCollection org.codehaus.plexus.components.io.resources.PlexusIoResourceCollection The applicable pom.xml elements are: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.1.1/version /plugin dependency groupIdorg.codehaus.plexus/groupId artifactIdplexus-io/artifactId version1.0.1/version /dependency repositories repository idspring-maven-release/id nameSpring Maven Release Repository/name urlhttp://maven.springframework.org/release/url /repository repository idspring-maven-milestone/id nameSpring Maven Milestone Repository/name urlhttp://maven.springframework.org/milestone/url /repository repository idspring-roo-repository/id nameSpring Roo Repository/name urlhttp://spring-roo-repository.springsource.org/release/url /repository repository idJBoss/id namejboss-maven2-release-repository/name urlhttps://oss.sonatype.org/content/repositories/JBoss/url /repository repository idJBoss Repo/id urlhttps://repository.jboss.org/nexus/content/repositories/releases/url nameJBoss Repo/name /repository repository idspringframework/id nameMaven Spring repository/name urlhttp://repo1.maven.org/maven-spring//url /repository repository idplexus-releases/id namePlexus Releases/name urlhttps://oss.sonatype.org/content/repositories/plexus-releases/url /repository /repositories pluginRepositories pluginRepository idspring-maven-release/id nameSpring Maven Release Repository/name urlhttp://maven.springframework.org/release/url /pluginRepository pluginRepository idspring-maven-milestone/id nameSpring Maven Milestone Repository/name urlhttp://maven.springframework.org/milestone/url /pluginRepository pluginRepository idspring-roo-repository/id nameSpring Roo Repository/name urlhttp://spring-roo-repository.springsource.org/release/url /pluginRepository /pluginRepositories the missing class is in the plexus-io-1.0.1.jar which is located in my local .m2/respository/org/codehaus/plexus/plexus-io/1.0.1 I have done: mvn clean - Success mvn package - Error What am I doing wrong? -- View this message in context: http://maven.40175.n5.nabble.com/Unable-to-load-the-mojo-tp4781494p4781494.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Problem in context loading
Hi, I am building my applications using maven, but a strange thing happens. In one of my java class , i have the code app = new Application(); String[] paths = {applicationContext.xml}; appContext = new ClassPathXmlApplicationContext(paths); So, as per my knowledge, it should search for applicationContext.xml in the classes folder. but when i am building it with maven and deploy it on the server, it starts looking for the applicationContext.xml in /WEB-INF folder. Can you please tell me why it happens. As if i build it using the eclipse and deploy it on the server, it looks for the same file in classes folder. Can you please tell me what is the reaon for such discrepancy in the behaviuor Any help will be greatly appreciated -- View this message in context: http://maven.40175.n5.nabble.com/Problem-in-context-loading-tp4781640p4781640.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Resources tag info required
if i put resources tag in my pom.xml, then it includes only those files and folders which i described in the resources tag and leave all the files and folders which are in the src/main/resources folders. Can you please tell me the reason. Any help is greatly appreciated. -- View this message in context: http://maven.40175.n5.nabble.com/Resources-tag-info-required-tp4781659p4781659.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem in context loading
Hi Anamika, anamika gupta wrote: Hi, I am building my applications using maven, but a strange thing happens. In one of my java class , i have the code app = new Application(); String[] paths = {applicationContext.xml}; appContext = new ClassPathXmlApplicationContext(paths); So, as per my knowledge, it should search for applicationContext.xml in the classes folder. but when i am building it with maven and deploy it on the server, it starts looking for the applicationContext.xml in /WEB-INF folder. Can you please tell me why it happens. As if i build it using the eclipse and deploy it on the server, it looks for the same file in classes folder. Can you please tell me what is the reaon for such discrepancy in the behaviuor Any help will be greatly appreciated Basically this has nothing to do with Maven and does not belong to this list. As a hint you should make yourself familiar with the JavaEE specification for web containers especially looking for the documented classloader behavior. Cheers, Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Resources tag info required
Hi, I've found this behaviour too, quite obviously I resolved by specifing /src/main/resources into resource tag, on the other hand this behaviour it's comprehensible, if you want specify another resource path generally it's because you don't want/need the default path which has to be a priori excluded...otherwise Maven dudes would have to contemplate some boolean tag for default folder inclusion, which in turn exists (and it's really useful) for the files in a resource folder. Cheers -- Daniele On Thu, Sep 8, 2011 at 10:15 AM, anamika gupta anam...@hcl.com wrote: if i put resources tag in my pom.xml, then it includes only those files and folders which i described in the resources tag and leave all the files and folders which are in the src/main/resources folders. Can you please tell me the reason. Any help is greatly appreciated. -- View this message in context: http://maven.40175.n5.nabble.com/Resources-tag-info-required-tp4781659p4781659.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Resources tag info required
Hi Anamika, anamika gupta wrote: if i put resources tag in my pom.xml, then it includes only those files and folders which i described in the resources tag and leave all the files and folders which are in the src/main/resources folders. Can you please tell me the reason. Any help is greatly appreciated. Because you defined now in the POM that Maven should look for the resources elsewhere. Look at the description of the resource plugin how to configure additional places. - Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem in context loading
Hi, this sounds a little bit OT but you can try this: app = new Application(); String[] paths = {*classpath:*applicationContext.xml}; appContext = new ClassPathXmlApplicationContext(paths); however, this is a webapp I assume...you don't have to go through this code with Spring in a webapp... ...then, as said by Jorg, go back to J2EE 101 :)) On Thu, Sep 8, 2011 at 10:31 AM, Jörg Schaible joerg.schai...@scalaris.comwrote: Hi Anamika, anamika gupta wrote: Hi, I am building my applications using maven, but a strange thing happens. In one of my java class , i have the code app = new Application(); String[] paths = {applicationContext.xml}; appContext = new ClassPathXmlApplicationContext(paths); So, as per my knowledge, it should search for applicationContext.xml in the classes folder. but when i am building it with maven and deploy it on the server, it starts looking for the applicationContext.xml in /WEB-INF folder. Can you please tell me why it happens. As if i build it using the eclipse and deploy it on the server, it looks for the same file in classes folder. Can you please tell me what is the reaon for such discrepancy in the behaviuor Any help will be greatly appreciated Basically this has nothing to do with Maven and does not belong to this list. As a hint you should make yourself familiar with the JavaEE specification for web containers especially looking for the documented classloader behavior. Cheers, Jörg - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Resources tag info required
Can you please tell me which tag is that *(for default folder inclusion, which in turn exists )* -- View this message in context: http://maven.40175.n5.nabble.com/Resources-tag-info-required-tp4781659p4781860.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Resources tag info required
otherwise Maven dudes would have to contemplate some boolean tag for default folder inclusion, which in turn exists (and it's really useful) for the files in a resource folder. can u read the comma beetwen default folder inclusion and which in turn exists ? The only thing that you can do , at the moment, is resource/src/main/resources/resource all the best HTH -- Daniele On Thu, Sep 8, 2011 at 11:36 AM, anamika gupta anam...@hcl.com wrote: Can you please tell me which tag is that *(for default folder inclusion, which in turn exists )* -- View this message in context: http://maven.40175.n5.nabble.com/Resources-tag-info-required-tp4781659p4781860.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Get java.lang.NoClassDefFoundError though the class is in the classpath
Hi, How do you mean Move the dependency there? I run the mvn -X and get followings: ... [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 0.125s [INFO] Finished at: Thu Sep 08 14:14:08 CEST 2011 [INFO] Final Memory: 2M/15M [INFO] [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format plugin-prefix:goal or plugin-group-id:plugin-artifact-id[:plugin-version]:goal. Available lifecycle phases are: validate, initialize, generate-sources , process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-te st-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration- test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. - [Help 1] org.apache.maven.lifecycle.NoGoalSpecifiedException: No goals have been specified for this build. You must specify a valid lifecycle phase o r a goal in the format plugin-prefix:goal or plugin-group-id:plugin-artifact-id[:plugin-version]:goal. Available lifecycle phase s are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-te st-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package , package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, s ite, post-site, site-deploy. at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:104) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException ... And my pom.xml looks as follow: ... dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency dependency groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId version1.1.1/version /dependency !-- jax-ws -- dependency groupIdcom.sun.xml.ws/groupId artifactIdjaxws-rt/artifactId version2.1.5/version exclusions exclusion groupIdcom.sun.xml.bind/groupId artifactIdjaxb-impl/artifactId /exclusion exclusion groupIdjavax.xml.bind/groupId artifactIdjaxb-api/artifactId /exclusion exclusion groupIdjavax.xml.stream/groupId artifactIdstax-api/artifactId /exclusion exclusion groupIdjavax.xml.soap/groupId artifactIdsaaj-api/artifactId /exclusion !-- saaj-impl.jar darf auf keinen Fall im WAR landen! Dies führt zu einem Fehler bei pbv-internet-ear.ear -- exclusion groupIdcom.sun.xml.messaging.saaj/groupId artifactIdsaaj-impl/artifactId /exclusion !-- Bei JBoss 'activation' muss ausgeschlossen -- !-- exclusion -- !-- groupIdjavax.activation/groupId -- !-- artifactIdactivation/artifactId -- !-- /exclusion --
Re: Get java.lang.NoClassDefFoundError though the class is in the classpath
Hi, You are right. After I move the dependency into the plugin section, it works. Many thanks! Thomas --- Wayne Fay wayne...@gmail.com schrieb am Mi, 7.9.2011: Von: Wayne Fay wayne...@gmail.com Betreff: Re: Get java.lang.NoClassDefFoundError though the class is in the classpath An: Maven Users List users@maven.apache.org Datum: Mittwoch, 7. September, 2011 16:18 Uhr I know the class com.sun.mirror.apt.AnnotationProcessorFactory is in the tools.jar so I've add the dependency in the pom.xml as follow: systemPathC:/Program Files/Java/jdk1.7.0/lib/tools.jar/systemPath As I run mvn dependency:build-classpath to check the included jars I can see the tools.jar in included. You probably don't want this in your build classpath but perhaps added to the classpath of the jaxws plugin, right? Move the dependency there and try again with mvn -X to see the full classpath used for that plugin execution. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugin insantiation: once per execution? Once per build?
On Thu, Sep 8, 2011 at 2:27 AM, Baptiste MATHUS m...@batmat.net wrote: Hi, I suppose that you ask that.because you're writing a mojo yourself. I don't know the answer but it seems to me it would quite simple to check it by code: just add a log in your constructor and see if displays once or many times. Right; I want to know what is *intended* versus what I can observe happening. Is the intended behavior what happens? Or can the Maven developers decide to change the plugin lifecycle out from under me? IMHO any plugin system should be governed by a contract. By the way, also think abt thread-safing your code to prevent having bugs using -T switch. I'd like my plugin to be as thread-safe as possible, but to do that I need to know its lifecycle. Thanks! Best, Laird -- http://about.me/lairdnelson
Re: Site plugin in maven 3.
Third time trying to send this... I keep getting spam blocked. Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 spam score (5.3) exceeded threshold (HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,URI_OBFU_WWW (state 18). The long and the short of it is I need to come up with a set of test projects to verify what I am seeing. If I'm reading this right, there are a few expected behaviors.. 1. mvn site:site site:stage should work. 2. The distributionManagementsiteurl is important. * It can be in the form of file://mysite/ or scp://mysite/ * It will be inherited by child modules (as in hierarchy, not aggregator/directory children) and appended with that child artifactId. ** This will not work if the module directory does not match the artifactId. 3. Does the projecturl tag matter? What I would like to do is add site idanId/id urlscp://mysite//url /site to my corporate pom and have that be inherited down to the children, grandchildren, etc nodes.. So, for example, if I have a hierarchy corp-my-grandparent-my-parent-my-module and an aggregator root module corp-my-aggregator which aggregates my-grandparent, my-parent and my-module my-aggregator/ my-aggregator/my-grandparent my-aggregator/my-parent my-aggregator/my-module If only corp has a url defined, I would expect the my-module url to be scp://mysite/my-grandparent/my-parent/my-module/ ? And the following structure for my-aggregator/staging ? target/staging/corp/my-aggregator target/staging/corp/my-grandparent target/staging/corp/my-grandparent/my-parent target/staging/corp/my-grandparent/my-parent/my-grandparent And all the links properly navigate this structure. I've got a bit of vacation coming up, but after that I will try to come up with some simple test projects to confirm what I am seeing on our main project (or perhaps expose that I'm doing something non-maveny that i can fix). Thanks! Mike
Re: Site plugin in maven 3.
Michael Haefele wrote: Third time trying to send this... I keep getting spam blocked. Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 spam score (5.3) exceeded threshold (HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,URI_OBFU_WWW (state 18). The long and the short of it is I need to come up with a set of test projects to verify what I am seeing. If I'm reading this right, there are a few expected behaviors.. 1. mvn site:site site:stage should work. It should work up to http://maven.apache.org/plugins/maven-site-plugin/faq.html#What_is_the_difference_between_mvn_site_and_mvn_site:site 2. ThedistributionManagementsiteurl is important. Only in a multi-module build and/or if you want to stage/deploy your site. * It can be in the form of file://mysite/ or scp://mysite/ it should be a valid URL (and to make sense it should be an absolute URL, even though in practice a relative one will probably work too, as in the example you have shown in your previous email). * It will be inherited by child modules (as in hierarchy, not aggregator/directory children) and appended with that child artifactId. yes, unless you explicitly override it in the inheriting child. However, note http://jira.codehaus.org/browse/MSITE-600 which I still haven't managed to fix in a satisfactory manner. ** This will not work if the module directory does not match the artifactId. 3. Does theprojecturl tag matter? See http://maven.apache.org/plugins/maven-site-plugin/faq.html#Use_of_url http://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_do_my_absolute_links_get_translated_into_relative_links What I would like to do is add site idanId/id urlscp://mysite//url /site to my corporate pom and have that be inherited down to the children, grandchildren, etc nodes.. So, for example, if I have a hierarchy corp-my-grandparent-my-parent-my-module and an aggregator root module corp-my-aggregator which aggregates my-grandparent, my-parent and my-module my-aggregator/ my-aggregator/my-grandparent my-aggregator/my-parent my-aggregator/my-module If only corp has a url defined, I would expect the my-module url to be scp://mysite/my-grandparent/my-parent/my-module/ ? yes And the following structure for my-aggregator/staging ? target/staging/corp/my-aggregator target/staging/corp/my-grandparent target/staging/corp/my-grandparent/my-parent target/staging/corp/my-grandparent/my-parent/my-grandparent yes And all the links properly navigate this structure. hopefully ;) Cheers, -Lukas I've got a bit of vacation coming up, but after that I will try to come up with some simple test projects to confirm what I am seeing on our main project (or perhaps expose that I'm doing something non-maveny that i can fix). Thanks! Mike - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Site plugin in maven 3.
Ah! http://jira.codehaus.org/**browse/MSITE-600http://jira.codehaus.org/browse/MSITE-600 http://maven.apache.org/**plugins/maven-site-plugin/faq.**html#Use_of_urlhttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Use_of_url http://maven.apache.org/**plugins/maven-site-plugin/faq.** html#Why_do_my_absolute_links_**get_translated_into_relative_**linkshttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_do_my_absolute_links_get_translated_into_relative_links All sound like potential causes of what I am seeing. That will be the first thing I check when I get back. One more question possibly in relation to http://jira.codehaus.org/** browse/MSITE-600 http://jira.codehaus.org/browse/MSITE-600. In a few of the cases I tried, I'd end up with site:stage attempting to place files in target/staging/../../mysite/morestuff (ie. in the base directory of my aggregator) or even farther up the directory tree.. How would you feel about having site:stage verify all the staging files actually went into the staging directory and erroring out otherwise? Having maven place files in non-target directories makes me really nervous (even if my configuration might be to blame). Thanks for all the help! Mike On Thu, Sep 8, 2011 at 12:29 PM, Lukas Theussl ltheu...@apache.org wrote: Michael Haefele wrote: Third time trying to send this... I keep getting spam blocked. Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 spam score (5.3) exceeded threshold (HTML_MESSAGE,RCVD_IN_DNSWL_**LOW,SPF_NEUTRAL,URI_OBFU_WWW (state 18). The long and the short of it is I need to come up with a set of test projects to verify what I am seeing. If I'm reading this right, there are a few expected behaviors.. 1. mvn site:site site:stage should work. It should work up to http://maven.apache.org/** plugins/maven-site-plugin/faq.**html#What_is_the_difference_** between_mvn_site_and_mvn_site:**sitehttp://maven.apache.org/plugins/maven-site-plugin/faq.html#What_is_the_difference_between_mvn_site_and_mvn_site:site 2. ThedistributionManagement**siteurl is important. Only in a multi-module build and/or if you want to stage/deploy your site. * It can be in the form of file://mysite/ or scp://mysite/ it should be a valid URL (and to make sense it should be an absolute URL, even though in practice a relative one will probably work too, as in the example you have shown in your previous email). * It will be inherited by child modules (as in hierarchy, not aggregator/directory children) and appended with that child artifactId. yes, unless you explicitly override it in the inheriting child. However, note http://jira.codehaus.org/**browse/MSITE-600http://jira.codehaus.org/browse/MSITE-600which I still haven't managed to fix in a satisfactory manner. ** This will not work if the module directory does not match the artifactId. 3. Does theprojecturl tag matter? See http://maven.apache.org/**plugins/maven-site-plugin/faq.**html#Use_of_urlhttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Use_of_url http://maven.apache.org/**plugins/maven-site-plugin/faq.** html#Why_do_my_absolute_links_**get_translated_into_relative_**linkshttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_do_my_absolute_links_get_translated_into_relative_links What I would like to do is add site idanId/id urlscp://mysite//url /site to my corporate pom and have that be inherited down to the children, grandchildren, etc nodes.. So, for example, if I have a hierarchy corp-my-grandparent-my-**parent-my-module and an aggregator root module corp-my-aggregator which aggregates my-grandparent, my-parent and my-module my-aggregator/ my-aggregator/my-grandparent my-aggregator/my-parent my-aggregator/my-module If only corp has a url defined, I would expect the my-module url to be scp://mysite/my-grandparent/**my-parent/my-module/ ? yes And the following structure for my-aggregator/staging ? target/staging/corp/my-**aggregator target/staging/corp/my-**grandparent target/staging/corp/my-**grandparent/my-parent target/staging/corp/my-**grandparent/my-parent/my-**grandparent yes And all the links properly navigate this structure. hopefully ;) Cheers, -Lukas I've got a bit of vacation coming up, but after that I will try to come up with some simple test projects to confirm what I am seeing on our main project (or perhaps expose that I'm doing something non-maveny that i can fix). Thanks! Mike --**--**- To unsubscribe, e-mail: users-unsubscribe@maven.**apache.orgusers-unsubscr...@maven.apache.org For additional commands, e-mail:
Trouble getting antrun plugin to run
Hi, I'm using Maven 3.0.3. I have the below in the buildplugins section of my pom. However, when I run mvn clean deploy the echo message is never printed out. Does anyone know why my antrun plugin isn't running? plugin artifactIdmaven-antrun-plugin/artifactId version1.6/version executions execution phaseinstall/phase configuration echo message=Executing target / condition property=is-release not contains string=${project.version} substring=SNAPSHOT/ /not /condition fail if=is-release message=You can only release snapshot versions of this project./ /configuration goals goalrun/goal /goals /execution /executions /plugin Thanks, - Dave -- View this message in context: http://maven.40175.n5.nabble.com/Trouble-getting-antrun-plugin-to-run-tp4783208p4783208.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Forbiden? http://repo1.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar
Maybe you're behind a firewall that hasn't adjusted to the new ips? http://www.sonatype.com/people/2011/07/the-central-repository-is-getting-faster-are-you-ready-for-the-new-ips/ On Wed, Aug 31, 2011 at 5:49 PM, Jason Pyeron jpye...@pdinc.us wrote: Not sure if this is the right place to ask, but I am getting a 403 error on http://repo1.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar http://repo1.maven.apache.org/maven2/junit/junit/3.8.2/ -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Trouble getting antrun plugin to run
I think you need to attach it to a phase: execution phasepackage/phase !-- for example here package-- ... /execution Cheers, Guillaume Le 8/09/2011 19:01, laredotornado-3 a écrit : Hi, I'm using Maven 3.0.3. I have the below in thebuildplugins section of my pom. However, when I run mvn clean deploy the echo message is never printed out. Does anyone know why my antrun plugin isn't running? plugin artifactIdmaven-antrun-plugin/artifactId version1.6/version executions execution phaseinstall/phase configuration echo message=Executing target / condition property=is-release not contains string=${project.version} substring=SNAPSHOT/ /not /condition fail if=is-release message=You can only release snapshot versions of this project./ /configuration goals goalrun/goal /goals /execution /executions /plugin Thanks, - Dave -- View this message in context: http://maven.40175.n5.nabble.com/Trouble-getting-antrun-plugin-to-run-tp4783208p4783208.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: [maven] Re: Forbiden? http://repo1.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar
-Original Message- From: Brian Fox [mailto:bri...@infinity.nu] Sent: Thursday, September 08, 2011 13:04 To: Maven Users List Subject: [maven] Re: Forbiden? http://repo1.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar Maybe you're behind a firewall that hasn't adjusted to the new ips? 30 days is a long time to not adjust. I was getting a 403 only on those files, not other files on the same server. I am presently getting a 200 so all is fine now. Could it be a mirror synchronization file system permissions issue? http://www.sonatype.com/people/2011/07/the-central-repository- is-getting-faster-are-you-ready-for-the-new-ips/ On Wed, Aug 31, 2011 at 5:49 PM, Jason Pyeron jpye...@pdinc.us wrote: Not sure if this is the right place to ask, but I am getting a 403 error on http://repo1.maven.apache.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar http://repo1.maven.apache.org/maven2/junit/junit/3.8.2/ -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Site plugin in maven 3.
One more followup. It does look like the source of at least some of my problems was the projecturl tag. We had a few poms that had been cut/pasted and had identical url's. Once I commented all of those out, everything looks like it is in the right place and it looks like all the links work so far. Thanks for your help. Mike On Thu, Sep 8, 2011 at 12:52 PM, Michael Haefele michael.haef...@parityenergy.com wrote: Ah! http://jira.codehaus.org/**browse/MSITE-600http://jira.codehaus.org/browse/MSITE-600 http://maven.apache.org/**plugins/maven-site-plugin/faq.**html#Use_of_urlhttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Use_of_url http://maven.apache.org/**plugins/maven-site-plugin/faq.** html#Why_do_my_absolute_links_**get_translated_into_relative_**linkshttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_do_my_absolute_links_get_translated_into_relative_links All sound like potential causes of what I am seeing. That will be the first thing I check when I get back. One more question possibly in relation to http://jira.codehaus.org/** browse/MSITE-600 http://jira.codehaus.org/browse/MSITE-600. In a few of the cases I tried, I'd end up with site:stage attempting to place files in target/staging/../../mysite/morestuff (ie. in the base directory of my aggregator) or even farther up the directory tree.. How would you feel about having site:stage verify all the staging files actually went into the staging directory and erroring out otherwise? Having maven place files in non-target directories makes me really nervous (even if my configuration might be to blame). Thanks for all the help! Mike On Thu, Sep 8, 2011 at 12:29 PM, Lukas Theussl ltheu...@apache.orgwrote: Michael Haefele wrote: Third time trying to send this... I keep getting spam blocked. Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 spam score (5.3) exceeded threshold (HTML_MESSAGE,RCVD_IN_DNSWL_**LOW,SPF_NEUTRAL,URI_OBFU_WWW (state 18). The long and the short of it is I need to come up with a set of test projects to verify what I am seeing. If I'm reading this right, there are a few expected behaviors.. 1. mvn site:site site:stage should work. It should work up to http://maven.apache.org/** plugins/maven-site-plugin/faq.**html#What_is_the_difference_** between_mvn_site_and_mvn_site:**sitehttp://maven.apache.org/plugins/maven-site-plugin/faq.html#What_is_the_difference_between_mvn_site_and_mvn_site:site 2. ThedistributionManagement**siteurl is important. Only in a multi-module build and/or if you want to stage/deploy your site. * It can be in the form of file://mysite/ or scp://mysite/ it should be a valid URL (and to make sense it should be an absolute URL, even though in practice a relative one will probably work too, as in the example you have shown in your previous email). * It will be inherited by child modules (as in hierarchy, not aggregator/directory children) and appended with that child artifactId. yes, unless you explicitly override it in the inheriting child. However, note http://jira.codehaus.org/**browse/MSITE-600http://jira.codehaus.org/browse/MSITE-600which I still haven't managed to fix in a satisfactory manner. ** This will not work if the module directory does not match the artifactId. 3. Does theprojecturl tag matter? See http://maven.apache.org/**plugins/maven-site-plugin/faq.**html#Use_of_urlhttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Use_of_url http://maven.apache.org/**plugins/maven-site-plugin/faq.** html#Why_do_my_absolute_links_**get_translated_into_relative_**linkshttp://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_do_my_absolute_links_get_translated_into_relative_links What I would like to do is add site idanId/id urlscp://mysite//url /site to my corporate pom and have that be inherited down to the children, grandchildren, etc nodes.. So, for example, if I have a hierarchy corp-my-grandparent-my-**parent-my-module and an aggregator root module corp-my-aggregator which aggregates my-grandparent, my-parent and my-module my-aggregator/ my-aggregator/my-grandparent my-aggregator/my-parent my-aggregator/my-module If only corp has a url defined, I would expect the my-module url to be scp://mysite/my-grandparent/**my-parent/my-module/ ? yes And the following structure for my-aggregator/staging ? target/staging/corp/my-**aggregator target/staging/corp/my-**grandparent target/staging/corp/my-**grandparent/my-parent target/staging/corp/my-**grandparent/my-parent/my-**grandparent yes And all the links properly navigate this structure. hopefully ;) Cheers, -Lukas I've got a bit of
Re: Get java.lang.NoClassDefFoundError though the class is in the classpath
You are right. After I move the dependency into the plugin section, it works. For future use, the -X is a parameter that turns on debug mode. So instead of mvn compile you run mvn -X compile. The error message you got said basically you didn't tell me what to do with this project so I will quit now. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Resources tag info required
Can you please tell me which tag is that *(for default folder inclusion, which in turn exists )* This tag/feature does not currently exist. I think Daniele was theorizing about a possible future feature to handle such a need. Until then, simply add the folder directly as a resource along with your other resource node(s). Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org