Writing a component for a Maven Plugin
I wish to write a component to inject into my Maven Mojo whichis running from an 'embedded' Maven deployment. By embedded I mean I am starting up Plexus and Maven like this... import org.apache.maven.Maven; import org.apache.maven.cli.MavenLoggerManager; import org.apache.maven.model.building.ModelProcessor; import org.codehaus.plexus.DefaultContainerConfiguration; import org.codehaus.plexus.DefaultPlexusContainer; import org.codehaus.plexus.PlexusContainerException; import org.codehaus.plexus.classworlds.ClassWorld; import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.logging.console.ConsoleLogger; public class MvnServer2 { final Logger logger; final BespokeExecutionListener executionListener; final Maven maven; final ModelProcessor modelProcessor; MvnServer2() throws PlexusContainerException, ComponentLookupException { ClassWorld classWorld = new ClassWorld("plexus.core", Thread.currentThread().getContextClassLoader()); DefaultContainerConfiguration cc = new DefaultContainerConfiguration(); cc.setClassWorld(classWorld); cc.setName("embedder"); DefaultPlexusContainer plexus = new DefaultPlexusContainer(cc); logger = new ConsoleLogger(); plexus.setLoggerManager(new MavenLoggerManager(logger)); maven = plexus.lookup(Maven.class); modelProcessor = plexus.lookup(ModelProcessor.class); executionListener = new BespokeExecutionListener(logger); I was looking at http://www.sonatype.com/people/2009/05/plexus-container-five-minute-tutorial/ but noticed that the archetypes and documentation at http://plexus.codehaus.org/guides/writing-components/00_index.html seems to be out of date. I also see that sonatype are migrating to Guice. Which would be a better place to start for component writing, Guice or Plexus? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven surefire 2.11 release date
Den 22.11.2011 13:35, skrev Stephen Connolly: On 22 November 2011 08:51, Kristian Rosenvold wrote: Den 22.11.2011 09:36, skrev Stephen Connolly (in private message): Does that major new piece include the per-method threading you promised you'd deliver for 2.10 in return for me consolidating the site generation? :-P I said I'd do it, but not for which version ;) No. There are some pain Nope you said you'd do it for 2.10... do you want me to pull out the transcript ;-) I seem to remember being intentionally vague about the fix-version ;) But maybe I just lied to make you do to the site stuff :-p Anyway, all the features I planned for 2.11 are now present and a fresh 2.11-SNAPSHOT is deployed. That means I'm just a bug scrub session or two away from starting the release. Anyone wishing to give 2.11-SNAPSHOT a spin should have /at least/ until over the weekend to test it. Kristian - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Integration Test Dependency and WAR Packaging
Hi to all, i have a larger structure of modules which built a multi-module-build which contains (an excerpt of my structure) the following two modules where my problem is focused on: root +-- mod-war +-- mod-it where the mod-war obviously contains the WAR module with the web-application (packaging war) and the mod-it contains the integration tests. So my problem is that i can't use a Class which is defined in the mod-war package under src/main/java//ClassName.java in my Integration test (src/test/java/XYZIT.java) I already have a dependency to my mod-war to make sure the reactor will build the mod-war before mod-it ... Here my snippet from the mod-it POM: ${project.groupId} mod-war ${project.version} war test So the question is: Does exist a solution? Or do i need to define a separate module with my classes which i would like to use in my integration tests and in the mod-war ? Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016434.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: Integration Test Dependency and WAR Packaging
Hi Karl Heinz, Look at the configuration for the WAR-plugin, you can have it create a separate JAR for the classes, which you can then use as a dependency. Roland On 23.11.2011 13:10, Karl Heinz Marbaise wrote: > Hi to all, > > i have a larger structure of modules which built a multi-module-build which > contains (an excerpt of my structure) the following two modules where my > problem is focused on: > > root > +-- mod-war > +-- mod-it > > where the mod-war obviously contains the WAR module with the web-application > (packaging war) and the mod-it contains the integration tests. So my problem > is that i can't use a Class which is defined in the mod-war package under > src/main/java//ClassName.java in my Integration test > (src/test/java/XYZIT.java) > > I already have a dependency to my mod-war to make sure the reactor will > build the mod-war before mod-it > ... > > Here my snippet from the mod-it POM: > > > ${project.groupId} > mod-war > ${project.version} > war > test > > > So the question is: Does exist a solution? Or do i need to define a separate > module with my classes which i would like to use in my integration tests and > in the mod-war ? > > Kind regards > Karl Heinz Marbaise > > > - > Kind regards > Karl Heinz Marbaise > > http://www.soebes.de > http://www.skmwiki.de > http://supose.org/wiki/supose > -- > View this message in context: > http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016434.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 > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Hi, first thanks for the answer, but the problem is my classes are located in the src/main/java area and not in src/main/webapp folderThe configuration for the war-plugin (archiveClasses) will only create a jar from classes in the src/main/webapp folder...where i don't have any classes only jsp(x), css files, images etc. My classes are located in src/main/java ... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016484.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
[ANN] Maven Archetype 2.2 Released
The Maven team is pleased to announce the release of the Maven Archtetype 2.2 Architype is a collection of tools that allow you to create templates for maven projects. Release Notes - Maven Archetype - Version 2.2 ** Bug * [ARCHETYPE-390] - Several parameters of the create-from-project mojo lack documentation * [ARCHETYPE-391] - The defaultEncoding parameter is never used. ** Improvement * [ARCHETYPE-382] - when selecting an archetype, display archetype groupId and artifactId before choosing version * [ARCHETYPE-387] - IntegrationTestMojo has hardcoded target/test-classes/projects for resources * [ARCHETYPE-389] - add some various options to improve how Maven is invoked in IntegrationTestMojo ** New Feature * [ARCHETYPE-383] - Use velocity expressions in descriptor properties * [ARCHETYPE-388] - enhance IntegrationTestMojo to be able to run verify script to do some asserts ** Task * [ARCHETYPE-386] - use plexus java 5 annotations instead of old-style javadoc annotations To use the new version, specify version '2.2' explicitly from the command-line or in your POM. Enjoy, -The Maven team - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Hello Karl Heinz, Where does it say that the sources must be in src/main/webapp? As with all plugins, sources should be in src/main/java (like you have now). I think you need the parameter 'attachClasses', I am not 100% sure if 'archiveClasses' is necessary as well. I've used it before (albeit a little while back so I can't remember all the details) and it does what you want. Roland On 23.11.2011 13:28, Karl Heinz Marbaise wrote: > Hi, > > first thanks for the answer, but the problem is my classes are located in > the src/main/java area and not in src/main/webapp folderThe > configuration for the war-plugin (archiveClasses) will only create a jar > from classes in the src/main/webapp folder...where i don't have any classes > only jsp(x), css files, images etc. My classes are located in src/main/java > ... > > Kind regards > Karl Heinz Marbaise > > > > - > Kind regards > Karl Heinz Marbaise > > http://www.soebes.de > http://www.skmwiki.de > http://supose.org/wiki/supose > -- > View this message in context: > http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016484.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 > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
hi, i have added both parameters to the configuration of the maven-war-plugin but it doesn't create a separate jar file...so no luck... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016562.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: Integration Test Dependency and WAR Packaging
I just tried this on an old project, and with only the 'attacheClasses'-attribute, it works just fine for me... Might be a dumb question, but: are you using the right version of the plugin? Roland On 23.11.2011 13:55, Karl Heinz Marbaise wrote: > hi, > > i have added both parameters to the configuration of the maven-war-plugin > but it doesn't create a separate jar file...so no luck... > > Kind regards > Karl Heinz Marbaise > > - > Kind regards > Karl Heinz Marbaise > > http://www.soebes.de > http://www.skmwiki.de > http://supose.org/wiki/supose > -- > View this message in context: > http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016562.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 > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Hi, Asmann, Roland wrote > > I just tried this on an old project, and with only the > 'attacheClasses'-attribute, it works just fine for me... > > Might be a dumb question, but: are you using the right version of the > plugin? > it's not a dump question... ;-) I'm using maven-war-plugin (2.1.1) most up-to-date version of the plugin...rechecked it ... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016649.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: Integration Test Dependency and WAR Packaging
On 11/23/2011 01:10 PM, Karl Heinz Marbaise wrote: > Hi to all, > > i have a larger structure of modules which built a multi-module-build which > contains (an excerpt of my structure) the following two modules where my > problem is focused on: > > root > +-- mod-war > +-- mod-it > > where the mod-war obviously contains the WAR module with the web-application > (packaging war) and the mod-it contains the integration tests. So my problem > is that i can't use a Class which is defined in the mod-war package under > src/main/java//ClassName.java in my Integration test > (src/test/java/XYZIT.java) This doesn't directly address your question but the .war module should not even have sources IMHO. I always structure my projects so that the war module only has the direct stuff required for the .war (e.g. web.xml and friends) but nothing else. -dirk - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Strange, that's the same version I am using... Could you post a part of the POM and maybe some output you get? Maybe we can see something in there... On 23.11.2011 14:29, Karl Heinz Marbaise wrote: > Hi, > > > Asmann, Roland wrote > > > > I just tried this on an old project, and with only the > > 'attacheClasses'-attribute, it works just fine for me... > > > > Might be a dumb question, but: are you using the right version of the > > plugin? > > > it's not a dump question... ;-) > > I'm using maven-war-plugin (2.1.1) most up-to-date version of the > plugin...rechecked it ... > > Kind regards > Karl Heinz Marbaise > > - > Kind regards > Karl Heinz Marbaise > > http://www.soebes.de > http://www.skmwiki.de > http://supose.org/wiki/supose > -- > View this message in context: > http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016649.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 > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Hi, i've looked into the wrong location oversight ... sorry ;-( the jar file is created in the WEB-INF/lib/ folder and not in the target folder but now i'm trying to use it as dependency for my integration test module and use classes from therebut this seemed to be not working... Hm Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016683.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: Integration Test Dependency and WAR Packaging
If you use 'attachClasses', the JAR should NOT be created in the lib-folder, but in the target. When using 'archiveClasses' it is created in the lib-folder. A dependency on that JAR should be on a JAR (not the WAR) and add classifier 'classes'. On 23.11.2011 14:42, Karl Heinz Marbaise wrote: > Hi, > > i've looked into the wrong location oversight ... sorry ;-( the jar > file is created in the WEB-INF/lib/ folder and not in the target folder > > but now i'm trying to use it as dependency for my integration test module > and use classes from therebut this seemed to be not working... > > Hm > > Kind regards > Karl Heinz Marbaise > > - > Kind regards > Karl Heinz Marbaise > > http://www.soebes.de > http://www.skmwiki.de > http://supose.org/wiki/supose > -- > View this message in context: > http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5016683.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 > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: How to include the *-sources.jar in a binary distribution?
Hi Barrie Barrie Treloar wrote: > On Wed, Nov 23, 2011 at 7:16 AM, Paolo Castagna > wrote: >> >> Barrie Treloar wrote: >>> On Wed, Nov 23, 2011 at 3:49 AM, Paolo Castagna >>> wrote: >>> >>> There are 5 dimensions to this field >>> groupId, artifactId, type, version, classifier >>> >>> You have org.apache.jena:jena-*:*:*:sources >>> 1) org.apache.jena:jena-*: >>> 2) *: >>> 3) *: >>> 4) sources >> 1) org.apache.jena: >> 2) jena-*: >> 3) *: >> 4) *: >> 5) sources >> >> Sources should be = classifier >> >> Why you put org.apache.jena:jena-* together? > > because it was 6am in the morning :) Ok. > Have you tried -X to see whether there is some knowledge buried in > there about why its failing. > Without someone more knowledgeable about what's going on and how to > configure this, your next step is to download the assembly source code > and have a look. > > The documentation > http://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html > has > Example: Exclude all source-jar dependencies. > > In this example, we're dealing with the fact that project sources are > often distributed using jar files, in addition to normal binaries. We > want to filter out any source-jar files (they'll be marked with a > sources classifier) from the binary jars. > > xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > > xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 > http://maven.apache.org/xsd/assembly-1.1.2.xsd";> > [...] > > > > *:jar:* > > > *:sources > > > > [...] > > > So you should be able to do what you are trying to do. > > Sorry can't be more helpful. No problem. Paolo > > - > 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
copying jaxb.index file to classes folder
Hi, I have jaxb.index files at certain packages in main/java folder. By default maven does not copy this index file to classes folder in same package. So, i added below resources plugin. But, it is not working. Any advice, pls? org.apache.maven.plugins *maven*-resources-*plugin* 2.5 copy-resources validate copy-resources ${*basedir*}/target/classes ${*basedir*}/*src*/main/java/**/jaxb.index
Re: copying jaxb.index file to classes folder
> I have jaxb.index files at certain packages in main/java folder. By default > maven does not copy this index file to classes folder in same package. So, > i added below resources plugin. > > But, it is not working. Any advice, pls? Can you not just move these files to src/main/resources? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Hi, Asmann, Roland wrote > > If you use 'attachClasses', the JAR should NOT be created in the > lib-folder, but in the target. When using 'archiveClasses' it is created > in the lib-folder. It is correct that a file artifactid-version-classes.jar is created in the target folder (with attachClasses), but that does not contain the classes from src/main/java. The documentation says it will put the classes from the src/main/webapp/WEB-INF/classes folder into this jar... The jar which is created in the target/artifactid-version/WEB-INF/lib/artifact-version.jar contains the classes from src/main/javabut can't be correctly be used as a dependencyit will produce a problems during the build, cause it will try to download that jar from the repo-manager...which does not exists... Asmann, Roland wrote > > A dependency on that JAR should be on a JAR (not the WAR) and add > classifier 'classes'. > Will not work based on the above description I've got the impression this looks like a bug in the Maven-War-Pluginor a misunderstanding on my site... Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5017124.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
Turning on degubbing switch (-g) with javac
Hi It should be really easy and straightforward thing to turn on the javac -g option to generate debug information, but for some funny reason I cannot do it. I tried "mvn -Dmaven.compiler.debug=true -Dmaven.compiler.debuglevel=lines,vars,source compile" but what I get is [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = false [DEBUG] (f) debuglevel = lines,vars,source Thanks for any hints. --jaakko - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
Here's a small example... Check if it works for you, because it definitely does for me... Roland On 23.11.2011 16:52, Karl Heinz Marbaise wrote: > Hi, > > Asmann, Roland wrote > > > > If you use 'attachClasses', the JAR should NOT be created in the > > lib-folder, but in the target. When using 'archiveClasses' it is created > > in the lib-folder. > > It is correct that a file artifactid-version-classes.jar is created in the > target folder (with attachClasses), but that does not contain the classes > from src/main/java. The documentation says it will put the classes from the > src/main/webapp/WEB-INF/classes folder into this jar... > > The jar which is created in the > target/artifactid-version/WEB-INF/lib/artifact-version.jar contains the > classes from src/main/javabut can't be correctly be used as a > dependencyit will produce a problems during the build, cause it will try > to download that jar from the repo-manager...which does not exists... > > > Asmann, Roland wrote > > > > A dependency on that JAR should be on a JAR (not the WAR) and add > > classifier 'classes'. > > > Will not work based on the above description > > I've got the impression this looks like a bug in the Maven-War-Pluginor > a misunderstanding on my site... > > Kind regards > Karl Heinz Marbaise > > - > Kind regards > Karl Heinz Marbaise > > http://www.soebes.de > http://www.skmwiki.de > http://supose.org/wiki/supose > -- > View this message in context: > http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5017124.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 > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Integration Test Dependency and WAR Packaging
No attachments allowed? I'll send it to you directly. On 23.11.2011 17:08, Asmann, Roland wrote: > Here's a small example... Check if it works for you, because it > definitely does for me... > > Roland > > > On 23.11.2011 16:52, Karl Heinz Marbaise wrote: > > Hi, > > > > Asmann, Roland wrote > > > > > > If you use 'attachClasses', the JAR should NOT be created in the > > > lib-folder, but in the target. When using 'archiveClasses' it is > created > > > in the lib-folder. > > > > It is correct that a file artifactid-version-classes.jar is created > in the > > target folder (with attachClasses), but that does not contain the classes > > from src/main/java. The documentation says it will put the classes > from the > > src/main/webapp/WEB-INF/classes folder into this jar... > > > > The jar which is created in the > > target/artifactid-version/WEB-INF/lib/artifact-version.jar contains the > > classes from src/main/javabut can't be correctly be used as a > > dependencyit will produce a problems during the build, cause it > will try > > to download that jar from the repo-manager...which does not exists... > > > > > > Asmann, Roland wrote > > > > > > A dependency on that JAR should be on a JAR (not the WAR) and add > > > classifier 'classes'. > > > > > Will not work based on the above description > > > > I've got the impression this looks like a bug in the > Maven-War-Pluginor > > a misunderstanding on my site... > > > > Kind regards > > Karl Heinz Marbaise > > > > - > > Kind regards > > Karl Heinz Marbaise > > > > http://www.soebes.de > > http://www.skmwiki.de > > http://supose.org/wiki/supose > > -- > > View this message in context: > > > http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5017124.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 > > > > -- > Roland Asmann > Senior Software Engineer > > adesso Austria GmbH > Floridotower 26. Stock T +43 1 2198790-27 > Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 > A-1210 Wien M +43 664 88657566 > E roland.asm...@adesso.at > W www.adesso.at > > - > >>> business. people. technology. <<< > - > -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-27 Floridsdorfer Hauptstr. 1 F +43 1 2198790-927 A-1210 Wien M +43 664 88657566 E roland.asm...@adesso.at W www.adesso.at - >>> business. people. technology. <<< - - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Turning on degubbing switch (-g) with javac
Hi It should be really easy and straightforward thing to turn on the javac -g option to generate debug information, but for some funny reason I cannot do it. I tried "mvn -Dmaven.compiler.debug=true -Dmaven.compiler.debuglevel=lines,vars,source compile" but what I get is [DEBUG] (f) compilerId = javac [DEBUG] (f) debug = false [DEBUG] (f) debuglevel = lines,vars,source Thanks for any hints. --jaakko - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Mojo configuration file
I am developing an in-house mojo to be used across multiple projects. All of our in-house projects are built off a similar framework that requires an application.xml file. My problem is that mojo I am creating cannot find the application.xml file in the calling project. In the calling project the file is located in src/main/resources and the mojo is being called in the test phase to perform test setup activities. So my question is, how do I have the mojo access the file from the calling project? -- View this message in context: http://maven.40175.n5.nabble.com/Mojo-configuration-file-tp5017276p5017276.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: Mojo configuration file
You can bind the MavenProject to your mojo through the ${project} expression. But you can also bind the ${project.build.resources} expression to access the list of resources directories. Jeff MAURY On Wed, Nov 23, 2011 at 5:53 PM, krwell wrote: > I am developing an in-house mojo to be used across multiple projects. All > of > our in-house projects are built off a similar framework that requires an > application.xml file. My problem is that mojo I am creating cannot find > the > application.xml file in the calling project. In the calling project the > file is located in src/main/resources and the mojo is being called in the > test phase to perform test setup activities. > > So my question is, how do I have the mojo access the file from the calling > project? > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Mojo-configuration-file-tp5017276p5017276.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 > > -- "Legacy code" often differs from its suggested alternative by actually working and scaling. - Bjarne Stroustrup http://www.jeffmaury.com http://riadiscuss.jeffmaury.com http://www.twitter.com/jeffmaury
Need some help with mvn install command
Hey guys, I'm a little new to maven here so please bear with me. I'm using Maven 2.2.x on a windows system. I need some help here on a couple of different facets. First off I am using the Eclipse IDE, and I have the m2eclipse plugin installed. I have all of my env. variables and path set. when I run mvn install on the project (from the CL) I get this: >>Downloading: http://repository.jboss.org/nexus/content/groups/public//org/apache >>/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom >>[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-surefire-plugin >>:pom:2.4.3' from repository jboss-public-repository-group ( http://repository.jbo >>ss.org/nexus/content/groups/public/): Error transferring file: Server redirected >>too many times (20) >>[INFO] >>[ERROR] BUILD ERROR >>[INFO] >>[INFO] Error building POM (may not be this project's POM). >> >> >>Project ID: org.apache.maven.plugins:maven-surefire-plugin >> >>Reason: POM 'org.apache.maven.plugins:maven-surefire-plugin' not found in reposi >>tory: Unable to download the artifact from any repository >> >> org.apache.maven.plugins:maven-surefire-plugin:pom:2.4.3 >> >>from the specified remote repositories: >> central (http://repo1.maven.org/maven2), >> codehaus (http://repository.codehaus.org/), >> prime-repo (http://repository.primefaces.org), >> thirdparty ( http://1AEA04INFW01:8081/nexus/content/repositories/thirdparty), >> jboss-public-repository-group ( http://repository.jboss.org/nexus/content/group >>s/public/), >> jvnet-nexus-releases ( https://maven.java.net/content/repositories/releases/) >> >> for project org.apache.maven.plugins:maven-surefire-plugin Ok that being said, all of the dependencies I had grabbed from another users machine and put in the ~\.m2\repository directory under my user profile. My POM file does not reference any surefire plugin, but it is looking for it in the public repositories. I have my pom file here: I have left out the and info along with the group and other id's at the top. From what I am reading, it is suggested that the internet traffic is going through a proxy, however, no one else on this floor has the problem, and I have been assured by the networking dept that the internet traffic does not go through a proxy. Plus this is a Windows env, so my assumption is that the settings.xml is optional. With everything going on, I just want to get the project to build. Can anyone provide me with some insight? Thanks in advance. - Josh thirdparty http://1AEA04INFW01:8081/nexus/content/repositories/thirdparty jboss-public-repository-group JBoss Public Repository Group http://repository.jboss.org/nexus/content/groups/public/ default true never true never prime-repo PrimeFaces Maven Repository http://repository.primefaces.org default jvnet-nexus-releases jvnet-nexus-releases https://maven.java.net/content/repositories/releases/ codehaus Maven Codehaus repository http://repository.codehaus.org/ jboss-public-repository-group JBoss Public Repository Group http://repository.jboss.org/nexus/content/groups/public/ true true commons-configuration commons-configuration 1.7 javax javaee-web-api 6.0 provided ecs ecs 1.4.1 commons-lang commons-lang 1.0 org.apache.commons commons-lang3 3.0.1 commons-io commons-io 2.0.1 com.lowagie itext 2.1.7 org.hibernate hibernate-core 3.5.6-Final org.hibernate hibernate-annotations 3.5.6-Final javassist javassist 3.12.1.GA org.slf4j slf4j-simple 1.5.8 com.coolservlets CSEmail 1.0 org.codehaus.castor castor-xml 1.3.1 junit
Maven assembly plugin outputDirectory cannot contain an extension
Help! I have a fileSet element in my assembly.bin that looks like this: resources/running.war deploy/running.war **/* However, instead of putting the files in deploy/running.war, the plugin puts it in deploy/running, leaving off the extension. I need the extension on the output directory. Is there any way to do that using the assembly plugin.
Re: Need some help with mvn install command
Hi, i've taken a look at your problemsthe first things which came to my mind is that the repository you defined (http://repository.jboss.org/nexus/content/groups/public//org/apache) contains only SNAPSHOT's of the maven-surefire-plugin which is wrong...(Maven Central is your friend)... Furthermore i have seen (or better) it looks like that you are using a repository manager (Nexus)...so you should remove all repository definitions from your pom and do the configuration in the repository manager An other point is that you are configuring the maven-deploy-plugin but that should be done in the distributionManagement instead...(i know you wrote you removed it...)... And last but not least what about your configuration of the maven-jar-plugin: org.apache.maven.plugins maven-jar-plugin 2.1-jboss-1 make-a-jar compile jar Haven't you defined a packaging type ? Or just left it out...(default: jar)...but this looks more like a web-application so your packaging should be "war"and the above plugin with this version does not exist in Maven-Central ? Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Need-some-help-with-mvn-install-command-tp5017339p5017446.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: Maven assembly plugin outputDirectory cannot contain an extension
Hi, have you tried to add a supplemental slash in outputDirectory ? Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Maven-assembly-plugin-outputDirectory-cannot-contain-an-extension-tp5017443p5017462.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: md5sum on maven 3.03 download not matching
Think I had t subscribe to the mailing list before this goes through -- which I've done. On Wed, Nov 23, 2011 at 12:47 PM, Roger Spencer wrote: > Downloading maven 3.03 but the checksums are not matching up. Am I > missing something? > > # md5sum apache-maven-3.0.3-bin.tar.gz > 93d5d33c26f79977434bb16c4332a11f apache-maven-3.0.3-bin.tar.gz > > # cat apache-maven-3.0.3-bin.tar.gz.md5 > 507828d328eb3735103c0492443ef0f0 > > > # md5sum apache-maven-3.0.3-bin.zip > 285617aedfc614681327f63d8aef4f20 apache-maven-3.0.3-bin.zip > > # cat apache-maven-3.0.3-bin.zip.md5 > e9d7eb43b0cdb504f513e0c32ed0e71a > > >
Re: md5sum on maven 3.03 download not matching
Never mind. My bad. Mirrors always seem to through off my wgets. Sorry to bother everyone. On Wed, Nov 23, 2011 at 12:52 PM, Roger Spencer wrote: > Think I had t subscribe to the mailing list before this goes through -- > which I've done. > > > On Wed, Nov 23, 2011 at 12:47 PM, Roger Spencer wrote: > >> Downloading maven 3.03 but the checksums are not matching up. Am I >> missing something? >> >> # md5sum apache-maven-3.0.3-bin.tar.gz >> 93d5d33c26f79977434bb16c4332a11f apache-maven-3.0.3-bin.tar.gz >> >> # cat apache-maven-3.0.3-bin.tar.gz.md5 >> 507828d328eb3735103c0492443ef0f0 >> >> >> # md5sum apache-maven-3.0.3-bin.zip >> 285617aedfc614681327f63d8aef4f20 apache-maven-3.0.3-bin.zip >> >> # cat apache-maven-3.0.3-bin.zip.md5 >> e9d7eb43b0cdb504f513e0c32ed0e71a >> >> >> >
Re: Integration Test Dependency and WAR Packaging
Hi, after a longer fight with my build...didn't saw that i had a classloader problem (some dependencies which came via the new dependency (classes)) now this works perfect Many thanks for the support Kind regards Karl Heinz Marbaise - Kind regards Karl Heinz Marbaise http://www.soebes.de http://www.skmwiki.de http://supose.org/wiki/supose -- View this message in context: http://maven.40175.n5.nabble.com/Integration-Test-Dependency-and-WAR-Packaging-tp5016434p5017507.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: default-value are not injected
I've noticed this exact same issue. It seems that you have to explicitly define the values for all your configuration parameters (either in the test plugin pom, or via setVariableValueInObject), even if they have a default-value specified. Or am I missing something as well? -- View this message in context: http://maven.40175.n5.nabble.com/default-value-are-not-injected-tp3907553p5017722.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
Maven assembly plugin outputDirectory cannot contain an extension
I have a fileSet element in my assembly.bin that looks like this: resources/running.war deploy/running.war **/* However, instead of putting the files in deploy/running.war, the plugin puts it in deploy/running, leaving off the extension. I need the extension on the output directory. Is there any way to do that using the assembly plugin. For reference, I am using maven 3.0.3 and assembly plugin version 2.2.1. -- View this message in context: http://maven.40175.n5.nabble.com/Maven-assembly-plugin-outputDirectory-cannot-contain-an-extension-tp5017452p5017452.html Sent from the Maven - Users mailing list archive at Nabble.com.
md5sum on maven 3.03 download not matching
Downloading maven 3.03 but the checksums are not matching up. Am I missing something? # md5sum apache-maven-3.0.3-bin.tar.gz 93d5d33c26f79977434bb16c4332a11f apache-maven-3.0.3-bin.tar.gz # cat apache-maven-3.0.3-bin.tar.gz.md5 507828d328eb3735103c0492443ef0f0 # md5sum apache-maven-3.0.3-bin.zip 285617aedfc614681327f63d8aef4f20 apache-maven-3.0.3-bin.zip # cat apache-maven-3.0.3-bin.zip.md5 e9d7eb43b0cdb504f513e0c32ed0e71a
jetty-maven-plugin seems to be looking in wrong places for artifacts
I have a multi-module maven project where the UI is Flex and the backend is Java using Jetty for server. I'm using maven-jetty-plugin to host in Jetty and it was working with version 6.1.25, i.e. I could run the run/etc goals in my war maven module. I have one maven module that creates the swf and another that creates the war. However now I have upgraded to maven 3.x and Jetty/jetty-maven-plugin version 7.5.3.v20111011. and now those same goals fail with this error: [ERROR] Failed to execute goal on project webapp-war-flex: Could not resolve dependencies for project com.inc.app:webapp-war-flex:war:4.3-SNAPSHOT: Could not find artifact com.inc.app:webapp-flex:swf:4.3-SNAPSHOT in nexus (https://maven.inc.com/nexus/content/groups/public) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [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/DependencyResolutionException The problem seems to be that the new version of the plugin insists on finding the swf dependency in the corporate repo which it isn't going to find because it was not deployed there yet. However it should not be looking there as the swf was already assembled in the war. And for goals that create the war it should look in my local repo for the swf before it tries to find it in the corporate repo. How can I fix this? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Classpath and Properties Files
I've configured my application to search for configuration details in properties files located on the classpath. Does anyone know how to configure maven so that when "jetty:run" is executed it looks for properties files in "${user.home}/${project.artifactId}/"? Thanks. -Ari - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
dependency:get complains repositoryUrl missing or invalid
Hi, I am using dependency:get to install a remote jar from the central repository to my local repository in a folder without a pom.xml with the following command: mvn dependency:get -X -DrepositoryUrl=http://repo1.maven.org/maven2-DgroupId=org.apache.cxf -DartifactId=cxf-rt-frontend-jaxrs -Dversion=2.5.0 A error happens and says *Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:get (default-cli) on project standalone-pom: The parameters 'repositoryUrl' for goal org.apache.maven.plugins:maven-dependency-plugin:2.1:get are missing or invalid* I did have specified the repositoryUrl. What is going wrong? Rice
Re: dependency:get complains repositoryUrl missing or invalid
A space maybe before the second -D ? -- Olivier Le 24 nov. 2011 06:26, "Rice Yeh" a écrit : > Hi, > I am using dependency:get to install a remote jar from the central > repository to my local repository in a folder without a pom.xml with the > following command: > > mvn dependency:get -X > -DrepositoryUrl=http://repo1.maven.org/maven2-DgroupId=org.apache.cxf > -DartifactId=cxf-rt-frontend-jaxrs -Dversion=2.5.0 > > A error happens and says > > *Failed to execute goal > org.apache.maven.plugins:maven-dependency-plugin:2.1:get (default-cli) on > project standalone-pom: The parameters 'repositoryUrl' for goal > org.apache.maven.plugins:maven-dependency-plugin:2.1:get are missing or > invalid* > > I did have specified the repositoryUrl. What is going wrong? > > Rice >
Can tag in war plugin be used with Maven 1.0 ?
Hi, We are using Maven 1 and have a need to provide a war dependency to a jar. I found that this could be addressed using Maven war plug-in's 'attachClasses' tag. I have the following snippet in Project.xml of the war module. But it does not create the jar artifact which contains the class files / resources in the war. maven-war-plugin 2.1.1 true Want to know if this can be used with Maven 1 ? If not, is there a way to achieve this using Maven 1 ? -- View this message in context: http://maven.40175.n5.nabble.com/Can-attachclasses-tag-in-war-plugin-be-used-with-Maven-1-0-tp5019421p5019421.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