Re: Build works in Maven 2 but fails in Maven 3 (webapp)
> I gave Maven 3 a try today but am running into the error below. It builds > fine in Maven 2. I've included both the regular and verbose output below. > > cause-exception : > com.thoughtworks.xstream.mapper.CannotResolveClassException Looks a bit like MWAR-187: http://jira.codehaus.org/browse/MWAR-187 Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Build works in Maven 2 but fails in Maven 3 (webapp)
Hello, I gave Maven 3 a try today but am running into the error below. It builds fine in Maven 2. I've included both the regular and verbose output below. Any suggestions? Thanks, -Ryan [INFO] [INFO] --- maven-war-plugin:2.1-alpha-1:war (default-war) @ java --- [INFO] Packaging webapp [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 14.998s [INFO] Finished at: Fri Jan 22 15:18:12 EST 2010 [INFO] Final Memory: 14M/79M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war (default-war) on project java: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war failed: dependenciesInfo : dependenciesInfo Debugging information message : dependenciesInfo : dependenciesInfo cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : dependenciesInfo : dependenciesInfo class : org.apache.maven.plugin.war.util.WebappStructure required-type : org.apache.maven.plugin.war.util.WebappStructure path: /webapp-structure/dependenciesInfo line number : 480 --- -> [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/PluginExecutionException -Verbose- [INFO] Packaging webapp [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 6.712s [INFO] Finished at: Fri Jan 22 15:24:46 EST 2010 [INFO] Final Memory: 5M/79M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war (default-war) on project java: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war failed: dependenciesInfo : dependenciesInfo Debugging information message : dependenciesInfo : dependenciesInfo cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : dependenciesInfo : dependenciesInfo class : org.apache.maven.plugin.war.util.WebappStructure required-type : org.apache.maven.plugin.war.util.WebappStructure path: /webapp-structure/dependenciesInfo line number : 480 --- -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war (default-war) on project java: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war failed: dependenciesInfo : dependenciesInfo Debugging information message : dependenciesInfo : dependenciesInfo cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException cause-message : dependenciesInfo : dependenciesInfo class : org.apache.maven.plugin.war.util.WebappStructure required-type : org.apache.maven.plugin.war.util.WebappStructure path: /webapp-structure/dependenciesInfo line number : 480 --- at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:578) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:317) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:422) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157) at org.apache.maven.cli.MavenCli.main(MavenCli.java:122) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at 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) Caused by: org.apa
Generate jar file with different extension
Hi, I know it's already been asked, but I could not find a definitive answer. I need to create jar files but with a .car extension. Is there an easy way to do it with (maybe undocumented) an existing plugin ? Otherwise, could you point me to a resource (tutorial, similar project, etc.) so that I could create / adapt such a plugin. Many thanks, Patrick Turcotte Java Architect Revolution Linux. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Resource Filter files
Yes, is possible, I did it in my work recently. But, there is a better way. Notice what I'm doing. I have 4 profiles, activated with a var called env. So, when I call maven I always do: mvn -Denv=pre compile (or anything) I have four files called ${env}.pom.properties. So, you can put this in your main build tag: ${env}.pom.properties So, when activate pre profile, the properties file loaded is pre.pom.properties. El 25/01/2010, a las 21:01, escribió: > Is it possible to define filters by profile? See below for example. > > >... > > [a filter property] > >... > > > Thanks, > > David smime.p7s Description: S/MIME cryptographic signature
Resource Filter files
Is it possible to define filters by profile? See below for example. ... [a filter property] ... Thanks, David
Re: [Cobertura] Multimodules : cobertura replaces artifact dependency by target/generated-classes/cobertura
No idea about my issue ? :-( On Thu, Jan 21, 2010 at 11:48 AM, Frederic Camblor wrote: > Hi all :-) > > I have a multimodule project, saying : > - ProjectParent > --- ProjectEAR > --- ProjectEJB > --- ProjectWeb (depends on ProjectEJB) > > When I launch mvn -X cobertura:cobertura > I can see the following : > [INFO] [compiler:compile] > [DEBUG] Using compiler 'javac'. > [DEBUG] Source directories: > [D:\workspaces\Project\ProjectParent\ProjectWEB\src > D:\workspaces\Project\ProjectParent\ProjectWEB\bouchon-src] > [DEBUG] Classpath: > [D:\workspaces\Project\ProjectParent\ProjectWEB\target\classes > * > > D:\workspaces\Project\ProjectParent\ProjectEJB\target\generated-classes\cobertura > * > C:\Documents and > Settings\fcamblor\.m2\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar > C:\Documents and > Settings\fcamblor\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar > C:\Documents and > Settings\fcamblor\.m2\repository\commons-collections\commons-collections\3.2\commons-collections-3.2.jar > [etc...] > > The red line denotes cobertura replaced my ProjectEJB jar dependency by the > target/generated-classes/cobertura generated folder ! > Does that sound normal for you ? > > Is there a way to "force" cobertura to use dependency instead of adding > source ? (it implies compilation errors in my case :-() > > Frédéric >
Re: Multi-project organization
Thanks for the responses Ron and everyone. I'm going to take back all of your input and try to apply it. Josh On Sun, Jan 24, 2010 at 5:44 PM, Ron Wheeler wrote: > I am still new to Maven after using it for 3 years with 20+ projects. > I recently installed the Nexus repository manager, community (free) > version. > It is a great help and I would heartily recommend installing it if you are > moving to Maven. > It makes the whole process much more visible. > > We use the Springsource version of Eclipse which supports Maven very well - > great POM editor. > > You can take my advice with a grain of salt. There are others with more > experience and understanding. > 1) I would set up projects for each of the jars that you need to make. > > 2) I would set up individual projects that create the POM files to describe > the overall dependencies. > These POMS can be used as dependencies in your applications to pick up the > right version of your jars. > I would also build POM projects for dependencies from third parties > We have POM files that have "compile" scope dependencies on all of the > shared jars that we get from third parties (Apache, javax, etc). These are > referenced by the POMs that produce war files, as "provided" so that the > jars are available for compiling but are not in the war files since we > install the jars in the container's (Tomcat) shared library folder. > We have several POMs describing families of 3rd party jars. One for > spring-hibernate-mysql-tomcat for our basic technology stack, one for > utilities, mostly Apache stuff and one for the Apace CXF Web Service > libraries for our projects that are Web Services. > > 3) Put the version numbers of the jars in the POM file of the dependent > POMs so that when you have a dependency on a pom-shared-utility pom you get > a full set of consistent jars for the version of your application. This > reduces the potential for errors by developers. Once you start on a new > version of your application and decide on a set of libraries that will be > used, you define the version in the appropriate POM and the developer only > have to set the dependency on the version of the group POM to get all the > right versions. > > 4) Use SNAPSOTS properly with your development process. Nexus helps with > this by enforcing disciplines. > > 5) Do not get discouraged by the terrible documentation. There is lots of > it but it is very much "inside the beltway". Accurate but too hard to > understand. The software works very well and there are a lot of tools to > make maven do whatever you need. > > 6) Ask here. The community is really helpful if occasionally too cryptic. > > Good luck, you have made a good decision to get properly structured using > maven > > Ron > > > Josh Stone wrote: > >> I'm in the process of moving our company over to Maven, and am not sure of >> the best way to organize our existing projects. Currently our application >> stack consists of two dozen projects with various dependencies on each >> other. For projects that a developer is actively working on, these should >> be >> built locally from source whereas dependencies on all other projects >> should >> be resolved from jars in the maven repository. I've setup 1 pom for each >> project, but there are a few things I'm not sure about: >> >> Since any given project could be built locally from source or from jars, >> do >> I need two poms for each project, one to serve as a "build" pom and one to >> reference jars? >> Should I store the pom(s) in SCM along with having them in the maven >> repository? >> >> Any tips are appreciated, >> Josh >> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: maven 3 warning on dependency scope import?
The Sonatype blog republished a tip from October 2009 in their best of series (see http://www.sonatype.com/people/2009/10/maven-tips-and-tricks-grouping-dependencies/) that didn't use scope import for specifying a POM dependency. I tried this with 3.0 and it works and avoids the warning (see below). The confusing thing is that the Maven documentation indicates that scope=import should be used for POM dependencies (see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope). Is this a case of using POM dependencies in dependencyManagement vs build? gabe97330 wrote: > > I'm using maven 3.0-alpha-3 and getting a warning on use of dependencies > of > scope import in sub-modules although everything works as it did in 2.x. > there a way to address this warning either through correcting my usage > (assuming it is a valid warning) or some sort of pragma to turn off the > warning? > > Thanks, > > Gabe > > > - > > Blog: Gabe's Groove > Twitter: Gabe97330 > - Blog: http://gabe97330.begeddov.com Gabe's Groove Twitter: http://twitter.com/gabe97330 Gabe97330 -- View this message in context: http://old.nabble.com/maven-3-warning-on-dependency-scope-import--tp26385938p27308001.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
Generate 2 war with the same POM
Hello, I want to generate two war from the same project. I managed to solve the problem with profiles, but I'm not satisfied with the solution. In the POM I set this: test1 maven-war-plugin ${basedir}/repoA repoA ${basedir}/repoB repoB warTest1 test1 maven-war-plugin ${basedir}/repoA repoA ${basedir}/repoC repoC warTest2 How can I do to factorize some informations between differents profiles. In the example above, I would like to factorize the adding of repo in the war. Thank you. Rémy -- View this message in context: http://old.nabble.com/Generate-2-war-with-the-same-POM-tp27307985p27307985.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
add dependency using maven-assembly-plugin
Hi, is it possible to add a dependency (i.e a JDBC Connector for PostgreSQL) to an assembly using the maven-assembly-plugin by just providing the groupId, artifactId and version? I've tried to use the moduleSet, but with no luck. Any clue? Best regards, Viggo Navarsete
failsafe-maven-plugin and test resources
I am now using the failsafe-maven-plugin to run my integration tests, however some of these tests require external resources which I have placed in src/test/resources. It appears that these resources are copied to the target, but that it occurs after the integration-test - which causes my integration tests to fail :-( e.g. - $ mvn clean $ file /home/CORP/aretter/NetBeansProjects/new-DataWarehouse/tools/SchemaShredder/target/test-classes/schemas/ndew/LIG-CEPC-3.1/element-tree.correct /home/CORP/aretter/NetBeansProjects/new-DataWarehouse/tools/SchemaShredder/target/test-classes/schemas/ndew/LIG-CEPC-3.1/element-tree.correct: ERROR: cannot open `/home/CORP/aretter/NetBeansProjects/new-DataWarehouse/tools/SchemaShredder/target/test-classes/schemas/ndew/LIG-CEPC-3.1/element-tree.correct' (No such file or directory) As expected, then - $ mvn integration-test The test fails with - java.io.FileNotFoundException: file:/home/CORP/aretter/NetBeansProjects/new-DataWarehouse/tools/SchemaShredder/target/test-classes/schemas/ndew/LIG-CEPC-3.1/element-tree.correct (No such file or directory) at java.io.FileInputStream.open(Native Method) However, the file command indicates that the file does exist - $ file /home/CORP/aretter/NetBeansProjects/new-DataWarehouse/tools/SchemaShredder/target/test-classes/schemas/ndew/LIG-CEPC-3.1/element-tree.correct /home/CORP/aretter/NetBeansProjects/new-DataWarehouse/tools/SchemaShredder/target/test-classes/schemas/ndew/LIG-CEPC-3.1/element-tree.correct: ASCII text, with CRLF line terminators So I assume the resources plugin is executed after my failsafe plugin, can I some how change this? Or do I have a configuration error somewhere? -- Adam Retter skype :adam.retter http://www.adamretter.org.uk - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Force directory change when executing integration tests from parent pom
[Off Topic] Don't run "mvn integration-test" as the post-integration-test will never be executed, instead run "mvn verify" (and it's shorter to type) 2010/1/25 Jacek Furmankiewicz > We have a fairly complex set of integration tests that rely on embedded > Jetty and a JNDI setup file we provide for it. > In that file we have references to external resources via relative file > paths. > > This works great if we run "mvn integration test" from that project folder. > > However, it bombs if we run the same command from the parent pom folder. > The > relative paths are obviously off and everything crashes. > > How can we tell the parent pom that when it runs integration tests for it > children it should run them from that child pom's directory? > > Thanks > Jacek >
Force directory change when executing integration tests from parent pom
We have a fairly complex set of integration tests that rely on embedded Jetty and a JNDI setup file we provide for it. In that file we have references to external resources via relative file paths. This works great if we run "mvn integration test" from that project folder. However, it bombs if we run the same command from the parent pom folder. The relative paths are obviously off and everything crashes. How can we tell the parent pom that when it runs integration tests for it children it should run them from that child pom's directory? Thanks Jacek
Re: failsafe-maven-plugin configuration issues
I tried to add a second compile phase but this didnt seem to help - org.apache.maven.plugins maven-compiler-plugin 1.6 1.6 compile-it pre-integration-test compile ${basedir}/src/systest/java/**/*.java Any chance, you could explain to me a simple pom.xml where I have my Unit tests and Integration tests separated? 2010/1/25 Stephen Connolly : > failsafe & surefire do not compile the classes. m-compiler-p is responsible > for compiling the classes > > 2010/1/25 Adam Retter >> >> Just wondering how they compile when I change the inclusion to >> "*/*.java" for the failsafe plugin? >> >> Is there some better way of doing this whilst keeping the Unit Tests >> and Integration Tests in separate folders? >> >> 2010/1/25 Stephen Connolly : >> > you are failing to also compile your integration tests you'd need a >> > second execution of compiler:testCompile >> > >> > 2010/1/25 Adam Retter >> >> >> >> I have both Unit tests and Integration tests in my project and was >> >> attempting to manage this with the Surefire plugin in this way - >> >> >> >> http://weblogs.java.net/blog/johnsmart/archive/2008/06/unit_tests_are.html >> >> But I ran into problems - >> >> >> >> >> >> http://markmail.org/search/?q=list%3Aorg.apache.maven.users#query:list%3Aorg.apache.maven.users+page:4+mid:om7z6osunu5pz4gm+state:results >> >> >> >> It was recommended that I switch to the failsafe-maven-plugin for >> >> managing my integration tests and as such I modified my project layout >> >> so it looks like this - >> >> >> >> src/main/java >> >> src/main/resources >> >> src/test/java >> >> src/test/resources >> >> src/systest/java >> >> src/systest/resources >> >> >> >> So the idea is that I keep my tests in src/test and my integration >> >> tests in src/systest. I added the following to my pom.xml - >> >> >> >> >> >> org.codehaus.mojo >> >> failsafe-maven-plugin >> >> >> >> >> >> >> >> ${basedir}/src/systest/java >> >> >> >> *.java >> >> >> >> >> >> >> >> >> >> integration-test >> >> integration-test >> >> >> >> integration-test >> >> >> >> >> >> >> >> verify >> >> verify >> >> >> >> verify >> >> >> >> >> >> >> >> >> >> >> >> >> >> But only the unit tests are run in the test goal and no integration >> >> tests are found or run during the integration-test goal. >> >> If I change the inclusion to "**/*.java", then the problem is that the >> >> unit tests are run during the test goal and the unit tests and >> >> integration tests are mixed up and run together during the >> >> integration-test goal. The idea is that the integration-test goal >> >> should just run the integration tests (obviously after running the >> >> unit tests as part of the test goal). >> >> >> >> So what am I doing wrong here? >> >> >> >> -- >> >> Adam Retter >> >> >> >> skype :adam.retter >> >> http://www.adamretter.org.uk >> > >> > >> >> >> >> -- >> Adam Retter >> >> skype :adam.retter >> http://www.adamretter.org.uk > > -- Adam Retter skype :adam.retter http://www.adamretter.org.uk - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: failsafe-maven-plugin configuration issues
failsafe & surefire do not compile the classes. m-compiler-p is responsible for compiling the classes 2010/1/25 Adam Retter > Just wondering how they compile when I change the inclusion to > "*/*.java" for the failsafe plugin? > > Is there some better way of doing this whilst keeping the Unit Tests > and Integration Tests in separate folders? > > 2010/1/25 Stephen Connolly : > > you are failing to also compile your integration tests you'd need a > > second execution of compiler:testCompile > > > > 2010/1/25 Adam Retter > >> > >> I have both Unit tests and Integration tests in my project and was > >> attempting to manage this with the Surefire plugin in this way - > >> > http://weblogs.java.net/blog/johnsmart/archive/2008/06/unit_tests_are.html > >> But I ran into problems - > >> > >> > http://markmail.org/search/?q=list%3Aorg.apache.maven.users#query:list%3Aorg.apache.maven.users+page:4+mid:om7z6osunu5pz4gm+state:results > >> > >> It was recommended that I switch to the failsafe-maven-plugin for > >> managing my integration tests and as such I modified my project layout > >> so it looks like this - > >> > >> src/main/java > >> src/main/resources > >> src/test/java > >> src/test/resources > >> src/systest/java > >> src/systest/resources > >> > >> So the idea is that I keep my tests in src/test and my integration > >> tests in src/systest. I added the following to my pom.xml - > >> > >> > >>org.codehaus.mojo > >>failsafe-maven-plugin > >> > >> > >> > >> ${basedir}/src/systest/java > >> > >>*.java > >> > >> > >> > >> > >>integration-test > >>integration-test > >> > >> integration-test > >> > >> > >> > >>verify > >>verify > >> > >> verify > >> > >> > >> > >> > >> > >> > >> But only the unit tests are run in the test goal and no integration > >> tests are found or run during the integration-test goal. > >> If I change the inclusion to "**/*.java", then the problem is that the > >> unit tests are run during the test goal and the unit tests and > >> integration tests are mixed up and run together during the > >> integration-test goal. The idea is that the integration-test goal > >> should just run the integration tests (obviously after running the > >> unit tests as part of the test goal). > >> > >> So what am I doing wrong here? > >> > >> -- > >> Adam Retter > >> > >> skype :adam.retter > >> http://www.adamretter.org.uk > > > > > > > > -- > Adam Retter > > skype :adam.retter > http://www.adamretter.org.uk >
Re: failsafe-maven-plugin configuration issues
Just wondering how they compile when I change the inclusion to "*/*.java" for the failsafe plugin? Is there some better way of doing this whilst keeping the Unit Tests and Integration Tests in separate folders? 2010/1/25 Stephen Connolly : > you are failing to also compile your integration tests you'd need a > second execution of compiler:testCompile > > 2010/1/25 Adam Retter >> >> I have both Unit tests and Integration tests in my project and was >> attempting to manage this with the Surefire plugin in this way - >> http://weblogs.java.net/blog/johnsmart/archive/2008/06/unit_tests_are.html >> But I ran into problems - >> >> http://markmail.org/search/?q=list%3Aorg.apache.maven.users#query:list%3Aorg.apache.maven.users+page:4+mid:om7z6osunu5pz4gm+state:results >> >> It was recommended that I switch to the failsafe-maven-plugin for >> managing my integration tests and as such I modified my project layout >> so it looks like this - >> >> src/main/java >> src/main/resources >> src/test/java >> src/test/resources >> src/systest/java >> src/systest/resources >> >> So the idea is that I keep my tests in src/test and my integration >> tests in src/systest. I added the following to my pom.xml - >> >> >> org.codehaus.mojo >> failsafe-maven-plugin >> >> >> >> ${basedir}/src/systest/java >> >> *.java >> >> >> >> >> integration-test >> integration-test >> >> integration-test >> >> >> >> verify >> verify >> >> verify >> >> >> >> >> >> >> But only the unit tests are run in the test goal and no integration >> tests are found or run during the integration-test goal. >> If I change the inclusion to "**/*.java", then the problem is that the >> unit tests are run during the test goal and the unit tests and >> integration tests are mixed up and run together during the >> integration-test goal. The idea is that the integration-test goal >> should just run the integration tests (obviously after running the >> unit tests as part of the test goal). >> >> So what am I doing wrong here? >> >> -- >> Adam Retter >> >> skype :adam.retter >> http://www.adamretter.org.uk > > -- Adam Retter skype :adam.retter http://www.adamretter.org.uk - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: failsafe-maven-plugin configuration issues
you are failing to also compile your integration tests you'd need a second execution of compiler:testCompile 2010/1/25 Adam Retter > I have both Unit tests and Integration tests in my project and was > attempting to manage this with the Surefire plugin in this way - > http://weblogs.java.net/blog/johnsmart/archive/2008/06/unit_tests_are.html > But I ran into problems - > > http://markmail.org/search/?q=list%3Aorg.apache.maven.users#query:list%3Aorg.apache.maven.users+page:4+mid:om7z6osunu5pz4gm+state:results > > It was recommended that I switch to the failsafe-maven-plugin for > managing my integration tests and as such I modified my project layout > so it looks like this - > > src/main/java > src/main/resources > src/test/java > src/test/resources > src/systest/java > src/systest/resources > > So the idea is that I keep my tests in src/test and my integration > tests in src/systest. I added the following to my pom.xml - > > >org.codehaus.mojo >failsafe-maven-plugin > > > > ${basedir}/src/systest/java > >*.java > > > > >integration-test >integration-test > > integration-test > > > >verify >verify > > verify > > > > > > > But only the unit tests are run in the test goal and no integration > tests are found or run during the integration-test goal. > If I change the inclusion to "**/*.java", then the problem is that the > unit tests are run during the test goal and the unit tests and > integration tests are mixed up and run together during the > integration-test goal. The idea is that the integration-test goal > should just run the integration tests (obviously after running the > unit tests as part of the test goal). > > So what am I doing wrong here? > > -- > Adam Retter > > skype :adam.retter > http://www.adamretter.org.uk >
Arbitrary artifacts in an assembly
Hi, I'd like to include some binaries (a Java service wrapper called Tanuki) in my assemblies that I make for several platforms (like win32, win64, linux32, linux64 etc.). Each platform has its own assembly, and requires a different set of binaries (win32, win64 etc. respectively). All the assemblies are built as part of one Maven project called "assemblies". The Tanuki binaries are deployed as artifacts to my repository, under the same group and artifact ID, but with different classifiers. Do I have to make these binary artifacts a dependency of the project to be able to include them in the assemblies? This does not seem to be a nice solution, as I'd have to add a lot of filtering in the assembly descriptors to bundle only the required binaries with each assembly. I'd much more like a solution like what the dependency plugin has in its unpack and copy goals, i.e. to just specify some that need to be copied/unpacked to directories in the assemblies. Can I do this with the current assembly plugin? If not, is there such a feature planned? Regards, Lóránt - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
failsafe-maven-plugin configuration issues
I have both Unit tests and Integration tests in my project and was attempting to manage this with the Surefire plugin in this way - http://weblogs.java.net/blog/johnsmart/archive/2008/06/unit_tests_are.html But I ran into problems - http://markmail.org/search/?q=list%3Aorg.apache.maven.users#query:list%3Aorg.apache.maven.users+page:4+mid:om7z6osunu5pz4gm+state:results It was recommended that I switch to the failsafe-maven-plugin for managing my integration tests and as such I modified my project layout so it looks like this - src/main/java src/main/resources src/test/java src/test/resources src/systest/java src/systest/resources So the idea is that I keep my tests in src/test and my integration tests in src/systest. I added the following to my pom.xml - org.codehaus.mojo failsafe-maven-plugin ${basedir}/src/systest/java *.java integration-test integration-test integration-test verify verify verify But only the unit tests are run in the test goal and no integration tests are found or run during the integration-test goal. If I change the inclusion to "**/*.java", then the problem is that the unit tests are run during the test goal and the unit tests and integration tests are mixed up and run together during the integration-test goal. The idea is that the integration-test goal should just run the integration tests (obviously after running the unit tests as part of the test goal). So what am I doing wrong here? -- Adam Retter skype :adam.retter http://www.adamretter.org.uk - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Especify different dependencies for different JARs on the same project
Hi, I would like to create more than one jar file from one maven project. The reason is that i have a project in about 4 subprojects. Then, i create another subproject for subprojects common classes. I used the jar plugin to create a jar per subproject, but it includes the pom.xml with all dependencies, so its not what i want. I dont know how i could establish the dependencies of each jar, with a pom.xml for each subproject jar, with the dependency plugin or somehow. I'll apreciate any help. Thanks I leave my pom if it helps http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> ${parent-project} ${groupId} ${parent-version} 4.0.0 ${groupId} ${common-classes} jar ${common-classes-version} ${common-classes} maven-compiler-plugin 1.5 1.5 org.apache.maven.plugins maven-jar-plugin 2.3 subproject1 package jar ${subproject1-classifier} **/utils/* **/commons/** **/signature/* subproject2 package jar ${subproject2-classifier} **/utils/* **/commons/** **/certificates/* certificates.properties webapp package jar ${webapp-classifier} **/utils/filters/* **/service/* **/ws/** **/xmlschema/* org.apache.maven.plugins maven-install-plugin subproject1 install install-file ${project.build.directory}/${project.build.finalName}-${subproject1-classifier}.${project.packaging} ${groupId} ${subproject2-commons} ${subproject2-commons-version} jar subproject2 install install-file ${project.build.directory}/${project.build.finalName}-${subproject2-classifier}.${project.packaging} ${groupId} ${subproject2-commons} ${subproject2-commons-version} jar webapp install install-file ${project.build.directory}/${project.build.finalName}-${webapp-classifier}.${project.packaging} ${groupId} ${webapp-commons} ${webapp-commons-version} jar false maven http://repo2.maven.org/maven2 false apache Apache Repository http://people.apache.org/repo/m2-ibiblio-rsync-repository