Re: [m2]release:prepare requires snapshots ?
Hi, Should i be able to do a release:prepare from a parent project ? If the parent project does not have a snapshot version number, then it will fail. But if the parent has a snapshot number then it will fail when it runs the release:prepare at the child project because it can't release due to a non released parent. thanks patrick dan tran [EMAIL PROTECTED] 12/22/2005 08:52 PM Please respond to Maven Users List users@maven.apache.org To Maven Users List users@maven.apache.org cc Subject Re: [m2]release:prepare requires snapshots ? It follows maven development process where - during development, every one works on snapshots - at release time, the snapshost got changed to release version, check back into SCM, label, and build. This is where customer can use, including qa, stake holder, etc - then the version is increamented with snapshot and check into SCM again. -Dan On 12/22/05, Patrick O'shea [EMAIL PROTECTED] wrote: Hi, I'm am trying to use the release:prepare goal. I can see from the source code that it is supposed to throw an exception if the project being release is not a snapshot. Why is this ? Kind regards, Patrick O'Shea
Re: Resources in parent pom
I don't. parent pom -- groupIdsedamit-parent/groupId version1.0/version nameSedamIT Reactor/name artifactIdreactor/artifactId packagingpom/packaging build sourceDirectorysrc/sourceDirectory resources resource directorysrc/directory excludes exclude**/*.java/exclude /excludes /resource /resources Child pom -- parent groupIdsedamit-parent/groupId artifactIdreactor/artifactId version1.0/version /parent I looked at the code maven-resources-plugin, and this should work. Yann Le Du wrote: Hi Filip, Do you have any extra resource declared in child pom ? http://docs.codehaus.org/display/MAVENUSER/FAQs#FAQs-DoesaPOMinherititsresources%3F -- Yann 2005/12/22, Nitko2 [EMAIL PROTECTED]: Hi, I have a parent pom with declared resources in it, but it doesn't get propagated in child pom. Is it supposed to work like that or is it a bug? Thanks, Filip - 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]
Maven embedder importance
Hi, I asked a question about embedder few days ago, but I didn't get any answer, so I suppose it is a bug. Anyway, I think it is very important to get maven embedder working. Everyone will benefit form it. Maven developers will have more time because there will be less questions on mailing list. For instance, i wouldn't ask about resource pom inheritance if I was able to debug it in eclipse. Maven users will learn faster and will be able to determine if something is a bug or they made a mistake. And when they find a bug they will be able to report it(or patch it) more accurately. If I had embedder working I would save at least 10 days in configuring my build process. Filip Original Message Subject: running maven in eclipse using embedder Date: Thu, 15 Dec 2005 13:16:28 +0100 From: Nitko2 [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Hi, I managed to start maven inside eclipse using maven embedder, but I can't force embedder to use plugins which are also imported in eclipse. If I add eclipse project containing maven plugin in classpath I get an error: org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-assembly-plugin:2.0:assembly': Unable to find the mojo 'org.apache.maven.plugins:maven-assembly-plugin:2.0:assembly' in the plugin 'org.apache.maven.plugins:maven-assembly-plugin' org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) Caused by: org.codehaus.plexus.component.composition.CompositionException: Composition failed for the field archiverManager in object of type org.apache.maven.plugin.assembly.AssemblyMojo at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:144)at org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73)at org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68) org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486) org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29) ... 18 more Caused by: java.lang.IllegalArgumentException at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source) at java.lang.reflect.Field.set(Unknown Source) at org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:137) ... 22 more Can someone help me with this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDK path
Hello to all! On my PC installed 2 JDK, 1.4.2 and 5.0. How should I point a path for maven 2 to use 5.0 JDK? Thanks for your responses! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDK path
Set the JAVA_HOME environment variable. On windows it's with config panel/system/?/environment variables. Eugene Kirin wrote: Hello to all! On my PC installed 2 JDK, 1.4.2 and 5.0. How should I point a path for maven 2 to use 5.0 JDK? Thanks for your responses! -- With kind regards, Geoffrey De Smet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installation problem
The machine has no internet connection its on a closed network, should it still not reference the local plug-in store? I have another problem when trying to install on window I get this when I try to run mvn --version ERROR: M2_HOME is set to an invalid directory. M2_HOME = C:\maven\maven-2.0.1\bin Please set the M2_HOME variable in your environment to match the location of the Maven installation When using sygwin I get this: Exception in thread main java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher David Abbs EDS - Court Services Account UKNMSC 100 Napier Street, Sheffield, S11 8HD ( Phone:+1-0114 291 1338) (Mobile: 07765028732) + mailto:[EMAIL PROTECTED] -Original Message- From: Allan Ramirez [mailto:[EMAIL PROTECTED] Sent: 22 December 2005 23:18 To: Maven Users List Subject: Re: Installation problem Hi, You may refer to the FAQ page, http://docs.codehaus.org/display/MAVENUSER/FAQs#FAQs-HowdoIresolvethe%27 %3Cpluginname%3Edoesnotexistornovalidversion%27error%3F Hope this helps -allan Abbs, David A wrote: I am installing maven 2.0.1 on Linux red hat running on a sun machine with java 1.4.2 installed and configured. My JAVA_HOME environment is set correctly and the maven install directory added to my PATH variable When I do mvn --version it gives me Maven version: 2.0.1 Which looks fine. However when I then try to run mvn archetype:create -DgroupId=3D3Dcom.mycompany.app = -DartifactId=3D3Dmy-app To create myself a project I get this [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file [INFO] Repository 'central' will be blacklisted [INFO] --- - [ERROR] BUILD ERROR [INFO] --- - [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-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: Thu Dec 22 16:28:52 GMT 2005 [INFO] Final Memory: 1M/2M [INFO] --- - - Any help would be very much appreciated David Abbs David Abbs EDS - Court Services Account UKNMSC 100 Napier Street, Sheffield, S11 8HD ( Phone:+1-0114 291 1338) (Mobile: 07765028732) + mailto:[EMAIL PROTECTED] --- - No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.3/209 - Release Date: 12/21/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Maven debugging HOWTO
Hi, it took me some time to figure this out, so it seems worth sharing. Jochen -- Often it does seem a pity that Noah and his party did not miss the boat. (Mark Twain) Maven Debugging HOWTO === When looking for bugs in Maven itself or plugins, it saves a real lot of time, if you can run Maven in a debugger. Fortunately, this is a relatively trivial task, if you know what to do. 1.) Invoking Maven from the command line Basically, your debugger should execute the following command line. M2_HOME=/usr/local/maven-2.0.1 # Or whatever you have as Maven home # use set M2_HOME=... on Windows M2_REPO=/home/jochen/.m2/repository # Or whatever you have as Maven repository # use set M2_REPO=... on Windows CW=$M2_REPO/classworlds/classworlds/1.1-alpha-2/classworlds- 1.1-alpha-2.jar # The version number may depend on the Maven version. # Check your mvn script, if you are in doubt. # Use set CW=%M2_REPO%/... on Windows ARGS=-Dclassworlds.conf=$M2_HOME/bin/m2.conf -Dmaven.home=$M2_HOME # Use set ARGS=-Dclassworlds.conf=%M2_HOME%/... on Windows java -cp $CW $ARGS org.codehaus.classworlds.Launcher goals # Use java -cp %CW% ... on Windows 2.) Using an IDE Basically, it should be easy to translate the above command line into your IDE's settings. In what follows, I'll describe the Eclipse IDE as an example. However, there's one imortant Gotcha, which you should be aware of: In the above example, the initial classpath contains the classworlds jar file - and nothing else! Your IDE will typically suggest a larger classpath. For example, if you have a Maven project, it will suggest to put this project and its dependencies on the classpath. But that will most likely fail. The reason is, that the projects dependencies will typically contain multiple instances of the same dependency. For example, with Maven 2.0.1 you will have plexus-utils 1.0.4 as well as plexus-utils-1.0.5. This is no problem, if you are using the class loaders that Maven creates for you. It won't work, if the IDE creates class loaders: For example, depending on the order of dependencies, only version 1.0.4 will be used, even if some classes depend on 1.0.5. In other words: Before starting the IDE's debugger, make sure that the class path contains the boot class loader and the classworlds.jar file, but nothing else. 3.) Example: The Eclipse IDE --- - Make sure, that the Maven 2 Eclipse Plugin is installed. See http://maven.apache.org/eclipse-plugin.html for installing the plugin. - Checkout the following projects from SVN. Maven: http://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.1/ If you need plugin parents, checkout other projects as well, for example Plugins: http://svn.apache.org/repos/asf/maven/plugins/trunk Note, that I did *not* checkout the Maven trunk. That rarely pays. Typically, you'll find differences in the plugin versions which are being used. Unfortunately, tags like Maven 2.0.1 are valid for the Maven core only. There are no such tags for the various plugins. This makes it sometimes rather difficult to have the right plugin sources. (Hint to the Maven developers!) - Use the Maven 2 plugin to enable that these projects are Maven projects. - Initially, invoke the bootstrap script in the Maven root directory. - Select Run/Run... in the menu. A window opens. - Select Java Application and press the New button. - Set the new debugging profiles name, for example Maven. - Enter the Main class: org.codehaus.classworlds.Launcher Do not attempt to use the Search button: It doesn't show main classes in dependencies. - Switch to Arguments. - In Program arguments, enter the goals you want to use, plus properties you want to set. - In VM arguments, enter the -Dclassworlds.conf=... -Dmaven.home=... arguments from 1.) - Select Working directory/Other, and your projects base directory. (Where you would typically invoke mvn from.) - Switch to Classpath - Remove all User Entries. In particular, remove your project, and the Maven projects, if they should be there. - Add the classworlds jar file from 1.) to User Entries. - Switch to Source Path. - You may safely add your own projects, the Maven projects, plugin projects, and whatever you like, here. That's it. Press Run and watch Maven running. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: what is dependencyManagement used for?
No, it is possible. Just declare your dependencies in the parent pom (directly into dependencies not in dependencyManagment) and they will be inherited in all subproject. Could be usefull for some libraries like junit or log4j used accross all modules of an entire product. From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: users@maven.apache.org Subject: Re: what is dependencyManagement used for? Date: Thu, 22 Dec 2005 11:19:05 -0600 (CST) nope, each subproject needs to declare what it uses, but can be seeded version wise from the parent On 12/22/05, Mick Knutson [EMAIL PROTECTED] wrote: That sounds great, but what if I am using multiple sub projects and they all require some standard libs? Is there a way to just declare them in the root pom instead of having to re-declare them in each sub pom? Thanks Mick Knutson http://www.BASELogic.com http://www.MickKnutson.com MSN Messenger: [EMAIL PROTECTED] - Original Message - From: \Jesse McConnell\ [EMAIL PROTECTED] To: \Maven Users List\ users@maven.apache.org; \Mick Knutson\ [EMAIL PROTECTED] Sent: Thursday, December 22, 2005 8:18 AM Subject: Re: [m2] what is dependencyManagement used for? it lets you set all of the scopes and versions of dependencies in one place, and then child poms don\'t need to specify versions in their dependencies, they get inherited from the parent pom. then if you up the version for something, you can update it only in one place. On 12/22/05, Mick Knutson [EMAIL PROTECTED] wrote: what is dependencyManagement used for? Thanks Mick Knutson http://www.BASELogic.com http://www.MickKnutson.com MSN Messenger: [EMAIL PROTECTED] -- jesse mcconnell -- jesse mcconnell jesseDOTmcconnellATgmailDOTcom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Créez gratuitement votre espace perso en ligne avec MSN Spaces ! http://spaces.msn.com/?mkt=fr-be - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven-proxy functional with Maven 2?
Carlos Sanchez wrote: What patch are you talking about? I'm using it and works fine http://jira.codehaus.org/browse/MAVENPROXY-36 Otherwise it is just annoying to replace broken elements from your local repo. Or worse, once M2 learns about updated hashes, the proxy would eliminate the functionality. - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Migrating site from forrest to maven
One thing that's preventing me from moving from Forrest to Maven is the lack of support for running the site - something like forrest run. In forrest, you can execute forrest run and it loads a jetty server which generates and serves the requested page on demand. It also reloads (and regenerates) the page if I modify it. It's more like a preview feature... Unfortunately, maven requires that you generate the entire site - including reports, etc - which takes a long time...too long if all you wanted is to see how the new image looks in the page ;-) It seems this is doable to write using a mojo, or perhaps a standalone tool using the embedded, but I lack the skills and inner maven workings to do it myself. But I did open a JIRA on this... On 12/21/05, Bruno Aranda [EMAIL PROTECTED] wrote: Hi! I'd like to know if there is some kind of tool or previous experiences to share in the migration of documentation from a project that is using forrest to maven (apt format or one of the others), before I start doing it by hand :-) TIA, Bruno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, _ Arik Kfir[EMAIL PROTECTED]
RE : Migrating site from forrest to maven
Not migration but integrating the forrest documentation in the maven generated site with a report plugin. Look at : http://jira.codehaus.org/browse/MOJO-129 - Olivier -Message d'origine- De : Bruno Aranda [mailto:[EMAIL PROTECTED] Envoyé : mercredi 21 décembre 2005 19:52 À : Maven Users List Objet : Migrating site from forrest to maven Hi! I'd like to know if there is some kind of tool or previous experiences to share in the migration of documentation from a project that is using forrest to maven (apt format or one of the others), before I start doing it by hand :-) TIA, Bruno - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, any attachments and the information contained therein (this message) are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited. ** Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci après le message ), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re[2]: JDK path
I can't set JAVA_HOME for java 5.0 because it used by java 1.4.2 Set the JAVA_HOME environment variable. On windows it's with config panel/system/?/environment variables. Eugene Kirin wrote: Hello to all! On my PC installed 2 JDK, 1.4.2 and 5.0. How should I point a path for maven 2 to use 5.0 JDK? Thanks for your responses! -- Ñ óâàæåíèåì, Eugene mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] Antrun / Javac
I'm having distinct problems with the Antrun plugin for Maven2, specifically with the inheritance of properties and environment variables. With a simple test where the pom.xml calls a build.xml, which then uses javac, Ant complains about not being able to find com.sun.tools.javac.Main on the classpath. This isn't the usual Ant problem that gives that message, because Ant will run fine from the command line, it's an inheritance from Maven problem. With the files described below, I get a negligible classpath in the Maven part of the operation, and a null classpath in the Ant part. If I run the buildfile from the commandline, I get a full and proper classpath, and execution works. Does anyone have any idea how I can get this to work, and why it does work in one of my projects, but I'm scared to change it to try and find out why, because I'll never get it back to working again... Cheers, Nick Pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdworkbench/groupId artifactIdworkbench/artifactId packagingjar/packaging version1.0-SNAPSHOT/version build sourceDirectory./sourceDirectory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase configuration tasks echo message=Classpath in Antrun task = ${java.class.path}/ ant antfile=build.xml dir=. inheritAll=true /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project == Build.xml: project name=Workbench default=run basedir=. target name=run depends=clean,compile java classname=Workbench / /target target name=compile echo message=Classpath in Ant: ${java.class.path} / javac srcdir=. / /target target name=clean delete fileset dir=. include name=*.class / /fileset /delete /target /project = Workbench.java: public class Workbench { public static void main(String[] args) { System.out.println(Hello); } } This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re[2]: JDK path
Just change your JAVA_HOME in the terminal you use maven. Personally when I work on a windows machine with multiple JDK installed, I use batch script to set a clean environment before doing anything (at least set a minimal PATH, and empty CLASSPATH and the correct JAVA_HOME). Gilles -Original Message- From: Eugene Kirin [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 11:50 To: Maven Users List Subject: Re[2]: JDK path I can't set JAVA_HOME for java 5.0 because it used by java 1.4.2 Set the JAVA_HOME environment variable. On windows it's with config panel/system/?/environment variables. Eugene Kirin wrote: Hello to all! On my PC installed 2 JDK, 1.4.2 and 5.0. How should I point a path for maven 2 to use 5.0 JDK? Thanks for your responses! -- Ñ óâàæåíèåì, Eugene mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installation problem
Hi, Abbs, David A schrieb: The machine has no internet connection its on a closed network, should it still not reference the local plug-in store? I have another problem when trying to install on window I get this when I try to run mvn --version ERROR: M2_HOME is set to an invalid directory. M2_HOME = C:\maven\maven-2.0.1\bin Please set the M2_HOME variable in your environment to match the location of the Maven installation M2_HOME should point to 'C:\maven\maven-2.0.1' not to the 'bin' directory. When using sygwin I get this: Exception in thread main java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher David Abbs EDS - Court Services Account UKNMSC 100 Napier Street, Sheffield, S11 8HD ( Phone:+1-0114 291 1338) (Mobile: 07765028732) + mailto:[EMAIL PROTECTED] -Original Message- From: Allan Ramirez [mailto:[EMAIL PROTECTED] Sent: 22 December 2005 23:18 To: Maven Users List Subject: Re: Installation problem Hi, You may refer to the FAQ page, http://docs.codehaus.org/display/MAVENUSER/FAQs#FAQs-HowdoIresolvethe%27 %3Cpluginname%3Edoesnotexistornovalidversion%27error%3F Hope this helps -allan Abbs, David A wrote: I am installing maven 2.0.1 on Linux red hat running on a sun machine with java 1.4.2 installed and configured. My JAVA_HOME environment is set correctly and the maven install directory added to my PATH variable When I do mvn --version it gives me Maven version: 2.0.1 Which looks fine. However when I then try to run mvn archetype:create -DgroupId=3D3Dcom.mycompany.app = -DartifactId=3D3Dmy-app To create myself a project I get this [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retrieved from repository: central due to an error: Error transferring file [INFO] Repository 'central' will be blacklisted [INFO] --- - [ERROR] BUILD ERROR [INFO] --- - [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-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: Thu Dec 22 16:28:52 GMT 2005 [INFO] Final Memory: 1M/2M [INFO] --- - - Any help would be very much appreciated David Abbs David Abbs EDS - Court Services Account UKNMSC 100 Napier Street, Sheffield, S11 8HD ( Phone:+1-0114 291 1338) (Mobile: 07765028732) + mailto:[EMAIL PROTECTED] --- - No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.3/209 - Release Date: 12/21/2005 - 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]
maven.ejb.client.generate not having any effect
Hi all, I have created an EJB using XDoclet, which builds fine as maven ejb:install. I wanted to create a separate client jar for the ejb interfaces, and from the documentation I found, all that is required is to add this to project.properties (maven 1.0.2): maven.ejb.client.generate = true Trouble is, this doesn't seem to do anything, only the single ejb jar is produced. Is there something else I need to do apart from setting the above property to true? The project.properties looks like this: Graham-Leggetts-Computer:~/src/standard/fabric/fabric-screen minfrin$ cat project.properties # make sure client interfaces are put in a separate project maven.ejb.client.generate = true The build looks like this: Graham-Leggetts-Computer:~/src/standard/fabric/fabric-screen minfrin$ maven clean ejb:install __ __ | \/ |__ _Apache__ ___ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\__,_|\_/\___|_||_| v. 1.0.2 build:start: clean:clean: [delete] Deleting directory /Users/minfrin/src/standard/fabric/fabric-screen/target clean: ejb:init: java:prepare-filesystem: [mkdir] Created dir: /Users/minfrin/src/standard/fabric/fabric-screen/target/classes Generating EJB deployment descriptor (ejb-jar.xml). Generating Home interface for 'za.co.standardbank.fabric.facade.ScreenProviderBean'. Generating Local Home interface for 'za.co.standardbank.fabric.facade.ScreenProviderBean'. Generating Local interface for 'za.co.standardbank.fabric.facade.ScreenProviderBean'. Generating Remote interface for 'za.co.standardbank.fabric.facade.ScreenProviderBean'. Generating Session class for 'za.co.standardbank.fabric.facade.ScreenProviderBean'. Generating Util class for 'za.co.standardbank.fabric.facade.ScreenProviderBean'. java:compile: xdoclet:ejbdoclet: [echo] Compiling to /Users/minfrin/src/standard/fabric/fabric-screen/target/classes [echo] == NOTE: Targetting JVM 1.5, classes will not run on earlier JVMs == [javac] Compiling 10 source files to /Users/minfrin/src/standard/fabric/fabric-screen/target/classes Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. java:jar-resources: test:prepare-filesystem: [mkdir] Created dir: /Users/minfrin/src/standard/fabric/fabric-screen/target/test-classes [mkdir] Created dir: /Users/minfrin/src/standard/fabric/fabric-screen/target/test-reports test:test-resources: test:compile: [echo] No test source files to compile. test:test: [echo] No tests to run. ejb:ejb: [echo] Building ejb fabric-screen-1.0.0 [jar] Building jar: /Users/minfrin/src/standard/fabric/fabric-screen/target/fabric-screen-1.0.0.jar Copying: from '/Users/minfrin/src/standard/fabric/fabric-screen/target/fabric-screen-1.0.0.jar' to: '/Users/minfrin/.maven/repository/fabric/ejbs/fabric-screen-1.0.0.jar' Copying: from '/Users/minfrin/src/standard/fabric/fabric-screen/project.xml' to: '/Users/minfrin/.maven/repository/fabric/poms/fabric-screen-1.0.0.pom' BUILD SUCCESSFUL Total time: 16 seconds Finished at: Fri Dec 23 13:29:10 SAST 2005 Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
RE: multi module issues
Hi Kevin, -Original Message- From: Kevin Galligan [mailto:[EMAIL PROTECTED] Sent: jeudi 22 décembre 2005 20:19 To: users@maven.apache.org Subject: multi module issues Just wanted to comment quick on the message from Vincent (I just saw this message for the first time...). I abandoned the xml merging for right now. I was having trouble with the cargo xml merging code. I added some stuff myself, but after the war plugin added the war file composition, I just figured for now we would replicate the web.xml data manually rather than merge them. However, I would really like to get the web.xml merging to work. Is there anybody actively working on the web xml merger? Yes, there's at least one active person on the domain of J2EE module parsing/reading/merging. You should really join the Cargo dev mailing list and ask your question/post ideas there. I'm also pretty clueless. What's cargo? See http://cargo.codehaus.org. The part that interest you for the xml merging: A Java API to parse/create J2EE Modules This is what we call the Cargo Module API (module as in J2EE module). It lives in org.codehaus.cargo.module package (in trunk/core/api/module/ directory if you check out the cargo sources). What is that code being used for currently? I'd possibly like to work on that, or get somebody in my group to work on that, but I'm not sure what the protocol is. Very cool. We have a page explaining how to contribute to the Cargo project: http://cargo.codehaus.org/Contributing. To get started the best is to: - subscribe to the Cargo dev mailing (see http://archive.codehaus.org/cargo/) - read the web site to better understand what cargo is about - ask questions and suggest ideas on the cargo dev mailing list - see if there are existing open issues that you could take up. See http://tinyurl.com/9wo3p. Thanks. See you on the cargo dev list! -Vincent -Original Message- From: Richard Allen [mailto:[EMAIL PROTECTED] Sent: mercredi 30 novembre 2005 14:01 To: Maven Users List Subject: Re: Multi-module wars [snip] However, I would like to see the maven-war-plugin support the web.xml merge functionality that Kevin Galligan's hack includes. Maybe you can raise this as a JIRA issue Kevin? Just a note here for anyone interested in implementing this: there's code in Cargo to merge web.xml files and this library is being improved with support for also merging container-specific deployment descriptors. There are also generic classes for merging any xml files. It's in there: http://tinyurl.com/dtwet Check the org.codehaus.cargo.module.webapp.WebXmlMerger class along with the files in org.codehaus.cargo.module.merge. Hope it helps, -Vincent - 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: multi module issues
I'm actively working on improving merging support in cargo for web.xml and the container specific .xml files; also to support plugging in strategies for merging other files that may be in your WARs (e.g. struts-config.xml and other application specific items). Some of it is committed to cargo, some is waiting patches, some I have yet to submit - manly because cargo is getting ready for a 0.7 release and it is probably worthwhile to let that stabilise before adding a lot more new functionality. I've also adapted its maven2 plugin to configure the merging to happen as an 'uberwar' task. cargo-dev is the place to be as vincent says if you're interested in these things in cargo.. On 22/12/05, Kevin Galligan [EMAIL PROTECTED] wrote: Just wanted to comment quick on the message from Vincent (I just saw this message for the first time...). I abandoned the xml merging for right now. I was having trouble with the cargo xml merging code. I added some stuff myself, but after the war plugin added the war file composition, I just figured for now we would replicate the web.xml data manually rather than merge them. However, I would really like to get the web.xml merging to work. Is there anybody actively working on the web xml merger? I'm also pretty clueless. What's cargo? What is that code being used for currently? I'd possibly like to work on that, or get somebody in my group to work on that, but I'm not sure what the protocol is. Thanks, -Kevin -Original Message- From: Richard Allen [mailto:[EMAIL PROTECTED] Sent: mercredi 30 novembre 2005 14:01 To: Maven Users List Subject: Re: Multi-module wars [snip] However, I would like to see the maven-war-plugin support the web.xml merge functionality that Kevin Galligan's hack includes. Maybe you can raise this as a JIRA issue Kevin? Just a note here for anyone interested in implementing this: there's code in Cargo to merge web.xml files and this library is being improved with support for also merging container-specific deployment descriptors. There are also generic classes for merging any xml files. It's in there: http://tinyurl.com/dtwet Check the org.codehaus.cargo.module.webapp.WebXmlMerger class along with the files in org.codehaus.cargo.module.merge. Hope it helps, -Vincent - 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] Antrun / Javac
Here is an example of doing wath you want, I think. plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-test-sources/phase configuration tasks ant antfile=src/test/ant/build.xml inheritRefs=true/ /tasks testSourceRoottarget/generated-sources/nextmock/testSourceRoot /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdsun.jdk/groupId artifactIdtools/artifactId version1.5/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency /dependencies /plugin -Original Message- From: Giles, Nick [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 11:51 To: users@maven.apache.org Subject: [m2] Antrun / Javac I'm having distinct problems with the Antrun plugin for Maven2, specifically with the inheritance of properties and environment variables. With a simple test where the pom.xml calls a build.xml, which then uses javac, Ant complains about not being able to find com.sun.tools.javac.Main on the classpath. This isn't the usual Ant problem that gives that message, because Ant will run fine from the command line, it's an inheritance from Maven problem. With the files described below, I get a negligible classpath in the Maven part of the operation, and a null classpath in the Ant part. If I run the buildfile from the commandline, I get a full and proper classpath, and execution works. Does anyone have any idea how I can get this to work, and why it does work in one of my projects, but I'm scared to change it to try and find out why, because I'll never get it back to working again... Cheers, Nick Pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdworkbench/groupId artifactIdworkbench/artifactId packagingjar/packaging version1.0-SNAPSHOT/version build sourceDirectory./sourceDirectory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase configuration tasks echo message=Classpath in Antrun task = ${java.class.path}/ ant antfile=build.xml dir=. inheritAll=true /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project == Build.xml: project name=Workbench default=run basedir=. target name=run depends=clean,compile java classname=Workbench / /target target name=compile echo message=Classpath in Ant: ${java.class.path} / javac srcdir=. / /target target name=clean delete fileset dir=. include name=*.class / /fileset /delete /target /project = Workbench.java: public class Workbench { public static void main(String[] args) { System.out.println(Hello); } } This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - 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]
reverse dependency management
We have many interdependent projects here. When someone releases a project upon which many other projects depend we need some way of knowing automatically which projects will also need to be retested. is there a m2 plugin that manages reverse dependency lookups? For simplicity I am really mostly concerned with changes to our internal projects here. Kind regards, Dave Sag
RE: [m2] Antrun / Javac
Thanks, the system dependency worked a treat. I'm surprised that the plugin needs it though... Cheers, Nick -Original Message- From: Scokart Gilles [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 12:24 To: Maven Users List Subject: RE: [m2] Antrun / Javac Here is an example of doing wath you want, I think. plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-test-sources/phase configuration tasks ant antfile=src/test/ant/build.xml inheritRefs=true/ /tasks testSourceRoottarget/generated-sources/nextmock/testSourceRoot /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdsun.jdk/groupId artifactIdtools/artifactId version1.5/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency /dependencies /plugin -Original Message- From: Giles, Nick [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 11:51 To: users@maven.apache.org Subject: [m2] Antrun / Javac I'm having distinct problems with the Antrun plugin for Maven2, specifically with the inheritance of properties and environment variables. With a simple test where the pom.xml calls a build.xml, which then uses javac, Ant complains about not being able to find com.sun.tools.javac.Main on the classpath. This isn't the usual Ant problem that gives that message, because Ant will run fine from the command line, it's an inheritance from Maven problem. With the files described below, I get a negligible classpath in the Maven part of the operation, and a null classpath in the Ant part. If I run the buildfile from the commandline, I get a full and proper classpath, and execution works. Does anyone have any idea how I can get this to work, and why it does work in one of my projects, but I'm scared to change it to try and find out why, because I'll never get it back to working again... Cheers, Nick Pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdworkbench/groupId artifactIdworkbench/artifactId packagingjar/packaging version1.0-SNAPSHOT/version build sourceDirectory./sourceDirectory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase configuration tasks echo message=Classpath in Antrun task = ${java.class.path}/ ant antfile=build.xml dir=. inheritAll=true /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project == Build.xml: project name=Workbench default=run basedir=. target name=run depends=clean,compile java classname=Workbench / /target target name=compile echo message=Classpath in Ant: ${java.class.path} / javac srcdir=. / /target target name=clean delete fileset dir=. include name=*.class / /fileset /delete /target /project = Workbench.java: public class Workbench { public static void main(String[] args) { System.out.println(Hello); } } This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you. - 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] This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail
[m2] NPE in mvn site using maven from SVN
Hi, I've received the following exception while running mvn site on a multi-module project (using maven from SVN): java.lang.NullPointerException at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.getParentPrefix(DefaultDecorationModelInheritanceAssembler.java:255) at org.apache.maven.doxia.site.decoration.inheritance.DefaultDecorationModelInheritanceAssembler.assembleModelInheritance(DefaultDecorationModelInheritanceAssembler.java:46) at org.apache.maven.plugins.site.SiteMojo.getDecorationModel(SiteMojo.java:557) at org.apache.maven.plugins.site.SiteMojo.getDecorationModel(SiteMojo.java:472) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:348) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:414) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) 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:249) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) I know you guys don't like us commoners using maven from SVN (wink) but I couldn't wait, seeing the JIRAs about making the site plugin reactor-aware closed... ;-) Regards, _ Arik Kfir[EMAIL PROTECTED]
Re: [m2] Antrun / Javac
Actually, I think this is a bug in the antrun Plugin. Ant, by definition, should have system properties available to it -- such as the ${ java.class.path} property you require or ${user.home} or whatever. In my local version of antrun I had to do the following fix in org.apache.maven.plugin.antrun.components.AntTargetConverter // //initDefinitions( project, target ); project.init(); // so that it properly initializes the Ant project. Cheers, -- Chris On 12/23/05, Giles, Nick [EMAIL PROTECTED] wrote: Thanks, the system dependency worked a treat. I'm surprised that the plugin needs it though... Cheers, Nick -Original Message- From: Scokart Gilles [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 12:24 To: Maven Users List Subject: RE: [m2] Antrun / Javac Here is an example of doing wath you want, I think. plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-test-sources/phase configuration tasks ant antfile=src/test/ant/build.xml inheritRefs=true/ /tasks testSourceRoottarget/generated-sources/nextmock/testSourceRoot /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdsun.jdk/groupId artifactIdtools/artifactId version1.5/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency /dependencies /plugin -Original Message- From: Giles, Nick [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 11:51 To: users@maven.apache.org Subject: [m2] Antrun / Javac I'm having distinct problems with the Antrun plugin for Maven2, specifically with the inheritance of properties and environment variables. With a simple test where the pom.xml calls a build.xml, which then uses javac, Ant complains about not being able to find com.sun.tools.javac.Main on the classpath. This isn't the usual Ant problem that gives that message, because Ant will run fine from the command line, it's an inheritance from Maven problem. With the files described below, I get a negligible classpath in the Maven part of the operation, and a null classpath in the Ant part. If I run the buildfile from the commandline, I get a full and proper classpath, and execution works. Does anyone have any idea how I can get this to work, and why it does work in one of my projects, but I'm scared to change it to try and find out why, because I'll never get it back to working again... Cheers, Nick Pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdworkbench/groupId artifactIdworkbench/artifactId packagingjar/packaging version1.0-SNAPSHOT/version build sourceDirectory./sourceDirectory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase configuration tasks echo message=Classpath in Antrun task = ${java.class.path}/ ant antfile=build.xml dir=. inheritAll=true /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project == Build.xml: project name=Workbench default=run basedir=. target name=run depends=clean,compile java classname=Workbench / /target target name=compile echo message=Classpath in Ant: ${java.class.path} / javac srcdir=. / /target target name=clean delete fileset dir=. include name=*.class / /fileset /delete /target /project = Workbench.java: public class Workbench { public static void main(String[] args) { System.out.println(Hello); } } This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.
Re: JDK path
Eugene Kirin wrote: Hello to all! On my PC installed 2 JDK, 1.4.2 and 5.0. How should I point a path for maven 2 to use 5.0 JDK? Thanks for your responses! Do you mean running M2 with JDK 5 or just compiling with JDK 5? All answers so far addressed the first question. - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Support for mojos written in Ant
What exactly do you mean written in Ant?? Do you mean using Ant's Java Tasks directly from the Mojo Java?? That is pretty easily done. There is info on using Ant from Java here http://www-128.ibm.com/developerworks/websphere/library/techarticles/0502_gawor/0502_gawor.html FWIW, what I've done is create a specialized Mojo that allows you to create an Ant build.xml and then build a reusable Mojo that use it. I submitted this into JIRA, but don't know if its been integrated yet. You can get the code here (its attached to the Issue)... http://jira.codehaus.org/browse/MNG-897 BTW: this code illustrates using Ant form Java... Cheers, -- Chris On 12/23/05, Nitko2 [EMAIL PROTECTED] wrote: Chris, thank you for your answer. I know about antrun, and I've been using it. But it isn't what I need. I would like to write plugins using ant(mojos written in Ant), not execute ant build files. I can't find anything about that here http://maven.apache.org/guides/mini/guide-using-ant.html Filip Chris Berry wrote: Hi Filip, I think your best bet might be to checkout the Plugin from SVN. IMHO, this is the best way to get the full picture as things are still in flux -- and the docs will likely not have caught up with the code. Of course, you'll need a Subversion Client (I use TortoiseSVN) AFAIK, this should work:: svn co https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun-plugin Some info here:: http://maven.apache.org/guides/mini/guide-using-ant.html And several posts on this list Cheers, -- Chris On 12/22/05, Nitko2 [EMAIL PROTECTED] wrote: Hi, John Casey in 2.0.1 announcement mail said that 2.0.1 includes support for mojos written in Ant. Can someone point me to some documentation or JIRA issue or anything that would be useful info about this. Thanks, Filip - 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: Support for mojos written in Ant
I guess the questions was related to the announcement of the 2.0.1 release (http://www.nabble.com/forum/ViewPost.jtp?post=1942776framed=y) That says : Also, some highlights associated with this release are: * Site documentation improvements * Support for mojos written in Ant -Original Message- From: Chris Berry [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 15:27 To: Maven Users List Subject: Re: Support for mojos written in Ant What exactly do you mean written in Ant?? Do you mean using Ant's Java Tasks directly from the Mojo Java?? That is pretty easily done. There is info on using Ant from Java here http://www- 128.ibm.com/developerworks/websphere/library/techarticles/0502_gawor/0502_ gawor.html FWIW, what I've done is create a specialized Mojo that allows you to create an Ant build.xml and then build a reusable Mojo that use it. I submitted this into JIRA, but don't know if its been integrated yet. You can get the code here (its attached to the Issue)... http://jira.codehaus.org/browse/MNG-897 BTW: this code illustrates using Ant form Java... Cheers, -- Chris On 12/23/05, Nitko2 [EMAIL PROTECTED] wrote: Chris, thank you for your answer. I know about antrun, and I've been using it. But it isn't what I need. I would like to write plugins using ant(mojos written in Ant), not execute ant build files. I can't find anything about that here http://maven.apache.org/guides/mini/guide-using-ant.html Filip Chris Berry wrote: Hi Filip, I think your best bet might be to checkout the Plugin from SVN. IMHO, this is the best way to get the full picture as things are still in flux -- and the docs will likely not have caught up with the code. Of course, you'll need a Subversion Client (I use TortoiseSVN) AFAIK, this should work:: svn co https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-antrun- plugin Some info here:: http://maven.apache.org/guides/mini/guide-using-ant.html And several posts on this list Cheers, -- Chris On 12/22/05, Nitko2 [EMAIL PROTECTED] wrote: Hi, John Casey in 2.0.1 announcement mail said that 2.0.1 includes support for mojos written in Ant. Can someone point me to some documentation or JIRA issue or anything that would be useful info about this. Thanks, Filip - 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: Presentation on Maven 2
Nice presentation, Thank you -Original Message- From: Franck de Bruijn [mailto:[EMAIL PROTECTED] Sent: Thursday, December 22, 2005 5:10 PM To: 'Maven Users List' Subject: Presentation on Maven 2 Hi, I gave a presentation on Maven 2 for the yearly Java conference held within our company. The slides are available at: http://www.bloggingaboutjava.org/cms/wordpress/?action=downloadfile_id= 7 The first part tries to give an introduction to Maven, when to use it and by whom. In the second part it details the main Maven 2 concepts a little bit more. Feel free to have a look. Cheers, Franck - 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] m1 - m2 surefire problem
Chris Berry wrote: Greetings, I am converting an m1 project to m2. Unfortunately I am getting different behavior in the test phase of the build. In m1, of course, it all runs fine. But under m2 (i.e. surefire) when my test accesses the Internet, it is has Proxy issues and fails, and when I work around that; it has Redirection issues. What is troublesome is that this same code runs without issue under m1. I have gone to great lengths to insure that I am using the exact same set of dependencies in both m1 m2 (CLasspath is the same, etc.) I'm pretty convinced that this is a surefire problem. I've tried setting forkMode to true, but that doesn't help. Does anyone have any idea why surefire would be giving me different results?? Surefire, is an JUnit runner with some special Classloader handling to deal with some of the problems with the Ant JUnit runner and was based on SuiteRunner (http://www.artima.com/suiterunner/) which makes it easier to write tests in different forms like text files or scripts. I've fixed a lot of things to try and make the behaviour of Surefires JUnit mode (as that's only one of them) work the same as ant/m1, but things pop up everyone once in a while. So I can look at your stuff and track it down, as I am doing that now with Hiram on AMQ4. Thanks, -- Chris -- jvz. Jason van Zyl jason at maven.org http://maven.apache.org A man enjoys his work when he understands the whole and when he is responsible for the quality of the whole -- Christopher Alexander - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clarification on issues in JIRA
Hi All, Can somebody please provide me the resolution/status of the following issues? Issue 1) http://jira.codehaus.org/browse/MPIR-3?rc=1 Issue 2) http://jira.codehaus.org/browse/MCLOVER-5?rc=1 Thanks, Miral - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Clarification on issues in JIRA
Hi Miral, -Original Message- From: Shah, Miral [mailto:[EMAIL PROTECTED] Sent: vendredi 23 décembre 2005 16:45 To: Maven Users List Subject: Clarification on issues in JIRA Hi All, Can somebody please provide me the resolution/status of the following issues? Issue 1) http://jira.codehaus.org/browse/MPIR-3?rc=1 Issue 2) http://jira.codehaus.org/browse/MCLOVER-5?rc=1 I'm working the clover issue and I think I have it fixed here locally. I'm writing tests to ensure it fully works though. Thanks -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2]release:prepare requires snapshots ?
On 12/23/05, Patrick O'shea [EMAIL PROTECTED] wrote: Hi, Should i be able to do a release:prepare from a parent project ? Yes, parent and sub projects must be in snapshot state. If the parent project does not have a snapshot version number, then it will fail. But if the parent has a snapshot number then it will fail when it runs the release:prepare at the child project because it can't release due to a non released parent. When performing release:prepare in a sub project, the parent cannot be in snapshot state. The key here is that we want to be able to reproduce the build with a label. Any snapshot state from parent or dependencies will prevent that from happening. thanks patrick *dan tran [EMAIL PROTECTED]* 12/22/2005 08:52 PM Please respond to Maven Users List users@maven.apache.org To Maven Users List users@maven.apache.org cc Subject Re: [m2]release:prepare requires snapshots ? It follows maven development process where - during development, every one works on snapshots - at release time, the snapshost got changed to release version, check back into SCM, label, and build. This is where customer can use, including qa, stake holder, etc - then the version is increamented with snapshot and check into SCM again. -Dan On 12/22/05, Patrick O'shea [EMAIL PROTECTED] wrote: Hi, I'm am trying to use the release:prepare goal. I can see from the source code that it is supposed to throw an exception if the project being release is not a snapshot. Why is this ? Kind regards, Patrick O'Shea
Re: [m2] Antrun / Javac
Chris, can you file a JIRA and send the patch in? ;-) On 12/23/05, Chris Berry [EMAIL PROTECTED] wrote: Actually, I think this is a bug in the antrun Plugin. Ant, by definition, should have system properties available to it -- such as the ${ java.class.path} property you require or ${user.home} or whatever. In my local version of antrun I had to do the following fix in org.apache.maven.plugin.antrun.components.AntTargetConverter // //initDefinitions( project, target ); project.init(); // so that it properly initializes the Ant project. Cheers, -- Chris On 12/23/05, Giles, Nick [EMAIL PROTECTED] wrote: Thanks, the system dependency worked a treat. I'm surprised that the plugin needs it though... Cheers, Nick -Original Message- From: Scokart Gilles [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 12:24 To: Maven Users List Subject: RE: [m2] Antrun / Javac Here is an example of doing wath you want, I think. plugin artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-test-sources/phase configuration tasks ant antfile=src/test/ant/build.xml inheritRefs=true/ /tasks testSourceRoottarget/generated-sources/nextmock/testSourceRoot /configuration goals goalrun/goal /goals /execution /executions dependencies dependency groupIdsun.jdk/groupId artifactIdtools/artifactId version1.5/version scopesystem/scope systemPath${java.home}/../lib/tools.jar/systemPath /dependency /dependencies /plugin -Original Message- From: Giles, Nick [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 11:51 To: users@maven.apache.org Subject: [m2] Antrun / Javac I'm having distinct problems with the Antrun plugin for Maven2, specifically with the inheritance of properties and environment variables. With a simple test where the pom.xml calls a build.xml, which then uses javac, Ant complains about not being able to find com.sun.tools.javac.Main on the classpath. This isn't the usual Ant problem that gives that message, because Ant will run fine from the command line, it's an inheritance from Maven problem. With the files described below, I get a negligible classpath in the Maven part of the operation, and a null classpath in the Ant part. If I run the buildfile from the commandline, I get a full and proper classpath, and execution works. Does anyone have any idea how I can get this to work, and why it does work in one of my projects, but I'm scared to change it to try and find out why, because I'll never get it back to working again... Cheers, Nick Pom.xml: project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; modelVersion4.0.0/modelVersion groupIdworkbench/groupId artifactIdworkbench/artifactId packagingjar/packaging version1.0-SNAPSHOT/version build sourceDirectory./sourceDirectory plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution phasegenerate-sources/phase configuration tasks echo message=Classpath in Antrun task = ${java.class.path}/ ant antfile=build.xml dir=. inheritAll=true /ant /tasks /configuration goals goalrun/goal /goals /execution /executions /plugin /plugins /build /project == Build.xml: project name=Workbench default=run basedir=. target name=run depends=clean,compile java classname=Workbench / /target target name=compile echo message=Classpath in Ant: ${java.class.path} / javac srcdir=. / /target target name=clean delete fileset dir=. include name=*.class / /fileset /delete /target /project = Workbench.java: public class Workbench { public static void main(String[] args) { System.out.println(Hello); } } This message may contain privileged and/or confidential information. If you have
Running a single test?
Is there a way to run a single junit test case in maven 2? Raymond Ritz
Re: Running a single test?
if there isn't I will have to write it I guess, I want to reuse it for Netbeans IDE M2 integration.. Milos On 12/23/05, Raymond N. Ritz [EMAIL PROTECTED] wrote: Is there a way to run a single junit test case in maven 2? Raymond Ritz
Re: Running a single test?
mvn -Dtest=MyTest test Note: MyTest is your java test class. Note: Use it unqualified -- without its package name (e.g. without com.myco.) otherwise, this confuses m2 On 12/23/05, Raymond N. Ritz [EMAIL PROTECTED] wrote: Is there a way to run a single junit test case in maven 2? Raymond Ritz
RE: Re: Running a single test?
Thanks Chris. This works. I have previously tried the mvn test -dtest=xxx.yyy.classname . do you know why this approach was chosen? This seems strange to me, but I may not know why this was done. Thanks Ray -Original Message- From: Chris Berry [mailto:[EMAIL PROTECTED] Sent: Friday, December 23, 2005 1:39 PM To: Maven Users List; [EMAIL PROTECTED] Subject: Re: Running a single test? mvn -Dtest=MyTest test Note: MyTest is your java test class. Note: Use it unqualified -- without its package name (e.g. without com.myco.) otherwise, this confuses m2 On 12/23/05, Raymond N. Ritz [EMAIL PROTECTED] wrote: Is there a way to run a single junit test case in maven 2? Raymond Ritz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] example of reporting / usage converted from m1?
I am migrating m1 to m2, and am trying to build the site with all the reports I have been using in m1 and the build is complaining that I use reporting / instead of reports / Thanks Mick Knutson http://www.BASELogic.com http://www.MickKnutson.com MSN Messenger: [EMAIL PROTECTED]
M2 - How do I use a non standard directory structure for a web application
Trying to build a WAR file from a non-standard directory structure. projectA - src - Web Content - images - javascript - theme - WEB-INF - lib - web.xml Here is the relevent portion of my pom.xml file build sourceDirectorysrc/sourceDirectory outputDirectoryWeb Content/WEB-INF/classes/outputDirectory finalNameic-signon/finalName /build When I run mvn package I get this error: Embedded error: Deployment descriptor: C:\myWorkspace\projectA\target\projectA\WEB-INF\web.xml does not exist. and the directory structure that is built looks like this: - target (at the same level as the src directory above) - projectA - WEB-INF - classes - com - foo - bar - foo_bar.class - lib - jar1.jar - jar2.jar How do I get everything under the Web Content directory ( the javascript, theme, images and the WEB-XML directories) to be placed under the target/projectA directory?
Re: Clarification on issues in JIRA
Plugins are released separately. The reports have not been released recently. - Brett On 12/24/05, Shah, Miral [EMAIL PROTECTED] wrote: Thanks a lot, Vincent. Issue #1 is shown as fixed in JIRA but it still can reproduce the issue with Maven 2.0.1. Any ideas? Thanks, Miral 212-904-2014 (Office) 408-821-0757 (Cell) -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: Friday, December 23, 2005 10:58 AM To: 'Maven Users List' Subject: RE: Clarification on issues in JIRA Hi Miral, -Original Message- From: Shah, Miral [mailto:[EMAIL PROTECTED] Sent: vendredi 23 décembre 2005 16:45 To: Maven Users List Subject: Clarification on issues in JIRA Hi All, Can somebody please provide me the resolution/status of the following issues? Issue 1) http://jira.codehaus.org/browse/MPIR-3?rc=1 Issue 2) http://jira.codehaus.org/browse/MCLOVER-5?rc=1 I'm working the clover issue and I think I have it fixed here locally. I'm writing tests to ensure it fully works though. Thanks -Vincent - 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: Support for mojos written in Ant
On 12/24/05, Chris Berry [EMAIL PROTECTED] wrote: FWIW, what I've done is create a specialized Mojo that allows you to create an Ant build.xml and then build a reusable Mojo that use it. I submitted this into JIRA, but don't know if its been integrated yet. You can get the code here (its attached to the Issue)... http://jira.codehaus.org/browse/MNG-897 BTW: this code illustrates using Ant form Java... That's exactly what it is. Looks like the issue was not closed. - Brett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
EJB, XDoclet example
Hi, Can someone post a working ejb and hibernate xdoclet project or archetype? Thx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2 - How do I use a non standard directory structure for a web application
this is very helpful ... mvn projecthelp:effective-pom and start from this output to make your modifications. On Friday 23 December 2005 21:04, [EMAIL PROTECTED] wrote: Trying to build a WAR file from a non-standard directory structure. projectA - src - Web Content - images - javascript - theme - WEB-INF - lib - web.xml Here is the relevent portion of my pom.xml file build sourceDirectorysrc/sourceDirectory outputDirectoryWeb Content/WEB-INF/classes/outputDirectory finalNameic-signon/finalName /build When I run mvn package I get this error: Embedded error: Deployment descriptor: C:\myWorkspace\projectA\target\projectA\WEB-INF\web.xml does not exist. and the directory structure that is built looks like this: - target (at the same level as the src directory above) - projectA - WEB-INF - classes - com - foo - bar - foo_bar.class - lib - jar1.jar - jar2.jar How do I get everything under the Web Content directory ( the javascript, theme, images and the WEB-XML directories) to be placed under the target/projectA directory? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Running a single test?
I don't know why. It could be a bug?? Happy Holidays, -- Chris On 12/23/05, Raymond N. Ritz [EMAIL PROTECTED] wrote: Thanks Chris. This works. I have previously tried the mvn test -dtest=xxx.yyy.classname . do you know why this approach was chosen? This seems strange to me, but I may not know why this was done. Thanks Ray -Original Message- From: Chris Berry [mailto:[EMAIL PROTECTED] Sent: Friday, December 23, 2005 1:39 PM To: Maven Users List; [EMAIL PROTECTED] Subject: Re: Running a single test? mvn -Dtest=MyTest test Note: MyTest is your java test class. Note: Use it unqualified -- without its package name (e.g. without com.myco.) otherwise, this confuses m2 On 12/23/05, Raymond N. Ritz [EMAIL PROTECTED] wrote: Is there a way to run a single junit test case in maven 2? Raymond Ritz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]