RE: How to create 3 different jars from a single mvn package command?
I might have to try the assembly plugin method. Personally, I use a jar task in an antrun plugin execution to create the jars, then use the buildhelper plugin to attach them to the project. Chris -Original Message- From: Stefano Bagnara [mailto:[EMAIL PROTECTED] Sent: Thursday, 10 May, 2007 08:31 To: Maven Users List Subject: Re: How to create 3 different jars from a single mvn package command? I use the assembly plugin. plugin artifactIdmaven-assembly-plugin/artifactId version2.2-beta-1/version configuration descriptorSourceDirectory${basedir}/src/assemble//descriptorSourceDir ectory /configuration /plugin and then in the src/assemble I create xml files like this: assembly formats formatjar/format /formats includeBaseDirectoryfalse/includeBaseDirectory fileSets fileSet directory./what/to/include/folder//directory useDefaultExcludestrue/useDefaultExcludes outputDirectory/outputDirectory /fileSet ...more file sets... /fileSets /assembly Stefano suchitra ha scritto: How do I create three separate jars (of classes) in the target directory, from a single source file? For example, A |---src | |---main ||java | |my_java files |--target |--classes |-my_class files X-1.0-SNAPSHOT.jar | Y-1.0-SNAPSHOT.jar |--instead of a single A.jar file (using mvn package) Z-1.0-SNAPSHOT.jar | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: org.mozilla.javascript repo?
I think you're looking for the rhino:js artifacts. http://www.mvnrepository.com/artifact/rhino/js Chris -Original Message- From: mateamargo [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 April, 2007 15:52 To: users@maven.apache.org Subject: org.mozilla.javascript repo? I'm using a project that depends on org.mozilla.javascript, but I can't find any repository that holds it. Anyone knows where I can find it? Thanks, -- View this message in context: http://www.nabble.com/org.mozilla.javascript-repo--tf3597494s1 77.html#a10047509 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tools.jar Apple
I don't think you need to add tools.jar as a dependency on Mac. See http://maven.apache.org/general.html#tools-jar-dependency Chris -Original Message- From: Ryan Cuprak [mailto:[EMAIL PROTECTED] Sent: Tuesday, 06 March, 2007 13:19 To: Maven Users List Subject: Tools.jar Apple Hello, I am trying to get the jaxws-maven-plugin up and running on my box. Evidently Apple has been kind enough to stick tools.jar elsewhere. Any reason why the snippet below wouldn't work? -Ryan Snippet: plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdjaxws-maven-plugin/artifactId version1.0-beta-1-SNAPSHOT/version executions execution goals goalwsgen/goal /goals /execution /executions configuration seinet.cuprak.ryanportal/sei genWsdltrue/genWsdl /configuration dependencies dependency groupIdsun.jdk/groupId artifactIdtools/artifactId version1.5.0/version systemPath/System/Library/Frameworks/ JavaVM.framework/Versions/1.5/Classes/classes.jar/systemPath scopesystem/scope /dependency /dependencies /plugin /plugins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven-antrun-plugin regexp
Here's the dependencies we use for regexp in antrun: dependency groupIdant/groupId artifactIdant-apache-regexp/artifactId version1.6.5/version /dependency dependency groupIdjakarta-regexp/groupId artifactIdjakarta-regexp/artifactId version1.4/version /dependency We also have this is in the plugin configuration: property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.JakartaRegexpRegexp/ Though I'm not sure it's actually necessary. Chris -Original Message- From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 January, 2007 13:34 To: users@maven.apache.org Subject: Maven-antrun-plugin regexp I am having some issues with maven-antrun-plugin when using mapper type=regexp The error message says, No supported regular expression matcher found I am using JDK1.5, Maven2 and also tried adding lot of dependencies like ant-apache-regexp, ant-jakarta-regexp, ant-jakarta-oro, ant-nodeps. But nothing worked. Any idea how to solve this. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven-antrun-plugin regexp
You probably want the classpathref to be maven.plugin.classpath. -Original Message- From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 January, 2007 13:53 To: Maven Users List Subject: RE: Maven-antrun-plugin regexp Hi Chris, That didn't work .. Here is my pom and build.xml. Could you please check it out and see if any issues. Thanks for your help Pom.xml ?xml version=1.0 encoding=UTF-8? project modelVersion4.0.0/modelVersion groupIdcom.cisco.nm.glue/groupId artifactIdant-test/artifactId version1.0/version packagingpom/packaging nameProject POM for Ant Testing/name build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phaseinstall/phase configuration tasks property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.JakartaRegexpRegexp/ property name=version value=${project.version}/ ant antfile=C:\MavenProject\ant-test\build.xml inheritRefs=true target name=echo / /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdant/groupId artifactIdant-apache-regexp/artifactId version1.6.5/version /dependency dependency groupIdjakarta-regexp/groupId artifactIdjakarta-regexp/artifactId version1.4/version /dependency /dependencies /project Build.xml ?xml version=1.0 encoding=UTF-8? project default=echo name=Main_Dev target name=echo echoECHO MESSAGE - ${version}/echo copy todir=../com.cisco.nm.cmp.client fileset dir=../ant-test filename name=*.jar / /fileset mapper type=regexp from=^(.*?)-(.*).jar$$ to=\1.jar classpathref=maven.compile.classpath/ /copy /target /project Thanks -Jagan -Original Message- From: Chris Hilton [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 31, 2007 11:39 AM To: Maven Users List Subject: RE: Maven-antrun-plugin regexp Here's the dependencies we use for regexp in antrun: dependency groupIdant/groupId artifactIdant-apache-regexp/artifactId version1.6.5/version /dependency dependency groupIdjakarta-regexp/groupId artifactIdjakarta-regexp/artifactId version1.4/version /dependency We also have this is in the plugin configuration: property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.JakartaRegexpRegexp/ Though I'm not sure it's actually necessary. Chris -Original Message- From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 January, 2007 13:34 To: users@maven.apache.org Subject: Maven-antrun-plugin regexp I am having some issues with maven-antrun-plugin when using mapper type=regexp The error message says, No supported regular expression matcher found I am using JDK1.5, Maven2 and also tried adding lot of dependencies like ant-apache-regexp, ant-jakarta-regexp, ant-jakarta-oro, ant-nodeps. But nothing worked. Any idea how to solve this. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven-antrun-plugin regexp
The only other thing I can think of is that the following issue may be affecting you: http://jira.codehaus.org/browse/MANTRUN-49 -Original Message- From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 January, 2007 14:08 To: Maven Users List Subject: RE: Maven-antrun-plugin regexp That didn't work. I think somehow the classpath is not getting passed to the ant script. Even javac is failing javac srcdir=C:\MavenProject\bug-reporting\src\main\java classpath refid=maven.plugin.classpath/ /javac Embedded error: The following error occurred while executing this line: C:\MavenProject\ant-test\build.xml:19: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK Any idea? -Original Message- From: Chris Hilton [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 31, 2007 12:01 PM To: Maven Users List Subject: RE: Maven-antrun-plugin regexp You probably want the classpathref to be maven.plugin.classpath. -Original Message- From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 January, 2007 13:53 To: Maven Users List Subject: RE: Maven-antrun-plugin regexp Hi Chris, That didn't work .. Here is my pom and build.xml. Could you please check it out and see if any issues. Thanks for your help Pom.xml ?xml version=1.0 encoding=UTF-8? project modelVersion4.0.0/modelVersion groupIdcom.cisco.nm.glue/groupId artifactIdant-test/artifactId version1.0/version packagingpom/packaging nameProject POM for Ant Testing/name build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phaseinstall/phase configuration tasks property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.JakartaRegexpRegexp/ property name=version value=${project.version}/ ant antfile=C:\MavenProject\ant-test\build.xml inheritRefs=true target name=echo / /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupIdant/groupId artifactIdant-apache-regexp/artifactId version1.6.5/version /dependency dependency groupIdjakarta-regexp/groupId artifactIdjakarta-regexp/artifactId version1.4/version /dependency /dependencies /project Build.xml ?xml version=1.0 encoding=UTF-8? project default=echo name=Main_Dev target name=echo echoECHO MESSAGE - ${version}/echo copy todir=../com.cisco.nm.cmp.client fileset dir=../ant-test filename name=*.jar / /fileset mapper type=regexp from=^(.*?)-(.*).jar$$ to=\1.jar classpathref=maven.compile.classpath/ /copy /target /project Thanks -Jagan -Original Message- From: Chris Hilton [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 31, 2007 11:39 AM To: Maven Users List Subject: RE: Maven-antrun-plugin regexp Here's the dependencies we use for regexp in antrun: dependency groupIdant/groupId artifactIdant-apache-regexp/artifactId version1.6.5/version /dependency dependency groupIdjakarta-regexp/groupId artifactIdjakarta-regexp/artifactId version1.4/version /dependency We also have this is in the plugin configuration: property name=ant.regexp.regexpimpl value=org.apache.tools.ant.util.regexp.JakartaRegexpRegexp/ Though I'm not sure it's actually necessary. Chris -Original Message- From: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 January, 2007 13:34 To: users@maven.apache.org Subject: Maven-antrun-plugin regexp I am having some issues with maven-antrun-plugin when using mapper type=regexp The error message says, No supported regular expression matcher found I am using JDK1.5, Maven2 and also tried adding lot of dependencies like ant-apache-regexp, ant-jakarta-regexp, ant-jakarta-oro, ant-nodeps. But nothing worked. Any idea how to solve this. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e
RE: mvn test - how to invoke a specific class from command line
We do something similar here with a profile: profile idtest-name/id build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration includes include${test.name}.java/include /includes /configuration /plugin /plugins /build /profile Then we can invoke mvn -Ptest-name -Dtest.name=com/example/SomeClassTest test. We have a similar profile for testing an entire package. Hope that gives you some ideas. Chris -Original Message- From: Lisa [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 January, 2007 13:13 To: users@maven.apache.org Subject: mvn test - how to invoke a specific class from command line Is there a way to create a pom.xml file that will run only tests in one class from the command line? I want to type: mvn target Where target can be any word I choose and have it execute all tests in a specific class only. there may be many, many classes in the test directories, I only want it to execute one single class, or possibly several classes in sequence, but I want to choose which ones. Any help would be greatly appreciated. Lisa -- View this message in context: http://www.nabble.com/mvn-test---how-to-invoke-a-specific-clas s-from-command-line-tf3066182s177.html#a8528263 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven2 is not working with Eclipse
Vote for MNGECLIPSE-232. http://jira.codehaus.org/browse/MNGECLIPSE-232 As a workaround, you can use the just released m2eclipse 0.0.10 and copy the settings.xml to your user-level settings (~/.m2/settings.xml) (resolved by MNGECLIPSE-29). Chris -Original Message- From: Morgovsky, Alexander (US - Glen Mills) [mailto:[EMAIL PROTECTED] Sent: Saturday, 20 January, 2007 15:47 To: users@maven.apache.org Subject: Maven2 is not working with Eclipse I have seen many people talk about this problem, but I have not seen a solution for this. The Maven2 Eclipse plugin does not read the settings.xml file in %M2_HOME%/conf. I am familiar with http://jira.codehaus.org/browse/MNGECLIPSE-29. May someone please tell me what I can do have Eclipse pick up the settings.xml file? The developers here are considering this to be a serious problem, and I honestly cannot propose a solution. May someone please help me? This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [M2] Excluding some classes directories when packaging an artifact
I'm not sure if you can influence the main artifact like that, but you can use the antrun plugin to create a secondary jar artifact like you want, then use the build-helper-maven-plugin to attach it to the project with a classifier. When you use it as a dependendency, you'll have to be careful to always use the classifier so you get the jar with the reduced set of files. Chris -Original Message- From: Roberto UserList [mailto:[EMAIL PROTECTED] Sent: Wednesday, 17 January, 2007 06:41 To: Maven User List Subject: Re: [M2] Excluding some classes directories when packaging an artifact Hi all! Especially Franz. I think I was not clear enough in the previous e-mail. There are some subdirectories in one of the subprojects of my system. After compiling all files of all subdirectories of my system, I need to package the class files of only two subdirectories into a jar file. How can I do this king of thing? I'm not responsable for the system, so, there is no possibility to change the structure of it. Thanks in advance for help. Regards, Roberto. On 1/16/07, Roberto UserList [EMAIL PROTECTED] wrote: Hi, all! After compiling a subproject, I'd like to package an artifact, .jar file, but excluding some classes directories. How can I do to exclude these directories? Thanks in advance for help. Regards, Roberto. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Eclipse not picking up settings.xml
If you mean you're using the m2eclipse plugin, you should vote for MNGECLIPSE-232. Reading the user-level settings.xml file is fixed (MNGECLIPSE-29) but unreleased; you'll have to check the plugin out and build it if you want to use that. http://jira.codehaus.org/browse/MNGECLIPSE-232 Chris -Original Message- From: Morgovsky, Alexander (US - Glen Mills) [mailto:[EMAIL PROTECTED] Sent: Friday, 12 January, 2007 12:25 To: users@maven.apache.org Subject: Eclipse not picking up settings.xml What do I need to do to configure Eclipse 3.2 to pick up the settings.xml file defined in %M2_HOME%/conf? Thanks. This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven version management in ant
Perhaps I'm not following, but how is the my.compile.dependency.fileset different from what you want? Unless you really wanted a path reference, in which case you replace filesetId with pathId. Or you want that in a property? Then add: property name=my.compile.dependency.fileset refid=my.compile.dependency.fileset/ Am I missing something here? Chris -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 09:24 To: Maven Users List Subject: RE: maven version management in ant All of these are blank: echo${maven.dependency.classpath}/echo echo${maven.compile.classpath}/echo echo${maven.runtime.classpath}/echo echo${maven.test.classpath}/echo echo${maven.plugin.classpath}/echo Here is my full target: target name=init artifact:pom id=project file=pom.xml/ artifact:dependencies filesetId=my.compile.dependency.fileset usescope=compile verbose=true pom refid=project/ /artifact:dependencies echoThe version is ${project.version}/echo echo ${project.build.directory}/echo echo ${project.name}/echo echo ${project.dependencies}/echo echo${maven.dependency.classpath}/echo echo${maven.compile.classpath}/echo echo${maven.runtime.classpath}/echo echo${maven.test.classpath}/echo echo${maven.plugin.classpath}/echo !-- echoproperties/ -- /target As a crappy hack, from: artifact:dependencies filesetId=my.compile.dependency.fileset usescope=compile verbose=true pom refid=project/ /artifact:dependencies I can use that as a fileset to copy from the m2 repository to some local folder for building (and then I'll just include anything in that folder). But this stinks as when we have 10 projects, these dependent jars will be all over the place. This feels like a bug and limited functionality when using the following technique to build with ant and manage dependencies with maven2: project name=utils default=compile xmlns:artifact=antlib:org.apache.maven.artifact.ant -Original Message- From: Barrett Nuzum [mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 11:10 AM To: Maven Users List Subject: RE: maven version management in ant EJ: Unsure if it's the same in maven2, but maven.dependency.classpath contained dependencies in m1. I have a feeling you'll have to splice maven.compile.classpath in with it, though. http://wiki.astrogrid.org/bin/view/Astrogrid/UsefulMavenNotes# How_to_fin d_out_what_is_actually HTH Barrett :: Barrett Nuzum Consultant, Skill Development Direct: 918.640.4414 Fax: 972.789.1340 Valtech Technologies, Inc. 5080 Spectrum Drive Suite 700 West Addison, Texas 75001 www.valtech.com http://www.valtech.com making IT business friendly From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Mon 1/8/2007 8:19 AM To: Maven Users List Subject: RE: maven version management in ant Bump - I could really use some feed back here people, this has me completely wedged... -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 3:56 PM To: Maven Users List Subject: RE: maven version management in ant I made it a bit further: project name=capi default=compile xmlns:artifact=antlib:org.apache.maven.artifact.ant target name=init artifact:pom id=project file=pom.xml/ echoThe version is ${project.version}/echo echo ${project.build.directory}/echo echo ${project.name}/echo echo ${project.dependencies}/echo !-- echoproperties/ -- /target target name=compile depends=init mkdir dir=target/classes/ javac srcdir=src/main/java destdir=target/classes includes=**/*.java classpathref=maven.project.classpath debug=on / /target Is the actual classpath used for compiling unavailable to ant as a property? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 2:07 PM To: Maven Users List Subject: RE: maven version management in ant New question, so I'm loading via a pom.xml file, how can I reference the classpath (filled with dependencies)? project name=capi default=compile xmlns:artifact=antlib:org.apache.maven.artifact.ant target name=init artifact:pom id=project file=pom.xml / echoThe version is ${project.version}/echo echo ${project.build.directory}/echo !-- echoproperties/ -- /target target name=compile depends=init mkdir dir=target/classes/ javac srcdir=src/main/java destdir=target/classes includes=**/*.java classpathref=maven.project.classpath debug=on
RE: maven version management in ant
It is in the docs, but a second set of eyes never hurt. http://maven.apache.org/ant-tasks.html Glad I could help. Chris -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 12:26 To: Maven Users List Subject: RE: maven version management in ant That seems to be working! Thank you so much for this! How was one to know that pathId existed? -Original Message- From: Chris Hilton [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 09, 2007 11:16 AM To: Maven Users List Subject: RE: maven version management in ant Perhaps I'm not following, but how is the my.compile.dependency.fileset different from what you want? Unless you really wanted a path reference, in which case you replace filesetId with pathId. Or you want that in a property? Then add: property name=my.compile.dependency.fileset refid=my.compile.dependency.fileset/ Am I missing something here? Chris -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 09:24 To: Maven Users List Subject: RE: maven version management in ant All of these are blank: echo${maven.dependency.classpath}/echo echo${maven.compile.classpath}/echo echo${maven.runtime.classpath}/echo echo${maven.test.classpath}/echo echo${maven.plugin.classpath}/echo Here is my full target: target name=init artifact:pom id=project file=pom.xml/ artifact:dependencies filesetId=my.compile.dependency.fileset usescope=compile verbose=true pom refid=project/ /artifact:dependencies echoThe version is ${project.version}/echo echo ${project.build.directory}/echo echo ${project.name}/echo echo ${project.dependencies}/echo echo${maven.dependency.classpath}/echo echo${maven.compile.classpath}/echo echo${maven.runtime.classpath}/echo echo${maven.test.classpath}/echo echo${maven.plugin.classpath}/echo !-- echoproperties/ -- /target As a crappy hack, from: artifact:dependencies filesetId=my.compile.dependency.fileset usescope=compile verbose=true pom refid=project/ /artifact:dependencies I can use that as a fileset to copy from the m2 repository to some local folder for building (and then I'll just include anything in that folder). But this stinks as when we have 10 projects, these dependent jars will be all over the place. This feels like a bug and limited functionality when using the following technique to build with ant and manage dependencies with maven2: project name=utils default=compile xmlns:artifact=antlib:org.apache.maven.artifact.ant -Original Message- From: Barrett Nuzum [mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 11:10 AM To: Maven Users List Subject: RE: maven version management in ant EJ: Unsure if it's the same in maven2, but maven.dependency.classpath contained dependencies in m1. I have a feeling you'll have to splice maven.compile.classpath in with it, though. http://wiki.astrogrid.org/bin/view/Astrogrid/UsefulMavenNotes# How_to_fin d_out_what_is_actually HTH Barrett :: Barrett Nuzum Consultant, Skill Development Direct: 918.640.4414 Fax: 972.789.1340 Valtech Technologies, Inc. 5080 Spectrum Drive Suite 700 West Addison, Texas 75001 www.valtech.com http://www.valtech.com making IT business friendly From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Mon 1/8/2007 8:19 AM To: Maven Users List Subject: RE: maven version management in ant Bump - I could really use some feed back here people, this has me completely wedged... -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 3:56 PM To: Maven Users List Subject: RE: maven version management in ant I made it a bit further: project name=capi default=compile xmlns:artifact=antlib:org.apache.maven.artifact.ant target name=init artifact:pom id=project file=pom.xml/ echoThe version is ${project.version}/echo echo ${project.build.directory}/echo echo ${project.name}/echo echo ${project.dependencies}/echo !-- echoproperties/ -- /target target name=compile depends=init mkdir dir=target/classes/ javac srcdir=src/main/java destdir=target/classes includes=**/*.java classpathref=maven.project.classpath debug=on / /target Is the actual classpath used for compiling unavailable to ant as a property? -Original Message- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007
RE: Maven 2 Eclipse plugin : proxy problem : NoRouteToHostException
That's not working in 0.0.9, but has been fixed for 0.0.10, soon to be released (hopefully). http://jira.codehaus.org/browse/MNGECLIPSE-29 That fix will pick up your settings from the user home directory. Please vote for the following issue to add the ability to have m2eclipse pick up a global settings.xml as well. http://jira.codehaus.org/browse/MNGECLIPSE-232 Chris -Original Message- From: Marouane Amraoui [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 14:59 To: Maven Users List Subject: Maven 2 Eclipse plugin : proxy problem : NoRouteToHostException Hi, Using maven 2, eclipse 3.2, m2eclipse 0.0.9. I have : setting.xml in both maven install directory and userhome.../.m2/setting.xml Don't success to get rout to remote repository Thx. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: plugin not found error and jta
Javier, can you do me a favor and tell what the contents of the following directory in your repository is? Hopefully you can do this before the -U Wayne asked for. repository\org\apache\maven\plugins\maven-install-plugin Specifically, I'm wondering if it is just a metadata file, probably maven-metadata-central.xml. Chris -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 15:17 To: Maven Users List Subject: Re: plugin not found error and jta You've got something funky going on. Maven isn't going out to the Internet to look for these plugins as it should be and your builds are finishing in 1 second. Last time, it was the resources plugin. This time, its the same thing but the install plugin. Do you have a proxy or something? Run mvn -U -cpu -X a couple times and see if perhaps it doesn't find the plugin and download it automatically. And/or perhaps check JIRA for this issue -- unsure what module it would be under, but search for does not exist and maybe you'll find an open issue. Wayne On 1/9/07, JavierL [EMAIL PROTECTED] wrote: Hi It worked with 2.1 version for mvn compile command with my pom. Nevertheless, I'm having problems to install jta.jar. If I run C:\work\worldnet21\cinb\trunkmvn install:install-file -DgroupId=javax.transacti on -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=\soft\java\jta\jta.1 .0.1b.jar -DgeneratePom=false I got the error: --- [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'install'. [INFO] -- --- --- [ERROR] BUILD ERROR [INFO] -- --- --- [INFO] The plugin 'org.apache.maven.plugins:maven-install-plugin' does not exist or no valid version could be found [INFO] -- --- --- [INFO] For more information, run Maven with the -e switch [INFO] -- --- --- [INFO] Total time: 1 second [INFO] Finished at: Tue Jan 09 21:58:39 CET 2007 [INFO] Final Memory: 1M/5M [INFO] -- --- --- -- If can't install jta I can't compile my project... Any idea ? PS: Sometimes maven use to be a nightmare... Wayne Fay wrote: Take a look here: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resourc es-plugin/ As you can see, there are several versions of this artifact available: 2.0, 2.1, and 2.2 being the non-beta versions. In the plugins node of your pom, specify: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version[2.2]/version /plugin This will lock the version to 2.2. As it seems that Maven is having trouble resolving the LATEST version, locking it to a specify version should perhaps clear up your troubles. If that doesn't work, perhaps try [2.1]. However, Maven should really be able to find and resolve the LATEST version of m-r-p, so it makes me think there's something else going on in your configuration which is breaking things... Or there's a weird bug somewhere in Maven itself that you're running into for some reason. Wayne On 1/9/07, JavierL [EMAIL PROTECTED] wrote: Thanks for your reply. I've deleted the folder maven-resources-plugin and the version of files there was 2.2 dated 1/9/2007 8:10:46pm I've tried mvn -cpu -X compile and got the error: -- C:\work\worldnet21\cinb\trunkmvn -cpu -X -e compile + Error stacktraces are turned on. [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin gs\jleyba\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'c:\maven\bin\..\conf\ plugin-registry.xml' [INFO] Scanning for projects... [INFO] --- -- --- [INFO] Building cinb [INFO]task-segment: [compile] [INFO] --- -- --- [DEBUG] maven-resources-plugin: using locally installed snapshot [DEBUG] Artifact not found - using stub model: Unable to determine the latest ve rsion org.apache.maven.plugins:maven-resources-plugin:pom:LATEST [DEBUG] Using defaults for missing POM org.apache.maven.plugins:maven-resources- plugin:pom:LATEST [DEBUG] maven-resources-plugin: using locally installed snapshot [DEBUG] Artifact not found - using stub model: Unable to determine the release v ersion
RE: plugin not found error and jta
Sorry to interrupt, but I've seen something similar and think I now even have a reproducible test case. I can do the following: 1. Remove the maven-clean-plugin directory from my local repository. 2. Run 'mvn -o clean'. Obviously this fails because we need to download the clean plugin and we're in offline mode. At this point, a metadata file is created in a new maven-clean-plugin directory in the local repository (why? What could it possibly know about a plugin it was prevented from downloading any information about?). 3. Now run 'mvn clean'. Even though I am now running in online mode, I still get the does not exist or no valid version could be found message. I'm not sure if that's expected behavior; why would having run in offline mode affect my ability to download the plugin later? To get around it, I can either run with the -U option (updating all the other plugins I may or may not want) or remove the troublesome directory from the local repository to force a complete re-download. Is that a bug? I couldn't find anything like it in JIRA. Chris -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 15:49 To: Maven Users List Subject: Re: plugin not found error and jta I've seen this happen before but I'm not entirely sure what causes it... I've seen people connecting to poorly configured HTTP repositories (which return HTTP 200 and a Error 404, resource not found webpage rather than a proper HTTP 404) so I'm curious... What repos are you connecting to, Javier? Or do you know where your troubles originated, if not a bad repo, I'm curious what else it might have been. Obviously this is the kind of thing that Maven needs to be able to recover from more gracefully! Wayne On 1/9/07, JavierL [EMAIL PROTECTED] wrote: I solved the problem maven is going out internet without problems but, apparently, the last plugins update failed and corrupted everything it touched... I deleted maven-install-plugin folder and run mvn install and it worked (and installed mvn plugin correctly). I guess there is a bug in maven... Thanks a lot J Wayne Fay wrote: You've got something funky going on. Maven isn't going out to the Internet to look for these plugins as it should be and your builds are finishing in 1 second. Last time, it was the resources plugin. This time, its the same thing but the install plugin. Do you have a proxy or something? Run mvn -U -cpu -X a couple times and see if perhaps it doesn't find the plugin and download it automatically. And/or perhaps check JIRA for this issue -- unsure what module it would be under, but search for does not exist and maybe you'll find an open issue. Wayne On 1/9/07, JavierL [EMAIL PROTECTED] wrote: Hi It worked with 2.1 version for mvn compile command with my pom. Nevertheless, I'm having problems to install jta.jar. If I run C:\work\worldnet21\cinb\trunkmvn install:install-file -DgroupId=javax.transacti on -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=\soft\java\jta\jta.1 .0.1b.jar -DgeneratePom=false I got the error: --- [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'install'. [INFO] --- -- --- [ERROR] BUILD ERROR [INFO] --- -- --- [INFO] The plugin 'org.apache.maven.plugins:maven-install-plugin' does not exist or no valid version could be found [INFO] --- -- --- [INFO] For more information, run Maven with the -e switch [INFO] --- -- --- [INFO] Total time: 1 second [INFO] Finished at: Tue Jan 09 21:58:39 CET 2007 [INFO] Final Memory: 1M/5M [INFO] --- -- --- -- If can't install jta I can't compile my project... Any idea ? PS: Sometimes maven use to be a nightmare... Wayne Fay wrote: Take a look here: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resour ces-plugin/ As you can see, there are several versions of this artifact available: 2.0, 2.1, and 2.2 being the non-beta versions. In the plugins node of your pom, specify: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version[2.2]/version /plugin This will lock the version to 2.2. As it seems that Maven is having trouble resolving the LATEST version, locking it to a specify version should perhaps clear up your
RE: plugin not found error and jta
Upon further review, it looks like the bug MNG-2408 is not quite the same thing but close enough that the fix for it should take care of this as well. It's already fixed for 2.0.5 and 2.1, so just need to wait a little. http://jira.codehaus.org/browse/MNG-2408 Chris -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 16:17 To: Maven Users List Subject: Re: plugin not found error and jta You're not interrupting! This is a good little test case. If you've searched JIRA and not found a matching bug, *please* do file it. And respond back with the JIRA Id so I can go vote and watch it. Wayne On 1/9/07, Chris Hilton [EMAIL PROTECTED] wrote: Sorry to interrupt, but I've seen something similar and think I now even have a reproducible test case. I can do the following: 1. Remove the maven-clean-plugin directory from my local repository. 2. Run 'mvn -o clean'. Obviously this fails because we need to download the clean plugin and we're in offline mode. At this point, a metadata file is created in a new maven-clean-plugin directory in the local repository (why? What could it possibly know about a plugin it was prevented from downloading any information about?). 3. Now run 'mvn clean'. Even though I am now running in online mode, I still get the does not exist or no valid version could be found message. I'm not sure if that's expected behavior; why would having run in offline mode affect my ability to download the plugin later? To get around it, I can either run with the -U option (updating all the other plugins I may or may not want) or remove the troublesome directory from the local repository to force a complete re-download. Is that a bug? I couldn't find anything like it in JIRA. Chris -Original Message- From: Wayne Fay [mailto:[EMAIL PROTECTED] Sent: Tuesday, 09 January, 2007 15:49 To: Maven Users List Subject: Re: plugin not found error and jta I've seen this happen before but I'm not entirely sure what causes it... I've seen people connecting to poorly configured HTTP repositories (which return HTTP 200 and a Error 404, resource not found webpage rather than a proper HTTP 404) so I'm curious... What repos are you connecting to, Javier? Or do you know where your troubles originated, if not a bad repo, I'm curious what else it might have been. Obviously this is the kind of thing that Maven needs to be able to recover from more gracefully! Wayne On 1/9/07, JavierL [EMAIL PROTECTED] wrote: I solved the problem maven is going out internet without problems but, apparently, the last plugins update failed and corrupted everything it touched... I deleted maven-install-plugin folder and run mvn install and it worked (and installed mvn plugin correctly). I guess there is a bug in maven... Thanks a lot J Wayne Fay wrote: You've got something funky going on. Maven isn't going out to the Internet to look for these plugins as it should be and your builds are finishing in 1 second. Last time, it was the resources plugin. This time, its the same thing but the install plugin. Do you have a proxy or something? Run mvn -U -cpu -X a couple times and see if perhaps it doesn't find the plugin and download it automatically. And/or perhaps check JIRA for this issue -- unsure what module it would be under, but search for does not exist and maybe you'll find an open issue. Wayne On 1/9/07, JavierL [EMAIL PROTECTED] wrote: Hi It worked with 2.1 version for mvn compile command with my pom. Nevertheless, I'm having problems to install jta.jar. If I run C:\work\worldnet21\cinb\trunkmvn install:install-file -DgroupId=javax.transacti on -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=\soft\java\jta\jta.1 .0.1b.jar -DgeneratePom=false I got the error: --- [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'install'. [INFO] --- -- --- [ERROR] BUILD ERROR [INFO] --- -- --- [INFO] The plugin 'org.apache.maven.plugins:maven-install-plugin' does not exist or no valid version could be found [INFO] --- -- --- [INFO] For more information, run Maven with the -e switch [INFO] --- -- --- [INFO] Total time: 1
RE: [m2] JUnit test setUp() and tearDown() not called
My guess would be that your tests were working with Ant's junit task which uses a forkmode of 'pertest' by default, but they are now failing because Maven's surefire plugin uses a default of 'once' by default. You can change the setting for the surefire plugin by adding a configuration something like the following to your pom: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration forkModealways/forkMode /configuration /plugin That should get you running, but you should also consider rewriting the tests to run with the default; all that forking can take a lot of time. Chris -Original Message- From: Andrew Birchall [mailto:[EMAIL PROTECTED] Sent: Monday, 08 January, 2007 07:26 To: Maven Users List Subject: [m2] JUnit test setUp() and tearDown() not called Hello, When I run my JUnut test suit from Maven using mvn test some tests fail because setUp() and tearDown() are never called. Surley these should be called automatically when the test is run? The tests work fine when run from Eclipse. Is there something stupidly obvious that I'm missing? (Please don't say 'a brain') Thanks a lot Andrew Birchall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Issue in calling ant file from maven
You need to add the following dependency: dependency groupIdant/groupId artifactIdant-junit/artifactId version1.6.5/version /dependency Chris -Original Message- From: shinjan sen [mailto:[EMAIL PROTECTED] Sent: Saturday, 06 January, 2007 07:16 To: Maven Users List Subject: Issue in calling ant file from maven Hi, I am using maven-antrun-plugin to call an ant script which has got the usage of junt tag. I have added junit as a dependency in my dependency list in the pom.xml. when I try to execute the same I get an error stating that ant couldn't understand the task junit. Can anyone please help me in debuggin this. My pom.xml is : project modelVersion4.0.0/modelVersion artifactIdmy-test-app/artifactId groupIdmy-test-group/groupId version1.0-SNAPSHOT/version build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phaseinstall/phase configuration tasks property name=path.string refid=maven.compile.classpath/ ant antfile=test_build.xml inheritRefs=true target name=test/ /ant /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version /dependency dependency groupIdant/groupId artifactIdant-antlr/artifactId version1.6.5/version /dependency dependency groupIdantlr/groupId artifactIdantlrall/artifactId version2.7.4/version /dependency /dependencies /plugin /plugins /build /project Thanks a pile Shinjan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Install Plugin Broken?
Does anyone know if there is a bug filed for this? I'm assuming this is similar to a problem we're seeing where a plugin download seems to result in only metadata in the local repository and further attempts to build just get the does not exist or no valid version could be found message. We've been removing that plugin directory from the repository to get around it, forcing a re-download, but I suppose the -U probably works, as well. It's quite annoying for the Maven-phobes where I work and looks bad that Maven can't reliably accomplish the simplest of tasks (it's happened a couple of times on maven-clean-plugin). Chris -Original Message- From: Ole Ersoy [mailto:[EMAIL PROTECTED] Sent: Wednesday, 03 January, 2007 23:08 To: Maven Users List Subject: Re: Install Plugin Broken? OK - I found an older post that where Brett said run it with -U to force an update. That worked. --- Ole Ersoy [EMAIL PROTECTED] wrote: Hi, I'm trying to install some 3rd party jars. I just installed maven 204 on a new machine, and I run mvn install:install-file ... And since this is a new install of Maven, I expect maven to download the install plugin and then proceed. Instead I get this: [INFO] The plugin 'org.apache.maven.plugins:maven-install-plugin' does not exist or no valid version could be found Ideas? Thanks, - Ole P.S. Here's a full install line just in case: mvn install:install-file -Dfile=org.eclipse.xsd.editor_2.3.0.v200612211251.jar -DgroupId=org.eclipse -DartifactId=emf.xsd.editor -Dversion=2.3.0 -Dpackaging=jar -DgeneratePom=true __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Use older/specific version of snapshot?
Have you tried this? version1.0-20061023.215122-6/version Chris -Original Message- From: spamsucks [mailto:[EMAIL PROTECTED] Sent: Tuesday, 28 November, 2006 11:05 To: users@maven.apache.org Subject: Use older/specific version of snapshot? Sorry for the newbie question, but I deployed a new 1.0-SHAPSHOT of an artifact that broke a project that depends on this artifact. I would like this broken project to use a older version of the 1.0-SHAPSHOT... The older jar is in the repository, I just can't get my pom (of the broken project) to use it. !-- The version that I want to use is located here (along with newer, later versions) I need http://www.authsum.org/repository/snapshots/org/authsum/client /1.0-SNAPSHOT/client-1.0-20061023.215122-6.jar -- I have tried about 12 different variations of the dependency to try to pull the jar above down as the dependency. dependency groupIdorg.authsum/groupId artifactIdclient/artifactId version1.0-SNAPSHOT-20061023.215122/version /dependency TIA, Phillip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven Java Compiler Output?
It looks like your problem may be related to bug MNGECLIPSE-188: http://jira.codehaus.org/browse/MNGECLIPSE-188 That one couldn't be resolved because of the incomplete description, but it does have good advice in making sure that Eclipse is running in a JDK JRE, not a plain JRE. You can verify this by starting Eclipse and going to Help-About Eclipse SDK-Configuration Details and check the value of java.home. If you're still having trouble, you could try filling out that or another bug or posting to one of the m2eclipse lists: http://xircles.codehaus.org/projects/m2eclipse/lists Chris -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Friday, 17 November, 2006 08:47 To: 'Maven Users List' Subject: RE: Maven Java Compiler Output? Sorry, I should have mentioned that I'm using Eclipse's maven plugin (http://m2eclipse.codehaus.org/) to do the build. I thought it was simply spitting out the output from mvn. Obviously not. Maybe I should abandon this Eclipse integration and use the http://maven.apache.org/guides/mini/guide-ide-eclipse.html method? Thanks! Rob -Original Message- From: Jeff Mutonho [mailto:[EMAIL PROTECTED] Sent: Friday, November 17, 2006 9:36 AM To: Maven Users List Subject: Re: Maven Java Compiler Output? On 11/17/06, Robert Harper [EMAIL PROTECTED] wrote: Hi all, I'm sorry if this obvious question has been asked before. I couldn't find an answer in the mailing list. When I compile my maven project, I get the following output ... Compiling 14 source files to C:\Research\Foundation\target\classes [ERROR] mojo-execute : compiler:compile Diagnosis: Compilation failure FATAL ERROR: Error executing Maven for a project [ERROR] project-execute : com.company:Foundation:jar:0.0.1-SNAPSHOT ( task-segment: [clean, install] ) Diagnosis: Compilation failure FATAL ERROR: Error executing Maven for a project org.apache.maven.BuildFailureException: Compilation failure ... My question is how do I see what the compiler errors actually are? Where is the compiler output? How can I enable it? Thanks! Rob I'm not sure I understand your question , but the compilation errors should just appear in your output.In my example below , I took out the commented out the spring jar file and my build failed with the following message: DEBUG] C:\telkom-sea-ias\eclipse-3.1.2-workspaces\dev-ep1x\eportal\src Compiling 392 source files to C:\telkom-sea-ias\eclipse-3.1.2-workspaces\dev-ep1x\eportal\ta rget\classes [INFO] -- -- [ERROR] BUILD FAILURE [INFO] -- -- [INFO] Compilation failure C:\pragmaticus-sea-ias\eclipse-3.1.2-workspaces\dev-ep1x\eport al\src\za\co\p ragmaticus\portal\controllers\ApplicationPDCRegistrationContro ller.java:[8,3 9] package org.springframework.web.servlet does not exist C:\pragmaticus-sea-ias\eclipse-3.1.2-workspaces\dev-ep1x\eport al\src\za\co\p ragmaticus\portal\controllers\ApplicationPDCRegistrationContro ller.java:[10, 41] package org.springframework.beans.factory does not exist [INFO] -- -- [DEBUG] Trace org.apache.maven.BuildFailureException: Compilation failure at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa ls(DefaultLife cycleExecutor.java:555) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa lWithLifecycle (DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa l(DefaultLifec ycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa lAndHandleFail ures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas kSegments(Defa ultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(De faultLifecycle Executor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by:
RE: Re : Re : Generate source code with a JavaCC parser.
It might be worthwhile to use the Antrun plugin for the short term with a java task and the sourceRoot config element so that you don't have to mix your generated source code with the regular source (bad CM). Or even using the exec plugin and an empty task Antrun plugin with the new sourceRoot might work. You might also consider adding a feature request to JIRA for the exec plugin to include a way to add a source directory. Chris -Original Message- From: Julien HENRY [mailto:[EMAIL PROTECTED] Sent: Friday, 17 November, 2006 07:08 To: Maven Users List Subject: Re : Re : Generate source code with a JavaCC parser. Finally, it works with another module. I just have to use the javacc plugin in the generate-sources phase of this new module. In the module where I want to generate source, I use the exec plugin to run the Parser. The only problem is I have to generate the new source file in src/main/java because I have no way to specify a second source directory in the pom (for example target/generated-sources). Thanks ! - Message d'origine De : Julien HENRY [EMAIL PROTECTED] À : Maven Users List users@maven.apache.org Envoyé le : Vendredi, 17 Novembre 2006, 9h48mn 58s Objet : Re : Generate source code with a JavaCC parser. Thanks for the reply. I'm currently have a multi-module layout. Could it be possible to put the parser in a new module? The problem I see is the Parser.jar should be installed in the local repository before the generate-sources phase of the module that need it to generate the .java file. Actually, I'm looking for a way to build the whole project with only one command (easier for continuum). With your solution, I need to build and install the parser first, then build my regular project. Thanks again. Julien - Message d'origine De : Chris Hilton [EMAIL PROTECTED] À : Maven Users List users@maven.apache.org Envoyé le : Jeudi, 16 Novembre 2006, 18h36mn 05s Objet : RE: Generate source code with a JavaCC parser. To my eyes (and how I've done it before), this would be two projects. One project to create the Parser and jar it. Then the second project would use that jar as a dependency and execute the appropriate class during the generate-sources phase. Or you could get a little fancy and have the first project actually generate a Maven plugin with the Parser and then bind that plugin appropriately in the second project. Hope that helps. Chris -Original Message- From: Julien HENRY [mailto:[EMAIL PROTECTED] Sent: Thursday, 16 November, 2006 10:01 To: users@maven.apache.org Subject: Generate source code with a JavaCC parser. Hi all, I want to generate Java code for my project with JavaCC. Actually, it's not JavaCC that generate final source code, but JavaCC will generate a parser that will parse one of the file of my project and generate the expected file. To be clearer, I have a Java file named WebTester.java and I want to generate WebTestCase.java. I wrote a JavaCC file (parser.jj) that generate a Parser.java. Once compiled, Parser.class will take WebTester.java and output WebTestCase.java. How can I integrate this in my build? I know the maven-javacc-plugin, but it's not exactly what I want. Indeed, the plugin create Parser.java from parser.jj and add it to the Maven build directory, but it doesn't provide a way to run the parser before compile phase. I'm considering using ant to compile/run Parser.java before the compile phase, but it's ugly. Do you know a better way? Thanks Julien __ _ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ _ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com __ _ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED
RE: Generate source code with a JavaCC parser.
To my eyes (and how I've done it before), this would be two projects. One project to create the Parser and jar it. Then the second project would use that jar as a dependency and execute the appropriate class during the generate-sources phase. Or you could get a little fancy and have the first project actually generate a Maven plugin with the Parser and then bind that plugin appropriately in the second project. Hope that helps. Chris -Original Message- From: Julien HENRY [mailto:[EMAIL PROTECTED] Sent: Thursday, 16 November, 2006 10:01 To: users@maven.apache.org Subject: Generate source code with a JavaCC parser. Hi all, I want to generate Java code for my project with JavaCC. Actually, it's not JavaCC that generate final source code, but JavaCC will generate a parser that will parse one of the file of my project and generate the expected file. To be clearer, I have a Java file named WebTester.java and I want to generate WebTestCase.java. I wrote a JavaCC file (parser.jj) that generate a Parser.java. Once compiled, Parser.class will take WebTester.java and output WebTestCase.java. How can I integrate this in my build? I know the maven-javacc-plugin, but it's not exactly what I want. Indeed, the plugin create Parser.java from parser.jj and add it to the Maven build directory, but it doesn't provide a way to run the parser before compile phase. I'm considering using ant to compile/run Parser.java before the compile phase, but it's ugly. Do you know a better way? Thanks Julien __ _ Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses http://fr.answers.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: replace surefire with ant task
Some thoughts: 1. You might try experimenting with the forkMode setting for Surefire. Ant's junit task defaults to perTest, but the default for Surefire is once. Poorly written tests sometimes rely on the perTest behavior, but well-written tests should be able to run with once (IMHO). For that matter, Surefire isn't really doing anything particularly special as a unit test runner, so if certain tests won't run, that smells. 2. Here's a plugin configuration we use to generate old junitreport HTML files for a data gathering tool we still have to support: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idjunitreport/id phasetest/phase configuration tasks junitreport todir=target/surefire-reports fileset dir=target/surefire-reports include name=TEST-*.xml / /fileset report todir=target/surefire-reports / /junitreport /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdant/groupId artifactIdant-junit/artifactId version1.6.2/version /dependency /dependencies /plugin This relies on the surefire plugin running the tests and finding the xml test results in the surefire-reports directly. You should be able to insert your own Ant junit task (and configure Surefire to skip tests), if necessary, and modify the rest appropriately. Chris -Original Message- From: Sommers, Elizabeth [mailto:[EMAIL PROTECTED] Sent: Friday, 03 November, 2006 10:17 To: Maven Users List (E-mail) Subject: replace surefire with ant task I want to replace the surefire tests with the ant junit tests. I also want to run ant junitreport instead of the surefire report. Does anybody have a way to do this? Many of our tests won't run under surefire, others fail when they shouldn't. Excluding tests is not an option. Thanks Liz Sommers [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using maven-antrun-plugin and taskdef
You need to add the jar as a dependency to the antrun plugin, something like: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions ... /executions dependencies dependency groupIdant/groupId artifactIdant-jmeter/artifactId version1.0/version /dependency /dependencies /plugin Chris -Original Message- From: Jeff Mutonho [mailto:[EMAIL PROTECTED] Sent: Monday, 30 October, 2006 03:40 To: Maven Users List Subject: Using maven-antrun-plugin and taskdef I've configured the maven-antrun-plugin as follows : plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasepre-integration-test/phase configuration tasks taskdef name=jmeter classname=org.programmerplanet.ant.taskdefs.jmeter.JMeterTask/ jmeter jmeterhome=D:\jakarta-jmeter-2.2 resultlog=${basedir}/loadtests/JMeterResults.jtl testplans dir=${basedir}/src/test/jmeter includes=*.jmx/ /jmeter /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin and added ant-jmeter1-0.jar to my dependencies.However , when I run 'mvn install' I get the following build error : [INFO] [site:attach-descriptor] [INFO] [antrun:run {execution: default}] [INFO] Executing tasks [INFO] -- -- [ERROR] BUILD ERROR [INFO] -- -- [INFO] Error executing ant tasks Embedded error: taskdef class org.programmerplanet.ant.taskdefs.jmeter.JMeterTas k cannot be found [INFO] -- -- Is it correct to do a taskdef definition the way I did? Jeff Mutonho GoogleTalk : ejbengine Skype: ejbengine Registered Linux user number 366042 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m2] Running Emma: how to get HTML report?
Obviously the 0 class(es) instrumented part is a problem; if nothing gets instrumented, you'll certainly get no coverage info. Some things that stand out to me: 1. There were no classes compiled in the output below. Presumably this is because they were all already up-to-date, but I'd like to see the output from clean test or clean site to be sure. 2. Probably completely unrelated, but I'm not sure that checkstyle-jjguidelines.xml file should show up in the classes directory. Since you're set up to run Emma from the command line, you could just try the following command which should be what the Emma plugin is running: emma instr -instrpath D:\tmp\sandbox\my-app\target\classes -outdir D:\tmp\sandbox\my-app\target\emma-classes -outfile D:\tmp\sandbox\my-app\target\emma-classes\coverage.em Maybe you can figure out where the problem is that way. The soure code for the Emma plugin is very basic, so feel free to inspect it. If you find it is a real problem, whether you resolve it or not, please file an issue in JIRA, preferably with your patch or an attached project showing the problem. Chris -Original Message- From: Xavier Outhier [mailto:[EMAIL PROTECTED] Sent: Thursday, 26 October, 2006 03:00 To: Maven Users List Subject: Re: [m2] Running Emma: how to get HTML report? Hi, 1) I have a report in the site but unfortunately, the report is empty, I got this page target/site/coverage/index.html: No coverage information available 2) The trace when running test is: [INFO]Scanning for projects... [INFO] [INFO]Building My project name [INFO] task-segment: [test] [INFO] project-execute [resources:resources] [INFO]Using default encoding to copy filtered resources. [compiler:compile] [INFO]Nothing to compile - all classes are up to date [emma:instr {execution: default}] [INFO][emma-plugin:instr] [INFO]Emma instrument path: D:\tmp\sandbox\my-app\target\classes [INFO]Emma output Directory: D:\tmp\sandbox\my-app\target\emma-classes EMMA: processing instrumentation path ... EMMA: instrumentation path processed in 30 ms EMMA: [0 class(es) instrumented, 0 resource(s) copied] EMMA: no output created: metadata is empty 3) Also a partial tree view of my target directory: +---classes | | checkstyle-jjguidelines.xml | | | \---com | \---mycompany | \---app | App$FizzyDrink.class | App.class | +---emma-classes | | coverage.em | | emma.properties | | | \---com | \---mycompany | \---app | App$FizzyDrink.class | App.class 4) content of emma.properties: coverage.out.file=D:\\tmp\\sandbox\\my-app\\target\\emma-class es\\coverage.ec coverage.out.merge=false 5) What is wrong? Should I run a specific task in a certain order? Greetings, Xavier. Chris Hilton wrote: There's an emma-maven-plugin in the Codehaus sandbox and available at the Codehaus snapshots repository you might want to use. http://mojo.codehaus.org/using-sandbox-plugins.html You'll need to specify something like this for the build configuration: build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdemma-maven-plugin/artifactId version1.0-SNAPSHOT/version inheritedtrue/inherited executions execution goals goalinstr/goal /goals /execution /executions /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId inheritedtrue/inherited configuration forkModeonce/forkMode reportFormatxml/reportFormat classesDirectory${project.build.directory}/emma-classes/classesDire ct ory /configuration /plugin /plugins /build And then something like this in the reporting section: reporting plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdemma-maven-plugin/artifactId version1.0-SNAPSHOT/version inheritedtrue/inherited /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId inheritedtrue/inherited /plugin /plugins /reporting Chris -Original Message- From: Xavier Outhier [mailto:[EMAIL PROTECTED] Sent: Monday, 23 October, 2006 06:56 To: Maven Users List Subject: [m2] Running Emma: how to get HTML report? Hi all, I'm trying to use Emma. I've seen a relatively old post: http://www.mail
RE: [m2] Running Emma: how to get HTML report?
There's an emma-maven-plugin in the Codehaus sandbox and available at the Codehaus snapshots repository you might want to use. http://mojo.codehaus.org/using-sandbox-plugins.html You'll need to specify something like this for the build configuration: build plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdemma-maven-plugin/artifactId version1.0-SNAPSHOT/version inheritedtrue/inherited executions execution goals goalinstr/goal /goals /execution /executions /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId inheritedtrue/inherited configuration forkModeonce/forkMode reportFormatxml/reportFormat classesDirectory${project.build.directory}/emma-classes/classesDirect ory /configuration /plugin /plugins /build And then something like this in the reporting section: reporting plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdemma-maven-plugin/artifactId version1.0-SNAPSHOT/version inheritedtrue/inherited /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId inheritedtrue/inherited /plugin /plugins /reporting Chris -Original Message- From: Xavier Outhier [mailto:[EMAIL PROTECTED] Sent: Monday, 23 October, 2006 06:56 To: Maven Users List Subject: [m2] Running Emma: how to get HTML report? Hi all, I'm trying to use Emma. I've seen a relatively old post: http://www.mail-archive.com/users@maven.apache.org/msg42682.html I also have instrumented classes. Well at least, I see there is a file target\emma\metadata.emma. How could I have an HTML report built in the site? Greetings, Xavier. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do people search for jars and poms?
I've been doing the same thing a lot so here's some steps I recommend: - Inspect the manifest file in the jar. Sometimes you'll find the version number has helpfully been stowed away in there. - Look at the version history for the jar in your repository. Sometimes developers (even yourself!) unwittingly leave helpful comments that include the version number. :-) At the least, you'll probably want to notice the date of check-in to help you with... - Start doing binary comparisons of your local jar versus the publicly released versions. If you got a date from your source control above, you can start with the latest one as of that date and work your way back. Also, in my experience, you should perform this comparison step even if you found an explicit version in one of the steps above. Someone might have made a mistake or you might work with a particularly dense team that sees no problem with modifying released jars and checking them in as if they were the original jars (*grumble grumble*). Chris -Original Message- From: Christian Goetze [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 October, 2006 18:53 To: Maven Users List Subject: How do people search for jars and poms? If this is a stupid question, I apologise in advance... Given a dependency to a specific set of classes, how do people locate the jar that provides it, together with the artifact and group ids? I haven't yet found a better way than to search through ibiblio, hoping to find something there - but to locate things like javax.xml.rpc.*, it's not easy. As you can tell, I'm in the process of converting an ant based system with lots of checked in .jar files to a maven system. The trouble with the checked in .jar files is that they are completely void of any version info, and I need to reconstruct the dependency tree by hand. How do the pros do it? -- cg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Build fails when unit tests fail
mvn site -Dmaven.test.failure.ignore=true I think that will do the trick. Chris -Original Message- From: Zeitlin, Michael (ATL) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 04 October, 2006 11:00 To: users@maven.apache.org Subject: Build fails when unit tests fail I am trying to generate a clover report using the mvn site command on maven2. However, the project is currently in a transitional phase and has a lot of unit test failures. So, I would like clover to generate the report against the unit test that exists and not fail if there are any unit tests failures. When I tried mvn site -Dmaven.test.skip=true, clover generated a report with no unit tests. Is there a way to configure clover to run even if some of the unit tests fail? Here is the entry in my pom.xml: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-clover-plugin/artifactId configuration jdk1.5/jdk targetPercentage1%/targetPercentage /configuration executions execution phasepre-site/phase goals goalinstrument/goal /goals /execution /executions /plugin And here is the error message I get: Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.141 sec FAILURE! Results : Tests run: 58, Failures: 4, Errors: 32, Skipped: 0 [INFO] -- -- [ERROR] BUILD FAILURE [INFO] -- -- [INFO] There are test failures. [INFO] -- -- [INFO] Trace org.apache.maven.BuildFailureException: There are test failures. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa ls(Default LifecycleExecutor.java:555) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa lWithLifec ycle(DefaultLifecycleExecutor.java:47 5) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjec tLifecycle (DefaultLifecycleExecutor.java:891) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecy cle(Defaul tLifecycleExecutor.java:734) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa ls(Default LifecycleExecutor.java:505) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa lWithLifec ycle(DefaultLifecycleExecutor.java:47 5) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa l(DefaultL ifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa lAndHandle Failures(DefaultLifecycleExecutor.jav a:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas kSegments( DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(De faultLifec ycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures. at org.apache.maven.plugin.surefire.SurefirePlugin.execute(Surefi rePlugin.j ava:403) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(Defau ltPluginMa nager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa ls(Default LifecycleExecutor.java:534) ... 20 more [INFO] -- -- [INFO] Total time: 32 seconds [INFO] Finished at: Wed Oct 04 11:15:23 EDT 2006 [INFO] Final Memory: 9M/34M [INFO] -- -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: antrun plugin, junit classpath
You need a dependency like: dependency groupIdant/groupId artifactIdant-junit/artifactId version1.6.5/version /dependency Chris -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Paul Galbraith Sent: Monday, 18 September, 2006 01:51 To: users@maven.apache.org Subject: antrun plugin, junit classpath I want to use M2's antrun plugin to execute a junit task, but I keep getting errors indicating that ant can't find junit in the classpath. My POM has: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idjunit/id phasetest/phase goals goalrun/goal /goals configuration tasks junit ... /junit /tasks /configuration /execution /executions dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies /plugin I get the following output: == == [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-antrun-plugin:1.1:run' -- [DEBUG] (f) artifacts = [junit:junit:jar:3.8.1:test, ant:ant:jar:1.6.5:runtime , ant:ant-launcher:jar:1.6.5:runtime, org.apache.maven:maven-project:jar:2.0.1:r untime, org.apache.maven:maven-plugin-api:jar:2.0.1:runtime] [DEBUG] (f) project = [EMAIL PROTECTED] [DEBUG] (f) tasks = [DEBUG] -- end configuration -- [INFO] [antrun:run {execution: junit}] [INFO] Executing tasks [DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false) [INFO] -- -- [ERROR] BUILD ERROR [INFO] -- -- [INFO] Error executing ant tasks Embedded error: Could not create task or type of type: junit. Ant could not find the task or a class this task relies upon. == == If I remember correctly, this is typical when running ant standalone, if junit is not on ant's classpath. Is there any way to get this to work in M2? Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Maven 2 RMI
Have you tried mvn clean process-classes? process-classes being the phase you bound the antrun plugin to and occurs after compile. Chris -Original Message- From: Borut Bolčina [mailto:[EMAIL PROTECTED] Sent: Wednesday, 06 September, 2006 16:30 To: Maven Users List Subject: Re: Maven 2 RMI Hi Joe, I added this in my POM build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idprocess-classes-rmic/id !-- needs to be unique among executions -- phaseprocess-classes/phase configuration tasks echoRunning RMIC/echo rmic base=${project.build.directory} classpathref=maven.compile.classpath classname=com.my.class.to.be.RMICompiled / /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin and neither mvn clean compile nor mvn antrun:run produces stub classes. Even Running RMIC is not displayed. Do I have to set something before? Thanks. -Borut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Scripts for building multiple projects
I do it all the time. It's allowed us to start migrating our Ant build project-by-project to Maven without retraining our dev monkeys during the transition ;-). Projects that have been converted to Maven now have bare-bones build.xml files for per-project customization, but the majority of functionality is imported from a common template build file. The heart of the template is the following target: target name=_runMaven exec executable=mvn.bat os=Windows NT, Windows 2000, Windows XP, Windows 2003 failonerror=true env key=MAVEN_TERMINATE_CMD value=on / arg line=${mavenTarget}/ /exec exec executable=mvn os=Linux, Solaris, SunOS, Mac OS X failonerror=true arg line=${mavenTarget}/ /exec /target The MAVEN_TERMINATE_CMD is (or was?) vital for catching errors on Windows and obviously this is customized for our supported OSes. This target is then called from a number of pass-through targets that convert existing expected Ant targets to Maven calls, such as: target name=test antcall target=_runMaven param name=mavenTarget value=test/ /antcall /target This relies on the supporting build.xml being in the same directory as you want to run Maven, but you could easily add another parameter to pass to _runMaven for a directory to run the exec in. I believe there are no plans for an Ant task, as you can read about here: http://jira.codehaus.org/browse/MNG-2127 And for credit's sake, that's probably where I got the gist of what I've written above. Chris -Original Message- From: Douglas Ferguson [mailto:[EMAIL PROTECTED] Sent: Friday, 01 September, 2006 15:54 To: users Subject: Scripts for building multiple projects I just wrote a script to build a couple of modules in a specific order, for dev purposes. Once I did this, I thought that it might be handy to make it an ant script. Anybody call mvn from ant before? Just wondering if there are any tasks for this already? Here's my shell script... pushd framework mvn clean install popd pushd ev mvn clean install popd pushd custom-builds/ev-builds/di mvn clean compile war:war cargo:undeploy cargo:deploy -Premote.localhost popd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven2: ant taskdef
Did you work this problem out, Attila? It seems like you are trying to build a separate jar (which should be a separate project) that this project would then depend on. Chris -Original Message- From: Attila Mezei-Horvati [mailto:[EMAIL PROTECTED] Sent: Tuesday, 29 August, 2006 10:39 To: users@maven.apache.org Subject: RE: maven2: ant taskdef Thanks the maven.compile.classpath was what I needed. Another question. In the ant task I need to specify a dest file for the generated sources. Currently I do it by: destfile=target/sxmltypes.jar How can I do it so this jar is included in the package later? thanks, Attila Subject: RE: maven2: ant taskdef Date: Mon, 28 Aug 2006 16:16:29 -0500 From: Chris Hilton [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Ah, if you need that jar for compilation also, you should probably move that dependency out from under maven-antrun-plugin and make it a general project dependency. Then modify the taskdef line to: taskdef name=xmlbean classname=org.apache.xmlbeans.impl.tool.XMLBean classpath refid=maven.compile.classpath/ /taskdef Chris -Original Message- From: Attila Mezei-Horvati [mailto:[EMAIL PROTECTED] Sent: Monday, 28 August, 2006 16:01 To: users@maven.apache.org Subject: RE: maven2: ant taskdef Chris, thanks for the reply. It does help however now I get errors like: package org.apache.xmlbeans does not exist when it tries to compile the classes. I guess I would need to setup the classpath arg somehow for the taskdef. But I am not sure how to do that. Including a link to the repository folder doesn't seem like a solution to me. Any ideas? thanks again, Attila __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help on the Emma plugin
Please keep any questions on the list. You can build it like any other Maven project. Use 'mvn install' to install it to the local repository on your machine, or you can configure distributionManagement to deploy it to your internal repository with 'mvn deploy' for a team of developers to use. Chris -Original Message- From: Binod Gupta [mailto:[EMAIL PROTECTED] Sent: Tuesday, 29 August, 2006 18:09 To: Chris Hilton Subject: Need help on the Emma plugin Hi Chris, I downloaded the Emma plugin from http://sourceforge.net/tracker/index.php? func=detailaid=1481440group_id=108932atid=651899 but I did not see any instructions on how to deploy it to Maven 2 . Could you please send me the instructions on how to use this plugin in Maven 2. regards, Binod - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: m2eclipse eclipse:eclipse
-Original Message- From: Douglas Ferguson [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August, 2006 17:53 To: Maven Users List Subject: m2eclipse eclipse:eclipse I have a few questsion about m2eclipse: 1) When configuring the external tool how do you specify a profile? Currently, I don't think you can. There's a bug open on it. http://jira.codehaus.org/browse/MNGECLIPSE-173 2) What settings.xml will get read? I am not sure that either my maven_install_dir/settings.xml or ~/.m2/settings.xml are getting read. At this point, neither is being read. Another bug. http://jira.codehaus.org/browse/MNGECLIPSE-29 3) Can someone explain what update source directies does? Sorry, don't know about this one. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven emma plugin
There is not as yet an official plugin, but you can download one that's been submitted to the Emma team here: http://sourceforge.net/tracker/index.php?func=detailaid=1481440group_i d=108932atid=651899 You'll have to build it yourself, but I've been using it for over a month without problem. I've made some slight modifications to it and am in the process of getting the Emma team to either accept it as official or alternately I will be submitting it to Codehaus for ongoing development. Chris -Original Message- From: Satish [mailto:[EMAIL PROTECTED] Sent: Friday, 25 August, 2006 14:15 To: users@maven.apache.org Subject: maven emma plugin how to configure the maven emma plugin and where to get this from. Any body got success integrating this in Maven2 emma.jar emma-ant.jar maven-emma-plugin.jar Thanks, Satish -- View this message in context: http://www.nabble.com/maven-emma-plugin-tf2166530.html#a5989608 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven2: ant taskdef
Something like this might do the trick: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idxmlbean/id phasepackage/phase configuration tasks taskdef name=xmlbean classname=org.apache.xmlbeans.impl.tool.XMLBean/ xmlbean schema=../xmlbeans destfile=target/xmltypes.jar /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdxmlbeans/groupId artifactIdxbean/artifactId version2.1.0/version /dependency /dependencies /plugin Chris -Original Message- From: Attila Mezei-Horvati [mailto:[EMAIL PROTECTED] Sent: Monday, 28 August, 2006 14:41 To: users@maven.apache.org Subject: maven2: ant taskdef Hi, In my old ant build file I had something like: taskdef name=xmlbean classname=org.apache.xmlbeans.impl.tool.XMLBean classpath=xbean.jar;jsr173_api.jar / task xmlbean schema=../xmlbeans destfile=xmltypes.jar /xmlbean /task How can I translate this in maven ant task? I need to generate xmlbeans from the xsd files. thanks, Attila __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven2: ant taskdef
Ah, if you need that jar for compilation also, you should probably move that dependency out from under maven-antrun-plugin and make it a general project dependency. Then modify the taskdef line to: taskdef name=xmlbean classname=org.apache.xmlbeans.impl.tool.XMLBean classpath refid=maven.compile.classpath/ /taskdef Chris -Original Message- From: Attila Mezei-Horvati [mailto:[EMAIL PROTECTED] Sent: Monday, 28 August, 2006 16:01 To: users@maven.apache.org Subject: RE: maven2: ant taskdef Chris, thanks for the reply. It does help however now I get errors like: package org.apache.xmlbeans does not exist when it tries to compile the classes. I guess I would need to setup the classpath arg somehow for the taskdef. But I am not sure how to do that. Including a link to the repository folder doesn't seem like a solution to me. Any ideas? thanks again, Attila Subject: RE: maven2: ant taskdef Date: Mon, 28 Aug 2006 14:49:14 -0500 From: Chris Hilton [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Something like this might do the trick: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idxmlbean/id phasepackage/phase configuration tasks taskdef name=xmlbean classname=org.apache.xmlbeans.impl.tool.XMLBean/ xmlbean schema=../xmlbeans destfile=target/xmltypes.jar /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdxmlbeans/groupId artifactIdxbean/artifactId version2.1.0/version /dependency /dependencies /plugin Chris -Original Message- From: Attila Mezei-Horvati [mailto:[EMAIL PROTECTED] Sent: Monday, 28 August, 2006 14:41 To: users@maven.apache.org Subject: maven2: ant taskdef Hi, In my old ant build file I had something like: taskdef name=xmlbean classname=org.apache.xmlbeans.impl.tool.XMLBean classpath=xbean.jar;jsr173_api.jar / task xmlbean schema=../xmlbeans destfile=xmltypes.jar /xmlbean /task How can I translate this in maven ant task? I need to generate xmlbeans from the xsd files. thanks, Attila __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Suggestions for running Maven on an airgapped network
You probably realize this, but to expand on the answer below, you'll probably want two copies of Proximity running. One copy on your declass network you will use to download dependencies from external repositories and create a repository with the particular subset of dependencies you need. Burn that Proximity repository info to a CD/DVD and transfer it to your classified network where another copy of Proximity will use that repository info to act as a mirror of the central repository. Chris -Original Message- From: Eric Redmond [mailto:[EMAIL PROTECTED] Sent: Tuesday, 22 August, 2006 21:32 To: Maven Users List Subject: Re: Suggestions for running Maven on an airgapped network It sounds like you could use a proxy. Before Tamás has time to reply, take a look at this ;-) http://proximity.abstracthorizon.org/ Eric On 8/22/06, Kelly Harward [EMAIL PROTECTED] wrote: I am new to Maven and am currently looking at it to help bring order to a handful of related projects that are currently built using Ant. I have been working my way through Better Builds with Maven and trying to digest the information presented there. In section 2.1 (Preparing to Use Maven) you can find the following assertion, In its optimal mode, Maven requires network access I assume that the term network in the phrase network access refers to the Internet. I can already see that Maven relies pretty heavily on being able to phone home to the central repository in its efforts to resolve project dependencies. I am faced with an interesting environment where all development is conducted on an internal, airgapped network. In short, there is no physical connection between this internal development network and the Internet. Sometimes two networks in this configuration are referred to as low side and high side, indicating which direction data is flowing. In our particular case, the Internet is the high side network and the internal development network is the low side network. In order to move data from the high side to the low side, it is necessary to write data to a physical medium, and move it to a device on the latter network. The first thought that comes to mind is to setup an internal mirror of the Maven central repository. That may work (although it is certain to give at least one security-minded network engineer serious heartburn). Are there any guidelines or standards for this type of configuration? Also, it is possible to setup a partial mirror of the central repository (in the event that those aforementioned security- minded folk can't abide the entire repository)? I would imagine that I am not the first person in the Maven community to face this dilemma. Any information or insight that you may be able to provide in this matter is appreciated. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eric Redmond http://codehaus.org/~eredmond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Discarding 'pom.properties' 'pm.xml' at the time of JAR creation
I believe this feature is added in the 2.1 version of maven-jar-plugin, which hasn't been released yet. In the meantime, you can check it out of SVN, build it, and install it to your repository. Chris -Original Message- From: Sharma, Jaikumar [mailto:[EMAIL PROTECTED] Sent: Sunday, 20 August, 2006 23:21 To: Maven Users List Subject: Discarding 'pom.properties' 'pm.xml' at the time of JAR creation Dear Maven Users, In a multi-module project, I have configured the maven-jar-plugin to NOT to add 'pom.properties' and 'pom.xml' at the time when build creates JAR archive for one of the module, but it comes out with an error. [INFO] -- -- [ERROR] BUILD ERROR [INFO] -- -- [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-jar-plugin:2.0 Cause: Cannot find setter nor field in org.apache.maven.archiver.MavenArchiveConfiguration for 'addMavenDescriptor' [INFO] -- -- [INFO] For more information, run Maven with the -e switch [INFO] -- -- [INFO] Total time: 3 seconds [INFO] Finished at: Mon Aug 21 09:46:08 GMT+05:30 2006 [INFO] Final Memory: 5M/9M [INFO] -- -- Excerpts from my parent pom.xml, where maven-jar-plugin has been configured. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId version2.0/version !-- configuration to discard 'pom.properties' and 'pom.xml' files from being added in ' JAR archive -- configuration archive addMavenDescriptorfalse/addMavenDescriptor /archive /configuration /plugin Is this a problem with maven-jar-plugin or I am doing something wrong ? Any enlightment is appreciated. Thanks. - - - - - - - DISCLAIMER- - - - - - - - Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Does maven2 eclipse plugin suppor multi-module projects
Pardon me asking the obvious, but has the maven nature been added to the modules? Chris -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kent Tong Sent: Saturday, 19 August, 2006 07:37 To: users@maven.apache.org Subject: Re: Does maven2 eclipse plugin suppor multi-module projects Barrie Treloar baerrach at gmail.com writes: How are your dependencies declared? A parent pom, since it is just a container project and does not create an artifact, does not have dependencies. Only your modules have dependencies. Sorry, my mistake. The dependencies are declared in the module pom.xml. But the eclipse plugin is not seeing them. Any idea? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: More informations for Maven 2.x Plug-in for Eclipse?
I'm not a dev on it so can't speak officially, but I'm a watcher on several bugs for it and know it is still being actively developed. I think there's a bit of a hold-up due to some changes in the way artifact resolution is being done to better integrate with Eclipse, which is hard enough on its own but is also relying on some changes in the Maven core (embedder? resolver? don't confuse me with someone who knows what he's talking about). Regardless, it is still an active project, but it's been awhile since the last release. Hopefully the next release will be soon. Chris -Original Message- From: Deng Ai [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 August, 2006 02:02 To: users@maven.apache.org Subject: More informations for Maven 2.x Plug-in for Eclipse? Hello everyone: Anybody know the news for the Maven 2.x plugin-in for Eclipse? Their site http://m2eclipse.codehaus.org/ est almost empty. The url for Eclipse doesn't work, It is like no any more maintenance for this plugin. Thanks for your informations. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: converting directory structure to maven archetypes
Not that I recommend it, but if you do something like this, don't just move the files. Be sure to *copy* the rcs files on the filesystem to their new locations and then use cvs to remove the old files from the old locations. You'll preserve the history of the files in their new locations, but also have the file information in the old locations for any legacy builds you may need to recreate. /CM guy's nitpick Chris -Original Message- From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 August, 2006 14:21 To: Maven Users List Subject: Re: converting directory structure to maven archetypes It *is* possible to retain the history if you move rcs files on your filesystem instead of to use cvs. Emmanuel Wayne Fay a écrit : It is *not* possible to move files and folders around in CVS and retain history. This is only possible in SVN and perhaps other systems. It *is* possible (though perhaps difficult) to retain your old directory/file structure and simply configure things entirely in the the pom.xml files. So instead of using root/src/main/java for Java source code, perhaps you are using root/src/java. The Super POM in your M2 install directory stores the default locations, but you are free to override them in your own pom. This would allow you to keep the files in the same places but move to a Maven build process. Look in this location to see the default settings: maven-2.0.4\lib\maven-project-2.0.4.jar\org\apache\maven\project\pom-4 .0.0.xml I personally would move my projects to SVN and then worry about Maven'izing them. Wayne On 8/17/06, Thomas Becker [EMAIL PROTECTED] wrote: I have converted several projects to maven2 archetypes. This of course changed the directory structure. These projects currently are maintained in cvs, along with years of version history etc. My hope is to retain this history and re-introduce the maven2-ized projects back into cvs (and eventuall svn but that should be easy - cvs2svn). Is this possible, and if so, how? tia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting Project Artifact with Antlib
Use the Maven tasks for Ant. http://maven.apache.org/ant-tasks.html Chris -Original Message- From: Olexandr Zakordonskyy [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 August, 2006 15:59 To: users@maven.apache.org Subject: Getting Project Artifact with Antlib Hello. Are there any existing way of getting project artifact from ant script, having groupId, artifactId, version and type? For example how can i get axis2.jar from maven2 repository by ant? having: groupIdaxis2/groupId artifactIdaxis2/artifactId packagingjar/packaging I need to know system path of downloaded artifact. Is it possible somehow? Olexandr. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Want to create a second jar for obfuscated classes
This is different than the way you want to do it, but generally I use antrun invocations to build my secondary artifacts (also influenced by the fact we're migrating from Ant, anyway, so it's easy to copy over). For you, it might look something like: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idgen-obfuscated-jar/id phasepackage/phase configuration tasks jar basedir=${basedir}/target/obfuscated-classes/ destfile=${project.build.directory}/${project.name}-${project.version}- obfuscated.jar / /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin The only difference I've noticed is that the jar plugin will by default add Maven descriptor files to the jar; the ant invocation won't. Chris -Original Message- From: Dave Comeau [mailto:[EMAIL PROTECTED] Sent: Thursday, 10 August, 2006 22:17 To: Maven list (E-mail) Subject: Want to create a second jar for obfuscated classes This is a noob question... In my project I need to obfuscate my classes, and produce two jars: one with the unobfuscated code, one with the obfuscated code. The obfuscation is Ant task attached to the process-classes phase, which outputs the obfuscated classes in a folder called ${basedir}/target/obfuscated-classes/ My hope is that I can just use Maven's jar plugin to create the second jar with the same resources/content/format as the first jar, except it's outputDirectory (where it finds the classes to put in the jar) is ${basedir}/target/obfuscated-classes/ So I tried adding this to my pom: !-- Jar plugin, build a jar from the obfuscated classes -- plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId executions execution idobfuscated-jar/id phasepackage/phase goals goaljar/goal /goals configuration jarNameobfuscated-jar/jarName outputDirectory${basedir}/target/obfuscation/classes/output Directory /configuration /execution /executions /plugin But I get an error that outputDirectory is read only. If I remove the outputDirectory, I do get two jars, but their identical. Is it possible to do what I want to do? Thank you , Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Optional Goals Dependencies
Then you probably want to become familiar with the wonderful world of profiles. http://maven.apache.org/guides/introduction/introduction-to-profiles.htm l Chris -Original Message- From: Douglas Ferguson [mailto:[EMAIL PROTECTED] Sent: Wednesday, 09 August, 2006 17:25 To: 'Maven Users List' Subject: Optional Goals Dependencies I am trying to figure out a way to define optional goals and/or dependencies. Is there a way to do this? I am looking for something similar to the ability in ant to only do a certain task if a certain property is set. __ Douglas W. Ferguson EPSIIA - Another Fiserv Connection Development Office Phone: 512-329-0081 ext. 3309 Dial Toll Free: 800-415-5946 Mobile Phone: 512-293-7279 Fax: 512-329-0086 [EMAIL PROTECTED] www.epsiia.com http://www.epsiia.com/ __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Offline documentation
You can probably check out the entire core Maven project and then run mvn site in the root directory to generate documentation for all of the core plugins. Chris Hilton -Original Message- From: Paul Michael Reilly [mailto:[EMAIL PROTECTED] Sent: Monday, 07 August, 2006 12:24 To: users@maven.apache.org Subject: Offline documentation As near as I can tell, all Maven2 reference documentation is on-line accessible. I find myself on vacation now with rare and low quality on-line access. Is there some way I can easily download documentation for the Maven2 core and plugins? I am about to go get the Mergere book (pdf) but I was wondering if there is some other options? Thanks, -pmr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using apt (annotation processing) with maven 2
There is a source jar for an apt plugin at: http://www.mvnrepository.com/artifact/org.apache.myfaces.tobago/maven-ap t-plugin/1.0.7 No idea if that works, but might be worth investigating. As far as the antrun option goes, you'll need to specify the ant-apt.jar as a dependency within the antrun execution, something like: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId execution phaseprocess-classes/phase configuration tasks apt .../apt /tasks /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdant/groupId artifactIdant-apt/artifactId versionSOME_VERSION/version /dependency /dependencies /plugin Unfortunately, it doesn't appear that the ant-apt jar has been loaded into the main repository, so you can either (1) go through the process to add it to the main repository, (2) do an install:install-file to install it in your local repository, (3) do a deploy:deploy-file to deploy it your company repository (you do have one, right?), or (4) make your dependency a system dependency and specify a local path. (1) would be nice so everyone else can use it but might take a while, so you'll probably need to do (2) or (3) short-term. (4) should generally be avoided, but is mentioned for completeness. Chris -Original Message- From: Rohnny Moland [mailto:[EMAIL PROTECTED] Sent: Thursday, 03 August, 2006 08:31 To: users@maven.apache.org Subject: using apt (annotation processing) with maven 2 Hi, I wonder if any have got the ant apt plugin to work with maven 2? Just trying to do something like this: tasks apt srcdir=${basedir}/src/main/java destdir=${basedir}/src/main/resources/component classpath=${project.compileClasspathElements} preprocessdir=${basedir}/src/main/java debug=on deprecation=off optimize=on includeAntRuntime=no nocompile=false factory=comtools.ConfigProcessorFactory /apt /tasks But I get a task not found exception because ant cannot find the ant-apt.jar (I just put in in m2/lib). Any good ideas? Or if someone knows some apt maven tool that _works_. Thanks in advance, Rohnny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [M2] Surefire POJO / Inner class issue
I also ran into this issue and found this page with a workaround: http://www.jroller.com/page/gridhaus?entry=maven2_testing_madness Basically, just configure Surefire to exclude the problem classes, like this worked for me: plugin artifactIdmaven-surefire-plugin/artifactId configuration excludes exclude**/TestDevice.java/exclude /excludes /configuration /plugin Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July, 2006 11:49 To: Maven Users List Subject: Re: [M2] Surefire POJO / Inner class issue Hi Hal - I'm running into a similar issue.. did you find a work-around? thx, -Russ ([EMAIL PROTECTED]) At 4:05 PM -0700 7/14/06, Hal Hildebrand wrote: I'm running into a weird issue here. It seems that the Maven surefire plugin is trying to create POJO tests for inner classes which clearly aren't tests. I'm not even a surefire novice, so I'm not sure why on earth this is happening - I'm just wondering how to stop it from happening. Anyone have any clues as to how to escape this? [INFO] Surefire report directory: /Users/hhildebrand/Projects/wadi/modules/core/target/surefire-reports org.apache.maven.surefire.booter.SurefireExecutionException: Unable to instantiate POJO 'class org.codehaus.wadi.sandbox.jcache.TestJCache$NoEvictionPolicy' ; nested exception is java.lang.InstantiationException: org.codehaus.wadi.sandbox.jcache.TestJCache$NoEvictionPolicy; nested exception is org.apache.maven.surefire.testset.TestSetFailedException: Unable to instantiate POJO 'class org.codehaus.wadi.sandbox.jcache.TestJCache$NoEvictionPolicy' ; nested exception is java.lang.InstantiationException: org.codehaus.wadi.sandbox.jcache.TestJCache$NoEvictionPolicy org.apache.maven.surefire.testset.TestSetFailedException: Unable to instantiate POJO 'class org.codehaus.wadi.sandbox.jcache.TestJCache$NoEvictionPolicy' ; nested exception is java.lang.InstantiationException: org.codehaus.wadi.sandbox.jcache.TestJCache$NoEvictionPolicy java.lang.InstantiationException: org.codehaus.wadi.sandbox.jcache.TestJCache$NoEvictionPolicy at java.lang.Class.newInstance0(Class.java:335) at java.lang.Class.newInstance(Class.java:303) at org.apache.maven.surefire.testset.PojoTestSet.init(PojoTest Set.java:52) at org.apache.maven.surefire.junit.JUnitDirectoryTestSuite.creat eTestSet(J UnitD irectoryTestSuite.java:61) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.lo cateTestSe ts(Ab stractDirectoryTestSuite.java:93) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition( Surefire.j ava:1 47) at org.apache.maven.surefire.Surefire.run(Surefire.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.ja va:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccesso rImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInPr ocess(Sure fireB ooter.java:225) at org.apache.maven.surefire.booter.SurefireBooter.main(Surefire Booter.jav a:747) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to deselect classes while creating jar?
I'm far from an expert, but I think you have to put your exclude elements in a separate excludes element, like: includes include/ /includes excludes exclude/ /excludes -Original Message- From: Abhijit Diwan [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July, 2006 00:28 To: users@maven.apache.org Subject: How to deselect classes while creating jar? Hi all I have maven 2.0 project which includes all the java classes for my project. Now I do not want to create single jar from the classes generated in the target directory. But there is no documentation on the maven jar plug-in site about how can I exclude the some of the classes from getting them in to the jar. I am using maven 2.0. Also there is lot of cyclic dependency in the classes so can not really separate the projects. I feel there is no clear documentation about how can I skip some of the classes from getting in to the jar. I am using following profile like this and calling mvn jar:jar -PConnectorJar from the command line. profile idConnectorJar/id build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId configuration includes includecom/tibco/ejb/common/*.java/include includecom/tibco/ejb/connector/*.java/include includecom/tibco/ejb/support/*.java/include includecom/tibco/ejb/util/*.java/include includecom/tibco/ejb/adapter/*.java/include includecom/tibco/ejb/jca15/support/*.java/include includecom/tibco/ejb/jca15/util/*.java/include includecom/tibco/ejb/jca15/connector/**/*.java/include !--exclude**/*Work*.java/exclude-- /includes /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-jar-plugin/artifactId configuration jarNameAeConnector/jarName /configuration /plugin /plugins /build activation property nameAeConnectorJar/name /property /activation /profile Help on this will be really appreciated. Thanks a lot Abhijit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 1 Module - N output jars
1. Are you sure you need to disable jar:jar? Or just modify it such that it builds one of your desired jars? I also needed to generate multiple jars for a project; you can read about my particular solution here: http://www.nabble.com/-maven2--Generating-several-artifacts-per-project- --tf1689630.html#a4630045 2. Don't know, but hopefully answer 1 will make this a moot point. Chris -Original Message- From: Alexis Midon [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July, 2006 09:50 To: Maven Users List Subject: 1 Module - N output jars Hi all, I'm currently migrating a big project from Ant to Maven. I have exploded the source code in modules as much as possible but for legacy reasons I want one of them to generate N output jars (instead of a single one). My question is How can I do that? I have several leads but some questions remain. Here they are : 1. add to package phase an antrun plugin to create the desired jars, but then the underlying question is: how to disable the 'jar:jar' goal during this phase? 1bis. use the assembly plugin to build several jars, sounds quite cumbersome and not better than the ant plugin solution. 2. is there a way to make the jar plugin generate several jars? Thanks for your help! Alexis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 1 Module - N output jars
Right, but you can designate one of the jars you want to create as the primary jar for Maven's purposes, even though this may mean nothing to you, and then configure the maven-jar-plugin with the appropriate includes/excludes to create that jar. Then use the other technique to create your secondary jars and attach them. -Original Message- From: Alexis Midon [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July, 2006 12:14 To: Maven Users List Subject: Re: 1 Module - N output jars well disable the jar:jar is not a requirement, but if I generate several jars, I do not need the jar:jar goal to create a big jar containing all classes. you see what I mean? by the way, your answer is really appreciated. I did not know the build-helper-maven-plugin up until now. Regards, Alexis On 7/27/06, Chris Hilton [EMAIL PROTECTED] wrote: 1. Are you sure you need to disable jar:jar? Or just modify it such that it builds one of your desired jars? I also needed to generate multiple jars for a project; you can read about my particular solution here: http://www.nabble.com/-maven2--Generating-several-artifacts-per-projec t- --tf1689630.html#a4630045 2. Don't know, but hopefully answer 1 will make this a moot point. Chris -Original Message- From: Alexis Midon [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July, 2006 09:50 To: Maven Users List Subject: 1 Module - N output jars Hi all, I'm currently migrating a big project from Ant to Maven. I have exploded the source code in modules as much as possible but for legacy reasons I want one of them to generate N output jars (instead of a single one). My question is How can I do that? I have several leads but some questions remain. Here they are : 1. add to package phase an antrun plugin to create the desired jars, but then the underlying question is: how to disable the 'jar:jar' goal during this phase? 1bis. use the assembly plugin to build several jars, sounds quite cumbersome and not better than the ant plugin solution. 2. is there a way to make the jar plugin generate several jars? Thanks for your help! Alexis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 1 Module - N output jars
So, just to keep this thread up-to-date, according to the other email I just read (RE: How to deselect classes while creating jar? from Simon Kitching), you can't exactly do what I outlined below because the jar plugin does not support includes/excludes yet. Please vote for http://jira.codehaus.org/browse/MJAR-30. Until then, I guess you will have to create one big jar with everything and all of your custom jars will be secondary artifacts. Chris -Original Message- From: Chris Hilton Sent: Thursday, 27 July, 2006 12:19 To: 'Maven Users List' Subject: RE: 1 Module - N output jars Right, but you can designate one of the jars you want to create as the primary jar for Maven's purposes, even though this may mean nothing to you, and then configure the maven-jar-plugin with the appropriate includes/excludes to create that jar. Then use the other technique to create your secondary jars and attach them. -Original Message- From: Alexis Midon [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July, 2006 12:14 To: Maven Users List Subject: Re: 1 Module - N output jars well disable the jar:jar is not a requirement, but if I generate several jars, I do not need the jar:jar goal to create a big jar containing all classes. you see what I mean? by the way, your answer is really appreciated. I did not know the build-helper-maven-plugin up until now. Regards, Alexis On 7/27/06, Chris Hilton [EMAIL PROTECTED] wrote: 1. Are you sure you need to disable jar:jar? Or just modify it such that it builds one of your desired jars? I also needed to generate multiple jars for a project; you can read about my particular solution here: http://www.nabble.com/-maven2--Generating-several-artifacts-per-projec t- --tf1689630.html#a4630045 2. Don't know, but hopefully answer 1 will make this a moot point. Chris -Original Message- From: Alexis Midon [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 July, 2006 09:50 To: Maven Users List Subject: 1 Module - N output jars Hi all, I'm currently migrating a big project from Ant to Maven. I have exploded the source code in modules as much as possible but for legacy reasons I want one of them to generate N output jars (instead of a single one). My question is How can I do that? I have several leads but some questions remain. Here they are : 1. add to package phase an antrun plugin to create the desired jars, but then the underlying question is: how to disable the 'jar:jar' goal during this phase? 1bis. use the assembly plugin to build several jars, sounds quite cumbersome and not better than the ant plugin solution. 2. is there a way to make the jar plugin generate several jars? Thanks for your help! Alexis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven-jar-plugin: include/exclude functionality?
Another option is to build your subset jars and attach them as artifacts with the build-helper plugin. See: http://www.nabble.com/-maven2--Generating-several-artifacts-per-project- --tf1689630.html#a4630045 Chris Hilton -Original Message- From: Denis Cabasson [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 July, 2006 02:37 To: users@maven.apache.org Subject: Re: maven-jar-plugin: include/exclude functionality? Simon Kitching-2 wrote: I need to build 3 jars from the classes created by a module; a full jar and two jars that contain subsets of the available classes. If you need to build 3 different jars (not taking into account javadoc and sources jar) from a single module, it's probably that this module should be 3 different modules :) If, for whatever reason, you don't want to split up your module in 3 different modules, you have to use the assembly plugin to create customs jars out of your module. Denis. -- View this message in context: http://www.nabble.com/maven-jar-plugin%3A-include-exclude-func tionality--tf1995736.html#a5481135 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: deploying jars without version information
While migrating projects at my company, I've taken a bit of an Ant/Maven hybrid approach. I've been able to Mavenize a couple of projects, but some other projects need to refer to those jars with their original names. In those cases, I've modified the Ant builds in those projects to use the Ant tasks for Maven to copy the files from the repository and rename them for local use. Chris Hilton -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Trent Albright Sent: Tuesday, 25 July, 2006 13:43 To: Maven Users List Subject: Re: deploying jars without version information Ironic. I was just getting ready to ask a similar question. Although I'm fine with the versioning that occurs in the repository, I need the ability for the jar name to not contain this version string in it when I create a release or deploy the project to the integration server for testing. In my case I'm extending a pre-existing J2EE commercial application. It expects jars, even ones especially created for end-user customization, to follow certain naming conventions. It's just not feasible for these jars to be renamed to something else (yaddayadda-1.0-SNAPSHOT.jar). Yes, it's true that you can use the plug in configuration section to force a generated jar or war to have a certain name. As far as I can tell, this only affects the package phase. Am I on the wrong track here thinking that maven2 is suitable for creating official releases, for deploying to integration test servers? If it is appropriate to use maven2 for this purpose, how would you recommend I get around the naming issue? (Again, not in the repository, rather during integration testing and product release). On 7/25/06, Mike Perham [EMAIL PROTECTED] wrote: Why? Removing version info is very dangerous. You then have no idea which version was actually selected by Maven by looking in the artifact after the fact. -Original Message- From: LaCasse, John [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 12:57 PM To: Maven Users List Subject: RE: deploying jars without version information I'm talking about the second case; in the target\webapp\WEB-INF\lib. All compile and runtime scoped dependant jars that get put into this location; I would like the war plugin not to include the version info on all the jars it includes in this location. -Original Message- From: Alexandre Poitras [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 10:53 AM To: Maven Users List Subject: Re: deploying jars without version information What do you means by deploting? Deploying on a maven repository or on a application server ? In the first case, the answer is no because Maven needs those metadatas to be able to manage dependencies. In the other case, yes it's possible just change the name in your war/jar plugin configuration section. On 7/25/06, LaCasse, John [EMAIL PROTECTED] wrote: Hi, Does anybody know if you can have Maven deploy the jars that end up in webapp/WEB-INF/lib without the version information in the filename? Thanks, Jpl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Emacs Support/Compiler Plugin
Wasn't your original problem with grabbing compilation errors from the output? You should probably take a look at the following message: http://www.nabble.com/forum/ViewPost.jtp?post=4125504framed=y It should be as easy as modifying your emacs setup. Chris -Original Message- From: Paul Michael Reilly [mailto:[EMAIL PROTECTED] Sent: Wednesday, 28 June, 2006 14:30 To: users@maven.apache.org Subject: Emacs Support/Compiler Plugin I am thinking that the right place to add Maven 2.0 support for Emacs' compilation mode is the Java compiler plugin. I'm looking for suggestions and experiences from anyone who may have tried to or has accomplished this goal. Thanks, -pmr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: maven ant tasks snapshot handling
No, you're not the only one; there's already a JIRA bug for it. http://jira.codehaus.org/browse/MNG-1408 Since there's no telling when the bug will be officially fixed, my solution has been to check out maven, apply the patch at the link, and build a new maven-artifact-ant jar (the command you need is mvn assembly:assembly, by the way; took me a while for that). Chris -Original Message- From: Tom Huybrechts [mailto:[EMAIL PROTECTED] Sent: Wednesday, 14 June, 2006 14:43 To: Maven Users List Subject: maven ant tasks snapshot handling Hi all, I'm using the maven tasks for ant (2.0.4) to download snapshots from a repository. My target looks like this: maven:dependencies pathId=mypath verbose=true maven:remoteRepository url=http://myrepository/snapshots; snapShots enabled=true updatePolicy=always / /maven:remoteRepository dependency groupId=myGroup artifactId=myArtifact version=1.0.0-SNAPSHOT / /maven:dependencies Now my snapshots are downloaded to ~/.m2/repository/myGroup/1.0.0-SNAPSHOT/myArtifact-...jar (like I would expect). But the mypath-path refers to ~/.m2/repository/myGroup/1.0.0-mmdd.hhmmss/myArtifact-...jar I didn't find any mention in the JIRA. Am I doing something wrong - I can't imagine everybody is having this problem ? Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: working with custom-built org.apache.maven.plugins
Someone before suggested making a sort of internal release. Along those lines, I do the following: 1. Add my own distributionManagement info to the pom.xml, overriding the default info from Apache. This way I can deploy it easily to our internal repository with 'mvn deploy'. 2. Change the version from x.x-SNAPSHOT to x.x-subversion# (also from the earlier suggestion). Now you don't have to worry about snapshot versions and repositories, just refer to it with the explicit version number like you would any other plugin. If you can get your other dependencies from your internal repository okay, you should have no problem getting to this one. Chris Hilton -Original Message- From: Doug Douglass [mailto:[EMAIL PROTECTED] Sent: Thursday, 08 June, 2006 14:37 To: Maven Users List Subject: working with custom-built org.apache.maven.plugins I'm struggling with an issue regarding custom-built versions of maven plugins in the org.apache.maven.plugins groupId. Specifically, I've built a custom 2.1-SNAPSHOT version of maven-pmd-plugin that includes http://jira.codehaus.org/browse/MPMD-33. The plugin builds, installs and runs correctly (on any machine that has done 'mvn install'). The problems arise when trying to deploy to our corporate snapshot repo so the plugin version can be accessed by other developers and our CI machines: 1. I haven't found a way to deploy directly via 'mvn deploy'. Maven honors the POM distributionManagement, which attempts to deploy to the official Apache snapshot repository. 2. Using 'mvn deploy:deploy-file -D...' to deploy the plugin works, in that the POM and JAR are deployed, but maven fails to use them as the POM has a '-1' suffix to the version, while the JAR has a '-2' suffix. Renaming the files manually in the repository might fix this, but I can't be sure due to 3. Maven appears to only attempt to download org.apache.maven.pluginsfrom the central repo (we use a mirror of ibiblio) and never searches our corp repo even though our corp/parent POM has it listed as a pluginRepository with snapshots set to true. So, how are people handling these problems: Would adding our corp. repo as a mirror of central fix #3? Should this be necessary? What about deployment? It seems like either deploy:deploy-file is broken (I doubt this as we use it all the time for 3rd party stuff, but maybe broken when using SNAPSHOTs) or that deploy:deploy should have the same repositoryId and url parameters as deploy-file added to it. All thoughts are appreciated. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [maven2] Generating several artifacts per project ?
I didn't see the right answer go by for this (or what I thought was right), so I hope I'm not repeating something. In one of my projects that needs a secondary jar with a subset of classes, I've done the following: build plugins plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasepackage/phase configuration tasks jar basedir=${project.build.outputDirectory} destfile=${project.build.directory}/${project.name}-${project.version}-client.jar include name=org/example/client/**/*.class / /jar /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdbuild-helper-maven-plugin/artifactId executions execution idattach-artifacts/id phasepackage/phase goals goalattach-artifact/goal /goals configuration artifacts artifact file${project.build.directory}/${project.name}-${project.version}-client.jar/file typejar/type classifierclient/classifier /artifact /artifacts /configuration /execution /executions /plugin /plugins /build I've created the secondary jar with a small Ant script bound to the package phase, but obviously there are a number of other ways you could do it. Then you just use the build-helper plugin to attach your jar as another artifact with a classifier to distinguish it from the primary artifact. You'll also need that classifier when referring to the secondary artifact as a dependency. Chris Hilton -Original Message- From: sol myr [mailto:[EMAIL PROTECTED] Sent: Friday, 26 May, 2006 17:50 To: users@maven.apache.org Subject: [maven2] Generating several artifacts per project ? Hi, Newbie question: Is it possible to generate several artifacts (jars) from the same project ? I have a single project (single POM, with no sub-projects). I'd like to make it so that when I call 'mvn package', it will create 3 different jars (say, client.jar, server.jar, and util.jar), and place them all under 'target'. I *know* this goes agains the recommendations phylosophy of Maven2... But we really must limit ourselves to a single POM, due to limitations of my company's IDE and version control. Thanks. - Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why can't continuum find my local m2 repositories?
I'm pretty new to Maven myself, but I think this is because you have defined a lot of server (server) information for deployment, but not repositories(repositories). Take a look at the settings.xml again, create a profile with the repositories you want, and make that profile active. http://maven.apache.org/maven-settings/settings.html Chris Hilton -Original Message- From: Dave Hoffer [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 May, 2006 10:15 To: Maven Users List Subject: RE: Why can't continuum find my local m2 repositories? The problem is that the continuum build of the project fails when it tries to find artifacts I have deployed to my external_free repository. Downloading: http://repo1.maven.org/maven2/jai/jai-imageio/1.0.1/jai-imagei o-1.0.1.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/jai/jai-core/1.1.2/jai-core-1.1.2.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/jai/jai-codec/1.1.2/jai-codec-1.1.2.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/jai/jai-imageio/1.0.1/jai-imagei o-1.0.1.jar [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/jai/jai-codec/1.1.2/jai-codec-1.1.2.jar [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/jai/jai-core/1.1.2/jai-core-1.1.2.jar [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) [INFO] -- -- [ERROR] BUILD ERROR [INFO] -- -- [INFO] Failed to resolve artifact. Missing: -- 1) jai:jai-imageio:jar:1.0.1 2) jai:jai-codec:jar:1.1.2 3) jai:jai-core:jar:1.1.2 Now I have all these deployed into external_free repository so why can't it find them? It suggests I install them. My understanding is that deploy also installs so they should be in both repositories. -dh -Original Message- From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 10:04 AM To: Maven Users List Subject: Re: Why can't continuum find my local m2 repositories? Dave Hoffer a écrit : I haven't used profiles yet. I have the following local repositories defined in my maven conf/settings.xml as: Continuum doesn't use $M2_HOME/conf/settings.xml but a global settings.xml that must be stored somewhere (depends how you launch continuum). You'll find the location in logs with a line that contains Building Maven global-level settings from: Where is your problem exactly? in maven execution inside Continuum or in project initialization? Emmanuel servers server idinternal/id usernameanonymous/username passwordxrbuild/password /server server idinternal_snapshot/id usernameanonymous/username passwordxrbuild/password /server server idexternal_free/id usernameanonymous/username passwordxrbuild/password /server server idexternal_free_snapshot/id usernameanonymous/username passwordxrbuild/password /server server idexternal_non_free/id usernameanonymous/username passwordxrbuild/password /server /servers Now each project/artifact pom has a section like: distributionManagement repository idinternal/id nameInternal Release Repository/name urlftp://XRBUILD2.xrite.com/internal/url /repository snapshotRepository idinternal_snapshot/id nameInternal Snapshot Repository/name urlftp://XRBUILD2.xrite.com/internal_snapshot/url uniqueVersiontrue/uniqueVersion /snapshotRepository /distributionManagement All the artifacts in my external repositories got there because I deployed them using the command line syntax. The problem I seem to have is that when building a project with continuum where I have specified a dependency such as: dependency groupIdjai/groupId artifactIdjai-core/artifactId version1.1.2/version /dependency Where this is already deployed in my external_free repository, it does not find them. -dh -Original Message- From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 9:15 AM To: Maven Users List Subject: Re: Why can't continuum find my local m2 repositories? continuum uses settings.xml like mvn Where is define your repository