Re: [m2] multi-module support broken in assembly-plugin ?
hi, i just use the src\main\assembly\dep.xml to manage my assemblies[1] but i am using the assembly:directory goal to package my artifacts because i just need to put all artifacts in a certain directory. or am i not understanding your problem correctly? [1] http://maven.apache.org/maven2/guides/mini/guide-assemblies.html ciao! On 11/5/05, Christian Schulte [EMAIL PROTECTED] wrote: Hi, Could it be that the assembly plugin does not support multi-module projects correctly ? I have the following project structure: Root |--Module1 |--Module2 |--Module3 So somewhere in Root's pom.xml I have modules moduleModule1/module moduleModule2/module moduleModule3/module /modules I now want the assembly plugin to build a jar file of all three ModuleX jar files and it does not work. When I do mvn assembly:assembly it does not use the three modules. If I put dependencies dependency groupIdgroupId/groupId artifactIdModule1/artifactId /dependcy dependency groupIdgroupId/groupId artifactIdModule2/artifactId /dependcy dependency groupIdgroupId/groupId artifactIdModule3/artifactId /dependcy /dependencies into Root's pom.xml Maven complains about cyclic dependencies. So if the modules.../modules section already defines the modules as dependencies why does the assembly plugin not see them ? If this section would not introduce a dependency to the modules why should maven complain about the cyclic dependencies ? What is the correct way to use the assembly plugin then ? I looked at the source to see how things are intended to work. If I make the following change: [EMAIL PROTECTED]:~/maven2-cvs/maven-site/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly$ svn diff Index: AbstractUnpackingMojo.java === --- AbstractUnpackingMojo.java (Revision 330942) +++ AbstractUnpackingMojo.java (Arbeitskopie) @@ -130,7 +130,7 @@ String key = artifact.getGroupId() + : + artifact.getArtifactId() + : + artifact.getVersion(); -if ( !reactorArtifacts.containsKey( key ) !dependencies.containsKey( key ) ) +if ( !dependencies.containsKey( key ) ) { dependencies.put( key, artifact ); } mvn assembly:assembly starts aggregating the contents of the jar files of the modules. There is just one thing which then still does not work and that are the different manifest files are lost and I get a default manifest in the assembled jar file. I definetly need help with this. -- Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Programming, an artform that fights back Anuerin G. Diaz Registered Linux User #246176 Friendly Linux Board @ http://mandrivausers.org/index.php http://capsule.ramfree17.org , when you absolutely have nothing else better to do - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [m-1.1b2] cruisecontrol plugin exception
I didn't used it with CC 2.3.1. Can you open an issue please ... http://jira.codehaus.org/browse/MPCRUISECONTROL Arnaud -Message d'origine- De : Antonyan, Tigran(GE Infrastructure) [mailto:[EMAIL PROTECTED] Envoyé : vendredi 4 novembre 2005 21:19 À : Maven Users List Objet : [m-1.1b2] cruisecontrol plugin exception Hi all, I've install cruisecontrol 2.3.1 and maven-cruisecontrol-plugin 1.7, Now, when I try to run maven cruisecontrol:run from command line, I get an exception, also I get the same exception if I just run java -jar cruisecontrol.jar from D:/Program Files/cruisecontrol-2.3.1/main/dist here is the output: cruisecontrol:run: [java] [cc]Nov-04 15:01:50 Main - CruiseControl Version 2.3.1 Compiled on October 10 2005 0917 [java] Exception in thread main java.lang.NoClassDefFoundError: com/twmacinta/util/MD5OutputStream [java] at net.sourceforge.cruisecontrol.Main.main(Main.java:76) [java] at CruiseControl.main(CruiseControl.java:57) [java] [ERROR] Java Result: 1 BUILD SUCCESSFUL Any help will be greatly appreciated ! Thank you in advance. P.S. I'm running version 1.1-beta-2 - 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: Multiproject help
Hi Hi, I'm using Maven 1.x and I'm also new at Maven... I have a simple multi-project that has 2 sub-projects: A and B, A is dependent on B. I was able to run multiproject:install on the project successfully by providing dependencies in A's project.xml. But when I ran multiproject:site the generated htmls didn't have anything on them. My questions are: 1. How do I display subproject dependecies on the Dependencies page in the multiproject? Did you cativate the multiproject report in the main project ? http://maven.apache.org/maven-1.x/reference/plugins/multiproject/reports.html 2. Also, I see in the Maven output that JavaDocs were generated for both of the subprojects but there are no links to them from the multiproject index.html. It's not implemented. Arnaud Thanks Anning - 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]
maven2 jnlp plugin
I see on the plugin matrix (http://docs.codehaus.org/display/MAVEN/Maven+Plugin+Matrix) that a jnlp plugin is available for Maven2, but where can it be found? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] multi-module support broken in assembly-plugin ?
On Sat, 5 Nov 2005, Christian Schulte wrote: Hi, Could it be that the assembly plugin does not support multi-module projects correctly ? I have the following project structure: Root |--Module1 |--Module2 |--Module3 So somewhere in Root's pom.xml I have modules moduleModule1/module moduleModule2/module moduleModule3/module /modules I now want the assembly plugin to build a jar file of all three ModuleX jar files and it does not work. When I do mvn assembly:assembly it does not use the three modules. If I put dependencies dependency groupIdgroupId/groupId artifactIdModule1/artifactId /dependcy dependency groupIdgroupId/groupId artifactIdModule2/artifactId /dependcy dependency groupIdgroupId/groupId artifactIdModule3/artifactId /dependcy /dependencies That's the fix allright. The assembly plugin just works on the current project, it does recurse but it will create an assembly for all child projects too if they have the assembly plugin configured. into Root's pom.xml Maven complains about cyclic dependencies. So if the modules.../modules section already defines the modules as No, they don't automatically define them as dependencies! You really need a dependencies section. dependencies why does the assembly plugin not see them ? If this section See above - they're not dependencies. would not introduce a dependency to the modules why should maven complain about the cyclic dependencies ? What is the correct way to use the assembly plugin then ? The cyclic dependencies are because of another reason. My guess is that you have a dependency in ModuleX on the root pom. You should remove that dependency and just use the parent tag - you'll inherit whatever is defined in the root pom. I looked at the source to see how things are intended to work. If I make the following change: [EMAIL PROTECTED]:~/maven2-cvs/maven-site/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly$ svn diff Index: AbstractUnpackingMojo.java === --- AbstractUnpackingMojo.java (Revision 330942) +++ AbstractUnpackingMojo.java (Arbeitskopie) @@ -130,7 +130,7 @@ String key = artifact.getGroupId() + : + artifact.getArtifactId() + : + artifact.getVersion(); -if ( !reactorArtifacts.containsKey( key ) !dependencies.containsKey( key ) ) +if ( !dependencies.containsKey( key ) ) { dependencies.put( key, artifact ); } That code specified that if a dependency tag in the assembly descriptor was not a reactor project ANd not a dependency, then make it a dependency. Your patch looks sane to me - something being a reactor project doesn't implicate that it's a dependency. But I would have to look at more context code to be sure why this was done this way. mvn assembly:assembly starts aggregating the contents of the jar files of the modules. There is just one thing which then still does not work and that are the different manifest files are lost and I get a default manifest in the assembled jar file. I definetly need help with this. Which manifest file should be used? You can't merge them. You'll have to specify a new manifest file for the aggregated jar to use. -- Kenney -- Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange M2 behavior
Hi, I have happily used maven 1.0 and trying to switch to M2 mainly because I want to work with modules. But I have some difficulties to understand how it is supposed to work. I have tried the following: mvn archetype:create -DgroupId=org.trial -DartifactId=test cd test mvn jar:jar and I get ... [WARNING] JAR will be empty - no content was marked for inclusion! ... and the jar effectively does not contain the class files. But if I do: mvn compiler:compile jar:jar The jar contains the expected class files. Isn't supposed the jar:jar execute the precious phases (that is compile) before making the jar? Furthermore in any case the resulting jar contains the following: META-INF/ META-INF/MANIFEST.MF ... META-INF/maven/ META-INF/maven/org.trial/ META-INF/maven/org.trial/test/ META-INF/maven/org.trial/test/pom.xml META-INF/maven/org.trial/test/pom.properties What is the purpose of these pom.xml and pom.properties in the resulting jar? They contain information about my working directory which is of no use for a released jar and I even don't see where they come from. They seem to be magically generated by maven. Another mystery: If I do mvn deploy:deploy I get: ... [ERROR] BUILD ERROR [INFO] [INFO] The packaging for this project did not assign a file to the build artifact ... but it if I do: mvn compiler:compile jar:jar deploy:deploy It works fine (excepted for the added META-INF mentioned above). Also: m2 deploy works fine too. However I get the message: THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD but if I use m2 jar:jar I get the same result than with `mvn jar:jar` (compile phase is skipped). Did I miss something? If I remember, maven 1.0 was more consistent and worked fine out of the box. Thanks. Oscar __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange M2 behavior
On Sat, 2005-11-05 at 09:07 -0800, Oscar Picasso wrote: Hi, I have happily used maven 1.0 and trying to switch to M2 mainly because I want to work with modules. But I have some difficulties to understand how it is supposed to work. I have tried the following: mvn archetype:create -DgroupId=org.trial -DartifactId=test cd test mvn jar:jar Already here at this point I can see you haven't read any of the m2 documentation. Please start with the getting starting guide and you will have better luck: http://maven.apache.org/guides/getting-started/index.html -- jvz. Jason van Zyl jason at maven.org http://maven.apache.org Three people can keep a secret provided two of them are dead. -- Unknown - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange M2 behavior
On Sat, 5 Nov 2005, Oscar Picasso wrote: Hi, I have happily used maven 1.0 and trying to switch to M2 mainly because I want to work with modules. But I have some difficulties to understand how it is supposed to work. I have tried the following: mvn archetype:create -DgroupId=org.trial -DartifactId=test cd test mvn jar:jar and I get ... [WARNING] JAR will be empty - no content was marked for inclusion! ... and the jar effectively does not contain the class files. But if I do: mvn compiler:compile jar:jar The jar contains the expected class files. Isn't supposed the jar:jar execute the precious phases (that is compile) before making the jar? No - goals like X:Y are just single plugin goals. maven2 has the notion of a 'lifecyle'. You want to call 'mvn install', which will call ALL plugin goals to compile, test and package that project. Furthermore in any case the resulting jar contains the following: META-INF/ META-INF/MANIFEST.MF ... META-INF/maven/ META-INF/maven/org.trial/ META-INF/maven/org.trial/test/ META-INF/maven/org.trial/test/pom.xml META-INF/maven/org.trial/test/pom.properties What is the purpose of these pom.xml and pom.properties in the resulting jar? They contain information about my working directory which is of no use for a released jar and I even don't see where they come from. They seem to be magically generated by maven. Correct. They are used to track where a pom came from. The pom.xml is the original pom, so you could extract it if you just found a single jar somewhere, and see what it is. The pom.properties contains information like the time the project was built. Another mystery: If I do mvn deploy:deploy I get: ... [ERROR] BUILD ERROR [INFO] [INFO] The packaging for this project did not assign a file to the build artifact ... but it if I do: mvn compiler:compile jar:jar deploy:deploy It works fine (excepted for the added META-INF mentioned above). Deploy:deploy should be called from within a lifecycle, like you do below: Also: m2 deploy works fine too. However I get the message: THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD Yup. but if I use m2 jar:jar I get the same result than with `mvn jar:jar` (compile phase is skipped). m2 is an old shell script/batchfile that calls mvn underwater. Did I miss something? Yes, you missed reading http://maven.apache.org/maven2/ ;) Maven2 is totally different from maven1. I suggest you read up on the new stuff there. If I remember, maven 1.0 was more consistent and worked fine out of the box. Maven2 is more consistent than maven1, but you're applying maven1 practises (jar:jar etc) to maven2, which doesn't work as you expect it to work - because maven2 is not maven1! :) Anyway, thanks for making the switch. Once you're a bit more familiar with how to work with maven2, I'm sure you'll see it's easier to use than maven1! -- Kenney Thanks. Oscar __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange M2 behavior
Hi, Thanks for your input. It helped a lot. I overlooked the Getting started guide... maybe after reading This guide is intended as a reference for those working with Maven for the first time... I jumped directly to the Documentation section. Too many docs to read these days, and not enough hours in a day. So I missed the obvious. Oscar --- Kenney Westerhof [EMAIL PROTECTED] wrote: On Sat, 5 Nov 2005, Oscar Picasso wrote: Hi, I have happily used maven 1.0 and trying to switch to M2 mainly because I want to work with modules. But I have some difficulties to understand how it is supposed to work. I have tried the following: mvn archetype:create -DgroupId=org.trial -DartifactId=test cd test mvn jar:jar and I get ... [WARNING] JAR will be empty - no content was marked for inclusion! ... and the jar effectively does not contain the class files. But if I do: mvn compiler:compile jar:jar The jar contains the expected class files. Isn't supposed the jar:jar execute the precious phases (that is compile) before making the jar? No - goals like X:Y are just single plugin goals. maven2 has the notion of a 'lifecyle'. You want to call 'mvn install', which will call ALL plugin goals to compile, test and package that project. Furthermore in any case the resulting jar contains the following: META-INF/ META-INF/MANIFEST.MF ... META-INF/maven/ META-INF/maven/org.trial/ META-INF/maven/org.trial/test/ META-INF/maven/org.trial/test/pom.xml META-INF/maven/org.trial/test/pom.properties What is the purpose of these pom.xml and pom.properties in the resulting jar? They contain information about my working directory which is of no use for a released jar and I even don't see where they come from. They seem to be magically generated by maven. Correct. They are used to track where a pom came from. The pom.xml is the original pom, so you could extract it if you just found a single jar somewhere, and see what it is. The pom.properties contains information like the time the project was built. Another mystery: If I do mvn deploy:deploy I get: ... [ERROR] BUILD ERROR [INFO] [INFO] The packaging for this project did not assign a file to the build artifact ... but it if I do: mvn compiler:compile jar:jar deploy:deploy It works fine (excepted for the added META-INF mentioned above). Deploy:deploy should be called from within a lifecycle, like you do below: Also: m2 deploy works fine too. However I get the message: THE m2 COMMMAND IS DEPRECATED - PLEASE RUN mvn INSTEAD Yup. but if I use m2 jar:jar I get the same result than with `mvn jar:jar` (compile phase is skipped). m2 is an old shell script/batchfile that calls mvn underwater. Did I miss something? Yes, you missed reading http://maven.apache.org/maven2/ ;) Maven2 is totally different from maven1. I suggest you read up on the new stuff there. If I remember, maven 1.0 was more consistent and worked fine out of the box. Maven2 is more consistent than maven1, but you're applying maven1 practises (jar:jar etc) to maven2, which doesn't work as you expect it to work - because maven2 is not maven1! :) Anyway, thanks for making the switch. Once you're a bit more familiar with how to work with maven2, I'm sure you'll see it's easier to use than maven1! -- Kenney Thanks. Oscar __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange M2 behavior
-- Kenney Westerhof [EMAIL PROTECTED] wrote: On Sat, 5 Nov 2005, Oscar Picasso wrote: ... Furthermore in any case the resulting jar contains the following: META-INF/ META-INF/MANIFEST.MF ... META-INF/maven/ META-INF/maven/org.trial/ META-INF/maven/org.trial/test/ META-INF/maven/org.trial/test/pom.xml META-INF/maven/org.trial/test/pom.properties What is the purpose of these pom.xml and pom.properties in the resulting jar? They contain information about my working directory which is of no use for a released jar and I even don't see where they come from. They seem to be magically generated by maven. Correct. They are used to track where a pom came from. The pom.xml is the original pom, so you could extract it if you just found a single jar somewhere, and see what it is. The pom.properties contains information like the time the project was built. Just curious. I have looked at some jar in the maven2 ibiblio repository and did n't find these pom.xml and pom.properties. Does it mean that the jars where filtered or that the jars where generated with maven2 ? __ 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]
[m2] work in progress location for any docs?
The docs page http://maven.apache.org/guides/index.html has some nice ones. Is there a work-in-progress version I can read on this one: Guide to creating a multi-module build http://maven.apache.org/guides/mini/guide-multi-module.html ? I am ramping up on m2, have a successful install of the first core component, and now need to finish the rest of the components. Some of the POM ref descriptions/notes are a bit vague for me still (and some of the guides, like dependency and parent links are almost there; with more m2 experience I will understand them easier/better, but even with m1 expertise, some things just aren't obvious yet!). A few of the guides like the one above I could really use...so even if it is really rough, I'd still like to read it/them if they are available in some manner. TIA! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JarJar missing...
Hello, The Groovy project uses jarjar in its M1 build, and we recently noticed that jarjar-0.5.jar is missing from the ibiblio repository. There used to be a tonic folder containing the version 0.5. And now, there's only a jarjar folder containing and old 0.2 version. Could jarjar-0.5.jar be back in the M1 repository please? Thanks in advance, -- Guillaume Laforge Groovy Project Manager http://glaforge.free.fr/blog/groovy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Missing SAX parser with Java 5?
Hi, I am trying to convert a first program (Apache XML-RPC) from Maven 1 to Maven 2. After doing eclipse:eclipse, my unit tests run fine within Eclipse. However, mvn test fails with the following exception: javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.SAXParserFactory cannot be found at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) Being a Java 5 user with the builtin com.sun.org.apache.xerces parser, I have no explanation, what might be wrong. Any ideas? I'll attach the test report with the system properties, in case that might answer any questions. In case you'd like to reproduce the problem: Checkout the b20050512_streaming branch from http://svn.apache.org/repos/asf/webservices/xmlrpc/ Regards, Jochen ?xml version=1.0 encoding=UTF-8 ? testsuite errors=22 tests=22 time=0,198 failures=0 name=org.apache.xmlrpc.test.BaseTest properties property value=Java(TM) 2 Runtime Environment, Standard Edition name=java.runtime.name/ property value=/usr/java/jdk1.5.0_05/jre/lib/i386 name=sun.boot.library.path/ property value=1.5.0_05-b05 name=java.vm.version/ property value=Sun Microsystems Inc. name=java.vm.vendor/ property value=http://java.sun.com/; name=java.vendor.url/ property value=: name=path.separator/ property value=Java HotSpot(TM) Client VM name=java.vm.name/ property value=sun.io name=file.encoding.pkg/ property value=DE name=user.country/ property value=unknown name=sun.os.patch.level/ property value=Java Virtual Machine Specification name=java.vm.specification.name/ property value=/home/jwi/workspace/ws-xmlrpc-3 name=user.dir/ property value=1.5.0_05-b05 name=java.runtime.version/ property value=sun.awt.X11GraphicsEnvironment name=java.awt.graphicsenv/ property value=/home/jwi/workspace/ws-xmlrpc-3 name=basedir/ property value=/usr/java/jdk1.5.0_05/jre/lib/endorsed name=java.endorsed.dirs/ property value=i386 name=os.arch/ property value=/tmp name=java.io.tmpdir/ property value= name=line.separator/ property value=Sun Microsystems Inc. name=java.vm.specification.vendor/ property value=Linux name=os.name/ property value=/usr/local/maven-2.0/bin/m2.conf name=classworlds.conf/ property value=ISO-8859-1 name=sun.jnu.encoding/ property value=/usr/java/jdk1.5.0_05/jre/lib/i386/client:/usr/java/jdk1.5.0_05/jre/lib/i386:/usr/java/jdk1.5.0_05/jre/../lib/i386 name=java.library.path/ property value=Java Platform API Specification name=java.specification.name/ property value=49.0 name=java.class.version/ property value=HotSpot Client Compiler name=sun.management.compiler/ property value=2.6.13-1.1532_FC4 name=os.version/ property value=/home/jwi name=user.home/ property value=Europe/Berlin name=user.timezone/ property value=sun.print.PSPrinterJob name=java.awt.printerjob/ property value=ISO-8859-1 name=file.encoding/ property value=1.5 name=java.specification.version/ property value=jwi name=user.name/ property value=/usr/local/maven-2.0/core/boot/classworlds-1.1-alpha-2.jar name=java.class.path/ property value=1.0 name=java.vm.specification.version/ property value=32 name=sun.arch.data.model/ property value=/usr/java/jdk1.5.0_05/jre name=java.home/ property value=Sun Microsystems Inc. name=java.specification.vendor/ property value=de name=user.language/ property value=mixed mode, sharing name=java.vm.info/ property value=1.5.0_05 name=java.version/ property value=/usr/java/jdk1.5.0_05/jre/lib/ext name=java.ext.dirs/ property value=/usr/java/jdk1.5.0_05/jre/lib/rt.jar:/usr/java/jdk1.5.0_05/jre/lib/i18n.jar:/usr/java/jdk1.5.0_05/jre/lib/sunrsasign.jar:/usr/java/jdk1.5.0_05/jre/lib/jsse.jar:/usr/java/jdk1.5.0_05/jre/lib/jce.jar:/usr/java/jdk1.5.0_05/jre/lib/charsets.jar:/usr/java/jdk1.5.0_05/jre/classes name=sun.boot.class.path/ property value=Sun Microsystems Inc. name=java.vendor/ property value=/usr/local/maven-2.0 name=maven.home/ property value=/var/maven/repository name=localRepository/ property value=/ name=file.separator/ property value=http://java.sun.com/cgi-bin/bugreport.cgi; name=java.vendor.url.bug/ property value=little name=sun.cpu.endian/ property value=UnicodeLittle name=sun.io.unicode.encoding/ property value=gnome name=sun.desktop/ property value= name=sun.cpu.isalist/ /properties testcase time=0,034 name=testByteParam error type=javax.xml.parsers.FactoryConfigurationError message=Provider for javax.xml.parsers.SAXParserFactory cannot be foundjavax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.SAXParserFactory cannot be found at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) at org.apache.xmlrpc.server.XmlRpcStreamServer.lt;clinitgt;(XmlRpcStreamServer.java:51) at org.apache.xmlrpc.webserver.WebServer.lt;initgt;(WebServer.java:82) at
How to add JARs into MANIFEST.MF's class-Path entry in Maven 2?
Dear all, How many I do something like below: properties war.manifest.classpathtrue/war.manifest.classpath war.bundletrue/war.bundle /properties Or properties ejb.manifest.classpathtrue/ejb.manifest.classpath ejb.bundletrue/ejb.bundle /properties In Maven 2? Thanks Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] war project using war type dependencies
Ok, I took a stab at it. It works, although its somewhat ugly. I modified 'AbstractWarMojo.java' to read in a war dependency, overlay it on the build directory files, and merge both wars' web.xml files (by way of org.codehaus.cargo.module.webapp.WebXmlMerger). It works, which is good enough for me. It should probably be in a different plugin, but this was doable for today... *** Start AbstractWarMojo.java *** package org.apache.maven.plugin.war; /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import org.apache.commons.io.IOUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; import org.codehaus.cargo.module.webapp.WebXml; import org.codehaus.plexus.util.DirectoryScanner; import org.codehaus.plexus.util.FileUtils; import org.w3c.dom.Document; import org.xml.sax.InputSource; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter; public abstract class AbstractWarMojo extends AbstractMojo { /** * The maven project. * * @parameter expression=${project} * @required * @readonly */ private MavenProject project; /** * The directory containing generated classes. * * @parameter expression=${project.build.outputDirectory} * @required * @readonly */ private File classesDirectory; /** * The directory where the webapp is built. * * @parameter expression=${project.build.directory}/${project.build.finalName} * @required */ private File webappDirectory; /** * Single directory for extra files to include in the WAR. * * @parameter expression=${basedir}/src/main/webapp * @required */ private File warSourceDirectory; /** * The path to the web.xml file to use. * * @parameter expression=${maven.war.webxml} */ private String webXml; public static final String WEB_INF = WEB-INF; /** * The comma separated list of tokens to include in the WAR. * Default is '**'. * * @parameter alias=includes */ private String warSourceIncludes = **; /** * The comma separated list of tokens to exclude from the WAR. * * @parameter alias=excludes */ private String warSourceExcludes; private static final String[] EMPTY_STRING_ARRAY = {}; public abstract void execute() throws MojoExecutionException; public MavenProject getProject() { return project; } public void setProject( MavenProject project ) { this.project = project; } public File getClassesDirectory() { return classesDirectory; } public void setClassesDirectory( File classesDirectory ) { this.classesDirectory = classesDirectory; } public File getWebappDirectory() { return webappDirectory; } public void setWebappDirectory( File webappDirectory ) { this.webappDirectory = webappDirectory; } public File getWarSourceDirectory() { return warSourceDirectory; } public void setWarSourceDirectory( File warSourceDirectory ) { this.warSourceDirectory = warSourceDirectory; } public String getWebXml() { return webXml; } public void setWebXml( String webXml ) { this.webXml = webXml; } /** * Returns a string array of the excludes to be used * when assembling/copying the war. * * @return an array of tokens to exclude */ protected String[] getExcludes() { List excludeList = new ArrayList( FileUtils.getDefaultExcludesAsList() ); if ( warSourceExcludes !=
Re: How to add JARs into MANIFEST.MF's class-Path entry in Maven 2?
its pretty easy really here is example of the war plugin automatically generating the classpath.. build plugins plugin artifactIdmaven-war-plugin/artifactId configuration archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin /plugins /build the same holds true for the others as well (as far as I have found) cheers, jesse On 11/5/05, Thomas Phan [EMAIL PROTECTED] wrote: Dear all, How many I do something like below: properties war.manifest.classpathtrue/war.manifest.classpath war.bundletrue/war.bundle /properties Or properties ejb.manifest.classpathtrue/ejb.manifest.classpath ejb.bundletrue/ejb.bundle /properties In Maven 2? Thanks Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- jesse mcconnell
[m2] plugins vs dependencies
Hello, If I understand plugins and dependencies correctly, JUnit is a plugin. Yet, the POM examples I see have it as a dependency. It seems useful to have it as a dependency, as then one can use scopetest/scope. I don't know how one could specify a dependency as a plugin, but vice-versa is true (and common?). So then what is the difference in specifying a plugin as a dependency vs as a plugin? I'm trying to determine what to setup in plugins vs pluginManagement vs dependencyManagement vs dependencies. Is there any written guidance on this? I searched Nabble for plugin vs dependency, but was not successful; also didn't find clarification on the docs page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] parent's relativePath
Hi, In parent, how does one use relativePath? I can only get POM inheritance to work if I have done a mvn install on the parent project. Then the component projects find it in the local private repo. I'm sure I just don't understand something yet. If there is docs on it, please give me an RTFM link! TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] parent's relativePath
Normally, maven looks for parent pom with this order immeditate parent directory local repo remote repo So the parent pom.xml in parent dir, must have the groupID and artifacID found in child pom But there is a bug that may be your problem too http://jira.codehaus.org/browse/MNG-740 -D On 11/5/05, Jeff Jensen [EMAIL PROTECTED] wrote: Hi, In parent, how does one use relativePath? I can only get POM inheritance to work if I have done a mvn install on the parent project. Then the component projects find it in the local private repo. I'm sure I just don't understand something yet. If there is docs on it, please give me an RTFM link! TIA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] plugins vs dependencies
Jeff, Invoking junit is part of maven-core, but the user have to declare junit as dependency with test scope with their own version. ie junit is not a plugin. you dont specify plugin as dependency but as plugin declaration in build However, you can use pluginManagement at root pom to ensure all child poms use the same plugin version. -Dan On 11/5/05, Jeff Jensen [EMAIL PROTECTED] wrote: Hello, If I understand plugins and dependencies correctly, JUnit is a plugin. Yet, the POM examples I see have it as a dependency. It seems useful to have it as a dependency, as then one can use scopetest/scope. I don't know how one could specify a dependency as a plugin, but vice-versa is true (and common?). So then what is the difference in specifying a plugin as a dependency vs as a plugin? I'm trying to determine what to setup in plugins vs pluginManagement vs dependencyManagement vs dependencies. Is there any written guidance on this? I searched Nabble for plugin vs dependency, but was not successful; also didn't find clarification on the docs page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]