Re: test data location question
That seems reasonable, but I still don't understand how to make it work. The program I'm trying to test is like a compiler. It reads source files that can contain include statements. When it parses such a statement, the program needs to open the include file and start parsing statements in the include file. If I use getResourceAsStream, what can I do when I encounter the include statement? How can I open the include file if I can't specify the path that leads to the include file, relative to the initial input stream? As I wrote, the program is working just fine. It reads a file name from the command line. My question is how to test it within the maven framework, without specifying absolute test file names. Cheers, -- Pete On May 5, 2009, at 3:55 PM, Jeff MAURY wrote: You should store your files under src/test/resources and load your files using getResourceAsStream Regards Jeff MAURY On Tue, May 5, 2009 at 11:37 PM, Pete Siemsen siem...@ucar.edu wrote: This is a basic question about how to run Java unit tests that require file names. I use maven to develop a program that reads input file names from the command line. It's working fine, but now I want to share the code with someone else. The test programs live in ../src/test/ java, and the test data lives in ../src/test/data. Until now, I've used fully-qualified paths hard-coded into my test programs, like / Users/siemsen/TranslateCIM/src/test/data/cim/ testArrayTypeOnNonArray/testATONA.mof. If I tar up my development directory and give it to someone else, the fully-qualified paths obviously don't work. I want to make the paths relative somehow. The program reads an input file that may contain include statements that cause the program to open other files relative to the first input file. It seems to my newbie eyes that using resources and getResourceAsStream won't allow me to open subfiles. What I think I want is a runtime environment variable or something that tells me the path to the maven development directory. Any suggestion would be appreciated. -- Pete
test data location question
This is a basic question about how to run Java unit tests that require file names. I use maven to develop a program that reads an input file names from the command line. It's working fine, but now I want to share the code with someone else. The test programs live in ../src/test/java, and the test data lives in ../src/test/data. Until now, I've used fully- qualified paths hard-coded into my test programs, like /Users/siemsen/ TranslateCIM/src/test/data/cim/testArrayTypeOnNonArray/testATONA.mof. If I tar up my development directory and give it to someone else, the fully-qualified paths obviously don't work. I want to make the paths relative somehow. The program reads an input file that may contain include statements that cause the program to open other files relative to the first input file. It seems to my newbie eyes that using resources and getResourceAsStream won't allow me to open subfiles. What I think I want is a runtime environment variable or something that tells me the path to the maven development directory. Any suggestion would be appreciated. -- Pete - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
an mvn setup:diagnose would be nice at times like this :)
Long time Maven user getting the dreaded plugin does not exist or no valid version could be found on every maven call after unrelated software installation. Any advice where to look next greatly appreciated. Ran on same box 2 hours before, runs on every other box same network connection, only thing different is I installed some screen capturing software (Camtasia) which might have done something - don't know how to diagnose what. Everything else on the box still running great far as I can tell. Here is what I have done to make sure it isn't the usual suspects. - no proxy - other computer works fine as did this one two hours earlier - no firewall - turned off firewall to test that - installed bran new latest version of maven, pointed to fresh empty repository - virgin conf/settings.xml - ran archetype:create to make sure it wasn't a lame pom.xml in an existing project Below is example of what I ran and what came back (blowing away repository first). It does go as far as to build one maven-metadata-central.xml in ~\.m2\repository\org\apache\maven\plugins then it quits and prints the stacktrace below. $ mvn -X archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -D archetypeArtifactId=maven-archetype-site -DgroupId=org.artofillusion -Darti factId=maven-sample + Error stacktraces are turned on. Maven version: 2.0.8 Java version: 1.6.0_01 OS name: windows xp version: 5.1 arch: x86 Family: windows [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin gs\Administrator\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'c:\dev\apache-maven-2 .0.8\conf\plugin-registry.xml' [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri eved from repository: central due to an error: Error transferring file [INFO] Repository 'central' will be blacklisted [DEBUG] Exception org.apache.maven.wagon.TransferFailedException: Error transferring file at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:104) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(D efaultWagonManager.java:462) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMeta data(DefaultWagonManager.java:363) at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetada taManager.resolveAlways(DefaultRepositoryMetadataManager.java:364) at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetada taManager.resolve(DefaultRepositoryMetadataManager.java:97) at org.apache.maven.plugin.DefaultPluginMappingManager.loadPluginMapping s(DefaultPluginMappingManager.java:103) at org.apache.maven.plugin.DefaultPluginMappingManager.loadPluginMapping s(DefaultPluginMappingManager.java:87) at org.apache.maven.plugin.DefaultPluginMappingManager.getByPrefix(Defau ltPluginMappingManager.java:61) at org.apache.maven.plugin.DefaultPluginManager.getPluginDefinitionForPr efix(DefaultPluginManager.java:150) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor (DefaultLifecycleExecutor.java:1451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy AggregationNeeds(DefaultLifecycleExecutor.java:386) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:138) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.net.UnknownHostException: repo1.maven.org at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:388) at
Re: an mvn setup:diagnose would be nice at times like this :)
answer is inline below question: On Dec 29, 2007 6:30 AM, Tom Huybrechts [EMAIL PROTECTED] wrote: The UnknownHostException make this look like a network issue. Can you do a ping repo1.maven.org ? $ ping repo1.maven.org Pinging repo1.maven.org [63.246.20.112] with 32 bytes of data: Reply from 63.246.20.112: bytes=32 time=46ms TTL=52 Reply from 63.246.20.112: bytes=32 time=46ms TTL=52 Reply from 63.246.20.112: bytes=32 time=44ms TTL=52 Reply from 63.246.20.112: bytes=32 time=45ms TTL=52 Ping statistics for 63.246.20.112: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 44ms, Maximum = 46ms, Average = 45ms Tom On Dec 29, 2007 1:26 PM, Pete Carapetyan [EMAIL PROTECTED] wrote: Long time Maven user getting the dreaded plugin does not exist or no valid version could be found on every maven call after unrelated software installation. Any advice where to look next greatly appreciated. Ran on same box 2 hours before, runs on every other box same network connection, only thing different is I installed some screen capturing software (Camtasia) which might have done something - don't know how to diagnose what. Everything else on the box still running great far as I can tell. Here is what I have done to make sure it isn't the usual suspects. - no proxy - other computer works fine as did this one two hours earlier - no firewall - turned off firewall to test that - installed bran new latest version of maven, pointed to fresh empty repository - virgin conf/settings.xml - ran archetype:create to make sure it wasn't a lame pom.xml in an existing project Below is example of what I ran and what came back (blowing away repository first). It does go as far as to build one maven-metadata-central.xml in ~\.m2\repository\org\apache\maven\plugins then it quits and prints the stacktrace below. $ mvn -X archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -D archetypeArtifactId=maven-archetype-site -DgroupId=org.artofillusion -Darti factId=maven-sample + Error stacktraces are turned on. Maven version: 2.0.8 Java version: 1.6.0_01 OS name: windows xp version: 5.1 arch: x86 Family: windows [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin gs\Administrator\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'c:\dev\apache-maven-2 .0.8\conf\plugin-registry.xml' [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins [INFO] org.apache.maven.plugins: checking for updates from central [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri eved from repository: central due to an error: Error transferring file [INFO] Repository 'central' will be blacklisted [DEBUG] Exception org.apache.maven.wagon.TransferFailedException: Error transferring file at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputD ata(LightweightHttpWagon.java:104) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68) at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(D efaultWagonManager.java:462) at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMeta data(DefaultWagonManager.java:363) at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetada taManager.resolveAlways(DefaultRepositoryMetadataManager.java:364) at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetada taManager.resolve(DefaultRepositoryMetadataManager.java:97) at org.apache.maven.plugin.DefaultPluginMappingManager.loadPluginMapping s(DefaultPluginMappingManager.java:103) at org.apache.maven.plugin.DefaultPluginMappingManager.loadPluginMapping s(DefaultPluginMappingManager.java:87) at org.apache.maven.plugin.DefaultPluginMappingManager.getByPrefix (Defau ltPluginMappingManager.java:61) at org.apache.maven.plugin.DefaultPluginManager.getPluginDefinitionForPr efix(DefaultPluginManager.java:150) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor (DefaultLifecycleExecutor.java:1451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListBy AggregationNeeds(DefaultLifecycleExecutor.java:386) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLi fecycleExecutor.java:138) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke
Re: an mvn setup:diagnose would be nice at times like this :)
As you can imagine I have double, triple and quadruple checked everything I could think of xp and norton firewall wise, don't know anything else to check. Which is why I only half jokingly titled this thread as mvn setup:diagnose would be nice at times like this. This is such a huge plague on the maven community, it isems really questionable for it to be so challenging to run diagnostics. Stack traces are great for errors that are not expected, but this happens to a lot of people a lot of times from a lot of different causes, one of which is apparently eluding me now. On Dec 29, 2007 8:47 AM, Jerome Lacoste [EMAIL PROTECTED] wrote: On Dec 29, 2007 1:39 PM, Pete Carapetyan [EMAIL PROTECTED] wrote: answer is inline below question: On Dec 29, 2007 6:30 AM, Tom Huybrechts [EMAIL PROTECTED] wrote: The UnknownHostException make this look like a network issue. Can you do a ping repo1.maven.org ? $ ping repo1.maven.org Pinging repo1.maven.org [63.246.20.112] with 32 bytes of data: Reply from 63.246.20.112: bytes=32 time=46ms TTL=52 Reply from 63.246.20.112: bytes=32 time=46ms TTL=52 Reply from 63.246.20.112: bytes=32 time=44ms TTL=52 Reply from 63.246.20.112: bytes=32 time=45ms TTL=52 Ping statistics for 63.246.20.112: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 44ms, Maximum = 46ms, Average = 45ms Things that comes to mind: * firewall or anti-virus * something bad under %HOME%\.m2 You said you tried those, but I would tripple check (maybe you have 2 firewalls on the machine ? XP + separate one ? :) If you have multiple users on that machine, try with them. Jerome PS: do you really log as Administrator on your machine ? - 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: an mvn setup:diagnose would be nice at times like this :)
Thanks Stuart for the idea on running the java program to make sure. Of course that works perfectly. But at least one more issue taken care of. So recapping, here is what it does NOT appear to be - proxy problem - java permission problem - firewall problem - network problem - JAVA_HOME problem Anyone else got any other brilliant ideas ? have you tried running a simple Java app, such as: //== import java.net.InetAddress; public class getByName { public static void main(String[] args) throws Exception { if (args.length 0) { System.out.println(InetAddress.getByName(args[0])); } else { System.out.println(java getByName host); } } } //== to make sure that this isn't an application permissions/access issue? example: java getByName repo1.maven.org result: repo1.maven.org/63.246.20.112 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse and Maven best practice
I use Eclipse and the External Tools configuration to run mvn from within eclipse if needed. I used to have Eclipse compiling to a different classes directory and that worked fine for many projects, but recently I use 'mvn jetty:run' all the time so that when I save a java file in Eclipse it gets compiled immediately by Eclipse and the change will be instantly visible in Jetty. Working this way eclipse and mvn must compile to same place, as jetty start up using the classpath that mvn is using. On 17/09/2007, Jim Sellers [EMAIL PROTECTED] wrote: I'd take a look at what files are generated when you create a new project using SAP. Are there other folders / files that are created? (starting with a dot). Are there project natures / builders that are not being included (in the .project file)? It sounds like there is *something* missing that SAP is reading / looking at. Jim On 9/17/07, Wayne Fay [EMAIL PROTECTED] wrote: Since we're talking about Eclipse... As I said before, I'm using SAP NWDS (2.0.14) which is based on Eclipse v2.1. I'm using eclipse:eclipse to generate metadata and added the proper perspectives etc. When I create a new project (J2EE, EJB Module Project or Web Module Project) then it shows up in the J2EE Explorer and things are good. When I use mvn e:e and then import the project, it comes in as a standard Java project. I've tried editing metadata files manually but its still not coming up the way I was hoping. The EJB project shows up in J2EE Explorer but the beans don't show up since I'm not using the default ejbModule directory etc. Any ideas? I might try upgrading to the latest NWDS build which is based on Eclipse 3, apparently. Wayne On 9/16/07, Thierry Lach [EMAIL PROTECTED] wrote: There can be problems caused with a single build destination caused by the Eclipse incremental compiler that would sometimes require doing a clean in both maven and eclipse. - 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: Eclipse and Maven best practice
I don't currently use any of the Maven Eclipse IDE integration plugins and just use Eclipse's external tools facility to run mvn for any selected folder in Eclipse's 'Package Explorer' pane. At least this way you know Maven is behaving as it does from the command line, for new dependency I add to pom.xml and run eclipse:eclipse, but this can be done from inside Eclipse aswell. e.g. Set up a new External Tool as follows : Name: mvn clean install Location: ${env_var:M2_HOME}/bin/mvn.bat Working Directory: ${resource_loc} Arguments: clean install Then just select the folder or project in the Eclipse Java Tree (folder must have a pom.xml in it) then select this external tool 'mvn clean install' - once run once it will be on the drop down. You can set up the common maven goals like this, then share the External tools configuration by using the 'Common' tab and specifying a folder that is under SCM. Also can set up an 'General Project' in Eclipse that points to your local repo folder, this allows you to search this area and open pom files if necessary. I would gladly swap to a Plugin but there always seems to be unexpected side effects. On 18/09/2007, Pete [EMAIL PROTECTED] wrote: I use Eclipse and the External Tools configuration to run mvn from within eclipse if needed. I used to have Eclipse compiling to a different classes directory and that worked fine for many projects, but recently I use 'mvn jetty:run' all the time so that when I save a java file in Eclipse it gets compiled immediately by Eclipse and the change will be instantly visible in Jetty. Working this way eclipse and mvn must compile to same place, as jetty start up using the classpath that mvn is using. On 17/09/2007, Jim Sellers [EMAIL PROTECTED] wrote: I'd take a look at what files are generated when you create a new project using SAP. Are there other folders / files that are created? (starting with a dot). Are there project natures / builders that are not being included (in the .project file)? It sounds like there is *something* missing that SAP is reading / looking at. Jim On 9/17/07, Wayne Fay [EMAIL PROTECTED] wrote: Since we're talking about Eclipse... As I said before, I'm using SAP NWDS (2.0.14) which is based on Eclipse v2.1. I'm using eclipse:eclipse to generate metadata and added the proper perspectives etc. When I create a new project (J2EE, EJB Module Project or Web Module Project) then it shows up in the J2EE Explorer and things are good. When I use mvn e:e and then import the project, it comes in as a standard Java project. I've tried editing metadata files manually but its still not coming up the way I was hoping. The EJB project shows up in J2EE Explorer but the beans don't show up since I'm not using the default ejbModule directory etc. Any ideas? I might try upgrading to the latest NWDS build which is based on Eclipse 3, apparently. Wayne On 9/16/07, Thierry Lach [EMAIL PROTECTED] wrote: There can be problems caused with a single build destination caused by the Eclipse incremental compiler that would sometimes require doing a clean in both maven and eclipse. - 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]
mvn site doesn't run JUnits configured to run during 'integration-test' phase
Just wanted to ask whether there is any plan for supporting 'Integration Tests' in Maven Site Reporting. Currently although there is a well know 'integration-test' phase in Maven, if Surefire JUnits are configured to run during this phase, they are not executed during a 'mvn site-deploy'. We have our Junits with different suffixes :- *Test.java - for normal JUnits *ITTest.java - for Integration Test Junits (selenium etc) The former get run during 'test' phase, the latter during 'integration-test' phase. All works great for a normal mvn install / deploy, but when we do mvn site-deploy the integration tests don't get run. There was a thread about this a while ago. It seems the site plugin only expects tests to be run in 'test' phase. What I found was it doesn't matter what is put in the reporting section of the pom regarding configuring the 'maven-surefire-plugin' itself (i.e. configuration) . Instead Maven seems to use the 'maven-surefire-plugin' configuration from the build section's 'test' phase configuration EVEN when doing a 'site' goal. We really need some of the JUnits run during 'integration-test' phase as 'pre-integration-test' phase needs to occur to start container using cargo. Is this a simple fix to the site or reporting plugins ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running heavy tests in the build lifecycle
Just wanted to ask on the back of this whether any of you have got the Maven Site Reporting working when you have some JUnit tests running in the 'Integration-test' phase. I posted this recently http://www.nabble.com/mvn-site-doesn%27t-run-JUnits-configured-to-run-during-%27integration-test%27-phase-tf4474278s177.html On 06/09/2007, Kjetil Kjernsmo [EMAIL PROTECTED] wrote: OK, my thanks to Arnaud, Dave and Wendy! I'm going to try it out over the next couple of days, I feel that I have a good direction now. Thanks! Kind regards Kjetil Kjernsmo -- Senior Knowledge Engineer Direct: +47 6783 1136 | Mobile: +47 986 48 234 Email: [EMAIL PROTECTED] Web: http://www.computas.com/ | SHARE YOUR KNOWLEDGE | Computas AS Vollsveien 9, PO Box 482, N-1327 Lysaker | Phone:+47 6783 1000 | Fax:+47 6783 1001 IMPORTANT NOTICE: This message may contain confidential information. If you have received this e-mail in error, do not use, copy 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]
plugin version range doesn't work version[2.3,)/version
Is a plugin version range supposed to work in maven 2.0.6 ? I thought this would be a neat way of ensuring we have latest plugin and at least one that works with JUnit4 plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version[2.3,)/version This gives :- [INFO] Failed to resolve artifact. GroupId: org.apache.maven.plugins ArtifactId: maven-surefire-plugin Version: [2.3,) Reason: Unable to download the artifact from any repository org.apache.maven.plugins:maven-surefire-plugin:pom:[2.3,) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WSDL2Code Axis2 javax/wsdl/WSDLException NoClassDefFoundError
I'm trying to use axis2-wsdl2code-maven-plugin with wsdl2code goal. However I'm getting inconsistencies with class versions, can anyone help? Has anyone got a working version that has the correct dependencies required to get plugin to work? . Downloading: http://repo1.maven.org/maven2/woodstox/wstx-asl/3.0.1/wstx-asl-3.0.1.pom [INFO] [axis2-wsdl2code:wsdl2code {execution: default}] [INFO] [ERROR] FATAL ERROR [INFO] [INFO] javax/wsdl/WSDLException [INFO] [INFO] Trace java.lang.NoClassDefFoundError: javax/wsdl/WSDLException at org.apache.axis2.maven2.wsdl2code.WSDL2CodeMojo.execute(WSDL2CodeMojo.java:396) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) my pom.xml dependencies dependency groupIdjunit/groupId artifactIdjunit/artifactId version4.1/version scopeprovided/scope /dependency dependency groupIdcommons-discovery/groupId artifactIdcommons-discovery/artifactId version0.4/version /dependency dependency groupIdorg.apache.axis2/groupId artifactIdaxis2-kernel/artifactId version1.2/version scopecompile/scope exclusions exclusion groupIdjunit/groupId artifactIdjunit/artifactId /exclusion /exclusions /dependency dependency groupIdwsdl4j/groupId artifactIdwsdl4j/artifactId version1.6.2/version /dependency /dependencies build plugins plugin !-- see http://ws.apache.org/axis2/tools/1_2/maven-plugins/maven-wsdl2code-plugin.html -- groupIdorg.apache.axis2.maven2/groupId artifactIdaxis2-wsdl2code-maven-plugin/artifactId configuration packageNamecom.au.marj.wsdl.evant.dprj.intf/packageName generateTestcasetrue/generateTestcase wsdlFilesrc/main/resources/WebInterface.wsdl/wsdlFile /configuration executions execution goals goalwsdl2code/goal /goals /execution /executions /plugin /plugins /build javax/wsdl/WSDLException seems to reside in wsdl4j-1.6.2.jar however, have tried many versions of this jar with no luck yet. I have tried many versions of wsdl4j - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBUnit and table list
Just to answer my own question - the solution to configure the DBUnit plugin to only export certain tables was : configuration driver${jdbc.driverClassName}/driver url${jdbc.url}/url username${jdbc.username}/username password${jdbc.password}/password dataTypeFactoryName${dbunit.dataTypeFactoryName}/dataTypeFactoryName schema${web.project.name}/schema formatflat/format tables list nameacl_permission/name /list list nameacl_object_identity/name /list list namerole/name /list /tables /configuration On 13/05/07, Dan Tran [EMAIL PROTECTED] wrote: I thought, I gave you a suggest using the example, please answer to the list and what is the exact error? On 5/12/07, Pete [EMAIL PROTECTED] wrote: Just wondered if you guys could help with a query I sent to the Maven mailing list recently ? thanks Pete -- Forwarded message -- From: Pete [EMAIL PROTECTED] Date: 04-May-2007 12:10 Subject: DBUnit and table list To: Maven Users List users@maven.apache.org Hi there, 1) Firstly I've noticed there appears to be two DBUnit plugins, not sure which is best : http://mojo.codehaus.org/dbunit-maven-plugin http://maven-plugins.sourceforge.net 2) I'm trying to use the codehaus DBUnit plugin to export some data, but one table is giving me an error so I thought I'd provide a list of tables to export to the plugin configuration but not sure how to :- The docs says there is a configurable :- tables Table[] List of DbUnit's Table. See DbUnit's JavaDoc for details I have tried :- tables tabletable1/table tabletable2/table /tables and tablestable1,table2tables all inside the plugin's configuration. The plugin requires org.dbunit.ant.Table but looks like the Strings don't get converted to this. Cannot assign configuration entry 'table' to 'class org.dbunit.ant.Table' from 'acl_object_identity', which is of type class java.lang.String Help ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: extensible database integration testing
I'm not sure I understand at which point you do know these 'execution environments' but maybe you could specify the values on the command line along with a pom as follows :- dependency groupId${jdbc.groupId}/groupId artifactId${jdbc.artifactId}/artifactId version${jdbc.version}/version /dependency and hibernate-configuration session-factory !-- Database connection settings -- property name=connection.driver_class${jdbc.driverClassName}/property property name=connection.url${jdbc.url}/property property name=connection.username${jdbc.username}/property property name=connection.password${jdbc.password}/property property name=dialect${hibernate.dialect}/property property name=show_sqltrue/property /session-factory /hibernate-configuration then specify the values using -Djdbc.driverClassName=etc or in the pom have a number of profiles that can be activated on demand e.g. profile idmysql/id activation property namemysql/name valuetrue/value /property /activation properties rdbmsmysql/rdbms hibernate.dialectorg.hibernate.dialect.MySQLInnoDBDialect/hibernate.dialect jdbc.groupIdmysql/jdbc.groupId jdbc.artifactIdmysql-connector-java/jdbc.artifactId jdbc.version5.0.4/jdbc.version jdbc.driverClassNamecom.mysql.jdbc.Driver/jdbc.driverClassName /properties /profile On 23/05/07, Steve Ebersole [EMAIL PROTECTED] wrote: I am looking to migrate Hibernate to use Maven for building. I am currently running into a problem porting the Hibernate testsuite. The Hibernate testsuite is mainly a bunch of functional and integration tests and not really unit tests per-se. But it is built on top of Junit. Anyway, the problem I am facing is in regards to the need to run the Hibernate test suite against multiple databases and JDBC drivers. Basically I need the ability to vary (1) Hibernate configuration and (2) test dependencies (jdbc drivers) per environment. Logically one would think of profiles to help solve this, with one profile per environment. And in fact defining all the profiles in the pom does in fact work, as i can separately define (1) dependencies and (2) resources (or properties) per profile. However, the trick is that I do not know all these execution environments up front. And thus I cannot define them in the pom. user supplied profiles.xmls would be an option, except that profiles.xml is not allowed to specify either of the two things I need (ok, ok, I could munge the requirements and get properties+resourceFilters to do the trick for Hibernate configuration). Anyone have any thoughts on how this may be achievable? Thanks, Steve - 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]
DBUnit and table list
Hi there, 1) Firstly I've noticed there appears to be two DBUnit plugins, not sure which is best : http://mojo.codehaus.org/dbunit-maven-plugin http://maven-plugins.sourceforge.net 2) I'm trying to use the codehaus DBUnit plugin to export some data, but one table is giving me an error so I thought I'd provide a list of tables to export to the plugin configuration but not sure how to :- The docs says there is a configurable :- tables Table[] List of DbUnit's Table. See DbUnit's JavaDoc for details I have tried :- tables tabletable1/table tabletable2/table /tables and tablestable1,table2tables all inside the plugin's configuration. The plugin requires org.dbunit.ant.Table but looks like the Strings don't get converted to this. Cannot assign configuration entry 'table' to 'class org.dbunit.ant.Table' from 'acl_object_identity', which is of type class java.lang.String Help ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mvn jetty:run problem with classloader
Hi Steve, Apologies only just saw your post. The above link does have some suggested remedys, however in the end we changed our project to just be a single WAR packaging project, with no subprojects for server side classes. I was a little reluctant to do this at first but it is working very well. This means after a serverside java file change our IDE saves the class to target/classes and Jetty picks it up immediately. Slight downside is you could not have two web apps both depending on a common server side. Did you get any resolutions yourself ? Pete On 13/04/07, Steve Wells [EMAIL PROTECTED] wrote: Hi Pete, Just having the same problem myself, did you manage to solve this? Thanks, Steve On 20/02/07, Pete [EMAIL PROTECTED] wrote: I'm answering myself, but I guess the problem could be the same as :- http://docs.codehaus.org/display/JETTY/ZIP+exception+reading+jar+or+war+files On 16/02/07, Wayne Fay [EMAIL PROTECTED] wrote: There doesn't seem to be any support forums for Jetty either. I see jetty-discuss and jetty-support mailing lists, and both are quite active. http://sourceforge.net/mail/?group_id=7322 Or if you prefer Nabble: http://www.nabble.com/Jetty-Support-f61.html http://www.nabble.com/Jetty-Discuss-f60.html I wish I could help, but I just don't know Jetty well enough to tell you anything useful. Wayne - 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]
Selenium use Java JUnits or HTML suites ? and Unix platform
Just wondered if anyone out there can tell me any of the advantages/disadvantages of using Selenium with JUnits or is it better to use selenese with the HTML suite tests ? I thinking in terms of what is easiest to maintain ? Test on multiple browsers ? Also a related question, at the moment our Continuum build server runs on Unix, so how will we run a browser ? do we put part of Selenium (Selenium RC??) on a separate windows box ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use JunitEE in M2?
Jesse, If you have a look at this link http://docs.codehaus.org/display/MAVEN/best+practices+-+testing+strategies and then search for my comment see 'Posted by Pete at Feb 11, 2006 16:15 | Permalink' this was an approach I took and got JUnitEE working. cheers Pete On 20/03/07, JesseLiu [EMAIL PROTECTED] wrote: Hi there, I have not found a plugin for JunitEE, Is there any plugin for JUnitEE? Can anyone give me a sample pom.xml? Thanks Jesse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven2 plugin for eclipse
I'd say give up with all these Maven integration plugins and just use Eclipse's external tools facility to run mvn for any selected folder e.g. Set up a new External Tool as follows : Name: mvn clean install Location: ${env_var:M2_HOME}/bin/mvn.bat Working Directory: ${resource_loc} Arguments: clean install Then just select the folder or project in the Eclipse Java Tree (folder must have a pom.xml in it) then select this external tool 'mvn clean install' - once run once it will be on the drop down. You can set up the common maven goals like this, then share the External tools configuration by using the 'Common' tab and specifying a folder that is under SCM. At least this way you know Maven is behaving as it does from the command line, periodically you need to run eclipse:eclipse, but this can be done as above. Also can set up an 'General Project' in Eclipse that points to your local repo folder, this allows you to search this area and open pom files if necessary. I would gladly swap to a Plugin but there always seems to be unexpected side effects. On 14/03/07, Leslie Bertels [EMAIL PROTECTED] wrote: Hi, I trying to run pmd using the maven-pmd-plugin configured in my pom.xml from within Eclipse. Using the command line, everything works fine (mvn pmd:pmd) When invoking the maven2 verify goal from within Eclipse using the Run as - Maven2 build ... I receive the following error: INFO] pmd:pmd [ERROR] mojo-execute : pmd:pmd Diagnosis: An error has occurred in PMD Report report generation. FATAL ERROR: Error executing Maven for a project [ERROR] project-execute : project.test:test-pojo:jar:1.0.0 ( task-segment: [pmd:pmd] ) Diagnosis: An error has occurred in PMD Report report generation. FATAL ERROR: Error executing Maven for a project [ERROR] reactor-execute : D:\dev.env\dev\projects\test\TestProject Diagnosis: An error has occurred in PMD Report report generation. FATAL ERROR: Error executing Maven for a project [INFO] [ERROR] BUILD ERROR [INFO] [INFO] An error has occurred in PMD Report report generation. [INFO] [DEBUG] Trace An error has occurred in PMD Report report generation. [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Wed Mar 14 16:18:17 CET 2007 [INFO] Final Memory: 3M/6M [INFO] [INFO] Error for project: Unnamed - project.test:test-pojo:jar:1.0.0 (during pmd:pmd) [INFO] [INFO] An error has occurred in PMD Report report generation. [INFO] [DEBUG] Trace An error has occurred in PMD Report report generation. [INFO] [ERROR] reactor-execute : D:\dev.env\dev\projects\test\TestProject FATAL ERROR: Error executing Maven for a project [INFO] BUILD ERRORS [INFO] [INFO] Total time: 2 seconds [INFO] Finished at: Wed Mar 14 16:18:17 CET 2007 [INFO] Final Memory: 3M/6M [INFO] Has anybody had the same problems? Thanks in advance, Regards, Les. Reference info: I'm using the following pom.xml ?xml version=1.0 encoding=UTF-8? 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 groupIdproject.test/groupId artifactIdtest-pojo/artifactId version1.0.0/version descriptionTemplate for Pojo Projects supported by Maven Build/ description build plugins plugin artifactIdmaven-compiler-plugin/ artifactId configuration source1.5/source target1.5/target /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-pmd-plugin/artifactId executions execution goals goalcheck/goal goalcpd-check/ goal /goals
Re: Running surefire for test and integration-test and producing two reports
Steve, I've had the same issue myself regarding the integration test JUnits not appearing in the site, what I found was it doesn't matter what is put in the reporting section of the pom regarding configuring the 'maven-surefire-plugin' itself. Instead Maven seems to use the 'maven-surefire-plugin' configuration from the build section EVEN when doing a 'site' goal. So I did have the build configuration like this, meaning Test.java get run during 'test' phase and ITTest.java only get run for 'integration-test' phase. This works fine during build but not for 'site'. So the only hack I can find is to make the exclude alterable during 'site' or 'test' , see 2nd example plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.3/version !-- default configuration for default 'test' phase bindings -- configuration reportFormatxml/reportFormat forkModenone/forkMode includes include**/*Test.java/include /includes excludes exclude${exclude.pattern.it.tests}/exclude /excludes /configuration !-- special configuration to pick up src/it/java during integration-test phase -- executions execution idsurefire-it/id phaseintegration-test/phase configuration includes include**/*ITTest.java/include /includes /configuration goals goaltest/goal /goals /execution /executions /plugin What follows in a 2nd version to make site work, with ${exclude.pattern.it.tests} set by default in pom to exclude.pattern.it.tests**/*ITTest.java/exclude.pattern.it.tests so this is used to exclude during a normal 'mvn test' but when site is run I have to include the above e.g mvn site -Dexclude.pattern.it.tests=anyoldstring plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.3/version !-- default configuration for default 'test' phase bindings -- configuration reportFormatxml/reportFormat forkModenone/forkMode includes include**/*Test.java/include /includes excludes exclude${exclude.pattern.it.tests}/exclude !-- to exclude '**/*ITTest.java' during 'test' but not during 'site' so this is variable -- /excludes /configuration !-- special configuration to pick up src/it/java during integration-test phase -- executions execution idsurefire-it/id phaseintegration-test/phase configuration includes include**/*ITTest.java/include /includes /configuration goals goaltest/goal /goals /execution /executions /plugin However this means the integration tests get run during the 'test' phase when running 'site' instead of 'integration-test' so it's not ideal. Anyone else help ? Pete On 05/03/07, Steve Hayes [EMAIL PROTECTED] wrote: Hi, I have just started using Maven2, and I think that I am missing something fundamental. I am trying to create a build that: 1) Runs some tests as unit tests during the test phase; 2) Runs some other tests as integration tests during the integration- test phase; 3) Produces two surefire reports on the site I have tried a number of different approaches, and all of them have had something wrong. I have tried using the executions to bind the unit and integration tests to different phases and goals, but there also seems to be some default behaviour invoked which executes all my tests, without reference to the executions, when the surefire:test target in invoked as a dependency. I would like to see two test runs, but I always end up seeing more than that. And when I run the site goal, the unit tests are executed but the integration tests are not. I'm working with a simple project with just dummy code and tests in it, so the problem is unlikely to be the complexity of my project. Can anyone point me to an example that does something like that I'm after? Regards, Steve Hayes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: mvn jetty:run problem with classloader
I'm answering myself, but I guess the problem could be the same as :- http://docs.codehaus.org/display/JETTY/ZIP+exception+reading+jar+or+war+files On 16/02/07, Wayne Fay [EMAIL PROTECTED] wrote: There doesn't seem to be any support forums for Jetty either. I see jetty-discuss and jetty-support mailing lists, and both are quite active. http://sourceforge.net/mail/?group_id=7322 Or if you prefer Nabble: http://www.nabble.com/Jetty-Support-f61.html http://www.nabble.com/Jetty-Discuss-f60.html I wish I could help, but I just don't know Jetty well enough to tell you anything useful. Wayne - 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]
mvn jetty:run problem with classloader
Anyone help ? -- Forwarded message -- From: Pete [EMAIL PROTECTED] Date: 15-Feb-2007 14:11 Subject: mvn jetty:run problem with classloader To: Maven Users List users@maven.apache.org I'm using 'mvn jetty:run', and trying to get it to work with rapid application development where the application has the following structure :- myproject-core (jar) myproject-weblib (jar) myproject-web (war) - mvn jetty:run from here Jetty starts ok, and the application works fine at first, the in-situ deployment uses classes and resources from the war project, and picks up the dependant jars from local repository (e.g. myproject-core.jar and myproject-weblib.jar). If I change say a JSP it is picked up immediately. But if I change a Java class in the 'myproject-core' project, then do a 'mvn install' the core jar gets updated, Jetty detects this and says 'restarting' - great exactly what I want, but I then get classloading errors relating to loading log4j.properties and application's spring's applicationContext not being found. Both these files reside in the root of the myproject-core.jar. What's strange is I thought I'd fixed it by moving the local Repo from 'c:\documents and settings' to 'c:\dev\.m2' as the former had a space in the path. But although I'm sure it was working it seems to have stopped or is intermittent. So the issue only arises if Jetty detects a change to a JAR on its classpath. If I restart Jetty completely all is ok. There doesn't seem to be any support forums for Jetty either. help Pete [INFO] restarting [EMAIL PROTECTED] 2007-02-15 13:23:55.756:/myproject:INFO: Closing WebApplicationContext of Spring FrameworkServlet 'myproject' com.au.myproject.web.util.SystemMonitor - User session destroyed: cs7k7p8hm5g6s 2007-02-15 13:23:55.974:/myproject:INFO: Closing Spring root WebApplicationContext [INFO] Webapp source directory = C:\dev\myproject\myproject-web\src\main\webapp [INFO] web.xml file = C:\dev\myproject\myproject-web\src\main\webapp\WEB-INF\web.xml [INFO] Classes directory C:\dev\myproject\myproject-web\target\classes does not exist [INFO] Context path = /myproject [INFO] Tmp directory = C:\dev\myproject\myproject-web\target\work [INFO] Web defaults = jetty default [INFO] Webapp directory = C:\dev\myproject\myproject-web\src\main\webapp [INFO] Classpath = [file:/C:/dev/myproject/myproject-web/target/classes, file:/C:/dev/.m2/localrepository/axis/axis/1.4/axis-1.4.jar, file:/C:/dev/.m2/localrepository/poi /poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar, file:/C:/dev/.m2/localrepository/logkit/logkit/1.0.1/logkit-1.0.1.jar, file:/C:/dev/.m2/localrepository/ javax/servlet/jstl/1.1.2/jstl-1.1.2.jar, file:/C:/dev/.m2/localrepository/asm/asm/1.5.3/asm-1.5.3.jar, file:/C:/dev/.m2/localrepository/commons-collections/comm ons-collections/3.1/commons-collections-3.1.jar, file:/C:/dev/.m2/localrepository/commons-dbcp/commons-dbcp/1.2.1/commons-dbcp-1.2.1.jar, file:/C:/dev/.m2/local repository/com/lowagie/itext/1.3.1/itext-1.3.1.jar, file:/C:/dev/.m2/localrepository/com/au/myproject/myproject-weblib/1.2.0-SNAPSHOT/myproject-weblib-1.2.0-SNAPSHOT.jar, file :/C:/dev/.m2/localrepository/taglibs/standard/1.1.2/standard-1.1.2.jar, file:/C:/dev/.m2/localrepository/mysql/mysql-connector-java/3.1.12/mysql-connector-java- 3.1.12.jar, file:/C:/dev/.m2/localrepository/commons-digester/commons-digester/1.7/commons-digester-1.7.jar, file:/C:/dev/.m2/localrepository/commons-io/commons -io/1.1/commons-io-1.1.jar, file:/C:/dev/.m2/localrepository/commons-validator/commons-validator/1.3.0/commons-validator-1.3.0.jar, file:/C:/dev/.m2/localreposi tory/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar, file:/C:/dev/.m2/localrepository/velocity/velocity-dep/1.4/velocity-dep-1.4.jar, file:/C:/dev/.m2/localrepo sitory/commons-logging/commons-logging/1.1/commons-logging-1.1.jar, file:/C:/dev/.m2/localrepository/commons-fileupload/commons-fileupload/1.1/commons-fileuploa d-1.1.jar, file:/C:/dev/.m2/localrepository/org/springframework/spring/2.0/spring-2.0.jar, file:/C:/dev/.m2/localrepository/org/compass/compass/1.0.0/compass-1. 0.0.jar, file:/C:/dev/.m2/localrepository/cglib/cglib/2.1_3/cglib-2.1_3.jar, file:/C:/dev/.m2/localrepository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar, file:/C:/ dev/.m2/localrepository/javax/mail/mail/1.4/mail-1.4.jar, file:/C:/dev/.m2/localrepository/velocity/velocity/1.4/velocity-1.4.jar, file:/C:/dev/.m2/localreposit ory/axis/axis-wsdl4j/1.5.1/axis-wsdl4j-1.5.1.jar, file:/C:/dev/.m2/localrepository/commons-chain/commons-chain/1.0/commons-chain-1.0.jar, file:/C:/dev/.m2/local repository/javax/xml/jaxrpc-api/1.1/jaxrpc-api-1.1.jar, file:/C:/dev/.m2/localrepository/commons-pool/commons-pool/1.2/commons-pool-1.2.jar, file:/C:/dev/.m2/lo calrepository/log4j/log4j/1.2.14/log4j-1.2.14.jar, file:/C:/dev/.m2/localrepository/antlr/antlr/2.7.2/antlr-2.7.2.jar, file:/C:/dev/.m2/localrepository/com/orac le/ojdbc14_g/10.2.0.1.0/ojdbc14_g-10.2.0.1.0.jar, file:/C:/dev/.m2
mvn jetty:run problem with classloader
I'm using 'mvn jetty:run', and trying to get it to work with rapid application development where the application has the following structure :- myproject-core (jar) myproject-weblib (jar) myproject-web (war) - mvn jetty:run from here Jetty starts ok, and the application works fine at first, the in-situ deployment uses classes and resources from the war project, and picks up the dependant jars from local repository (e.g. myproject-core.jar and myproject-weblib.jar). If I change say a JSP it is picked up immediately. But if I change a Java class in the 'myproject-core' project, then do a 'mvn install' the core jar gets updated, Jetty detects this and says 'restarting' - great exactly what I want, but I then get classloading errors relating to loading log4j.properties and application's spring's applicationContext not being found. Both these files reside in the root of the myproject-core.jar. What's strange is I thought I'd fixed it by moving the local Repo from 'c:\documents and settings' to 'c:\dev\.m2' as the former had a space in the path. But although I'm sure it was working it seems to have stopped or is intermittent. So the issue only arises if Jetty detects a change to a JAR on its classpath. If I restart Jetty completely all is ok. There doesn't seem to be any support forums for Jetty either. help Pete [INFO] restarting [EMAIL PROTECTED] 2007-02-15 13:23:55.756:/myproject:INFO: Closing WebApplicationContext of Spring FrameworkServlet 'myproject' com.au.myproject.web.util.SystemMonitor - User session destroyed: cs7k7p8hm5g6s 2007-02-15 13:23:55.974:/myproject:INFO: Closing Spring root WebApplicationContext [INFO] Webapp source directory = C:\dev\myproject\myproject-web\src\main\webapp [INFO] web.xml file = C:\dev\myproject\myproject-web\src\main\webapp\WEB-INF\web.xml [INFO] Classes directory C:\dev\myproject\myproject-web\target\classes does not exist [INFO] Context path = /myproject [INFO] Tmp directory = C:\dev\myproject\myproject-web\target\work [INFO] Web defaults = jetty default [INFO] Webapp directory = C:\dev\myproject\myproject-web\src\main\webapp [INFO] Classpath = [file:/C:/dev/myproject/myproject-web/target/classes, file:/C:/dev/.m2/localrepository/axis/axis/1.4/axis-1.4.jar, file:/C:/dev/.m2/localrepository/poi /poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar, file:/C:/dev/.m2/localrepository/logkit/logkit/1.0.1/logkit-1.0.1.jar, file:/C:/dev/.m2/localrepository/ javax/servlet/jstl/1.1.2/jstl-1.1.2.jar, file:/C:/dev/.m2/localrepository/asm/asm/1.5.3/asm-1.5.3.jar, file:/C:/dev/.m2/localrepository/commons-collections/comm ons-collections/3.1/commons-collections-3.1.jar, file:/C:/dev/.m2/localrepository/commons-dbcp/commons-dbcp/1.2.1/commons-dbcp-1.2.1.jar, file:/C:/dev/.m2/local repository/com/lowagie/itext/1.3.1/itext-1.3.1.jar, file:/C:/dev/.m2/localrepository/com/au/myproject/myproject-weblib/1.2.0-SNAPSHOT/myproject-weblib-1.2.0-SNAPSHOT.jar, file :/C:/dev/.m2/localrepository/taglibs/standard/1.1.2/standard-1.1.2.jar, file:/C:/dev/.m2/localrepository/mysql/mysql-connector-java/3.1.12/mysql-connector-java- 3.1.12.jar, file:/C:/dev/.m2/localrepository/commons-digester/commons-digester/1.7/commons-digester-1.7.jar, file:/C:/dev/.m2/localrepository/commons-io/commons -io/1.1/commons-io-1.1.jar, file:/C:/dev/.m2/localrepository/commons-validator/commons-validator/1.3.0/commons-validator-1.3.0.jar, file:/C:/dev/.m2/localreposi tory/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar, file:/C:/dev/.m2/localrepository/velocity/velocity-dep/1.4/velocity-dep-1.4.jar, file:/C:/dev/.m2/localrepo sitory/commons-logging/commons-logging/1.1/commons-logging-1.1.jar, file:/C:/dev/.m2/localrepository/commons-fileupload/commons-fileupload/1.1/commons-fileuploa d-1.1.jar, file:/C:/dev/.m2/localrepository/org/springframework/spring/2.0/spring-2.0.jar, file:/C:/dev/.m2/localrepository/org/compass/compass/1.0.0/compass-1. 0.0.jar, file:/C:/dev/.m2/localrepository/cglib/cglib/2.1_3/cglib-2.1_3.jar, file:/C:/dev/.m2/localrepository/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar, file:/C:/ dev/.m2/localrepository/javax/mail/mail/1.4/mail-1.4.jar, file:/C:/dev/.m2/localrepository/velocity/velocity/1.4/velocity-1.4.jar, file:/C:/dev/.m2/localreposit ory/axis/axis-wsdl4j/1.5.1/axis-wsdl4j-1.5.1.jar, file:/C:/dev/.m2/localrepository/commons-chain/commons-chain/1.0/commons-chain-1.0.jar, file:/C:/dev/.m2/local repository/javax/xml/jaxrpc-api/1.1/jaxrpc-api-1.1.jar, file:/C:/dev/.m2/localrepository/commons-pool/commons-pool/1.2/commons-pool-1.2.jar, file:/C:/dev/.m2/lo calrepository/log4j/log4j/1.2.14/log4j-1.2.14.jar, file:/C:/dev/.m2/localrepository/antlr/antlr/2.7.2/antlr-2.7.2.jar, file:/C:/dev/.m2/localrepository/com/orac le/ojdbc14_g/10.2.0.1.0/ojdbc14_g-10.2.0.1.0.jar, file:/C:/dev/.m2/localrepository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar, file:/C:/dev/.m2/localrepository /commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar, file:/C:/dev/.m2/localrepository/com/au
cobertura works on its own but not in reporting mvn site
Hi there, mvn cobertura:cobertura works fine, but if I include reporting plugins plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId /plugin then do 'mvn site' although the report html comes out all classes show 0% coverage. I can see from the debug the junits get run twice - probably because of surefire Any ideas? I've even compared the -X debug of both and they look the same for the cobertura plugin execution. Pete - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat-maven-plugin and tomcat:run
1) I'm trying to use the tomcat-maven-plugin all is fine using mvn tomcat:deploy however if I try the new mvn tomcat:run which I understand is supposed to be like the jetty:run, I get an error, see end of email. 2) I assume this puts a tomcat instance in target/tomcat however I notice the tomcat manager isn't enable in the target\tomcat\conf\tomcat-users.xml 3) Is there any documentation on this tomcat:run goal ? none at http://mojo.codehaus.org/tomcat-maven-plugin/ cheers Pete [INFO] [tomcat:run] [INFO] Using existing Tomcat server configuration at C:\dev\odin\odin-web\target/tomcat [INFO] Starting tomcat server [INFO] Starting Servlet Engine: Apache Tomcat/5.5.15 [INFO] XML validation disabled [ERROR] Exception starting filter ResponseOverrideFilter java.lang.ClassCastException: org.displaytag.filter.ResponseOverrideFilter at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:210) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:77) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3598) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4168) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.startup.Embedded.start(Embedded.java:821) at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:253) at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:113) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(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) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat-maven-plugin and tomcat:run
thanks Mark, fixed that. When using tomcat:run , it picks up changes to jsps ok which is great, but using the jetty:run plugin I found that I could also rebuild a serverside jar (which for a WAR would have been in web-inf/lib) using 'mvn install' it would then go into my local repo, which Jetty had on its classpath (you can see this at jetty start up - all jars come from local repository) , so when new jar gets installed, jetty picks up the change and redeploys. Where as I think the tomcat launch is using the target\myWebapp\WEB-INF\lib folder for these jars? I guess it's not possible for tomcat to pick up the jars from local repo ? it would be great if it could. If not, I need a way to refresh it JAR, I tried a 'mvn package' on the WAR project, when tomcat:run is still open in another window. I can see the jar timestamps change, but tomcat doesn't realise. So then I thought maybe I could use Tomcat manager to reload e.g. http://localhost:8080/manager/reload?path=/myWebapp but I don't think the manager is available in this Tomcat configuration? I tried changing the tomcat-users.xml , added user username=admin password= roles=tomcat,manager,admin/ then mvn tomcat:run but manager still not available Any thoughts on how to ease rapid development with Tomcat appreciated. Pete Pete On 07/02/07, Mark Hobson [EMAIL PROTECTED] wrote: Hi Pete, On 07/02/07, Pete [EMAIL PROTECTED] wrote: 1) I'm trying to use the tomcat-maven-plugin all is fine using mvn tomcat:deploy however if I try the new mvn tomcat:run which I understand is supposed to be like the jetty:run, I get an error, see end of email. Looks like your webapp is using a different version of servlet-api, hence a class cast exception when tomcat tries to cast your filter. Ensure you're using servlet-api 2.4 which tomcat 5.5 uses. 2) I assume this puts a tomcat instance in target/tomcat however I notice the tomcat manager isn't enable in the target\tomcat\conf\tomcat-users.xml Nope, tomcat manager isn't deployed using tomcat:run. Feel free to raise an issue if you need this functionality. I didn't think this was too useful since the container is rather transient. 3) Is there any documentation on this tomcat:run goal ? none at http://mojo.codehaus.org/tomcat-maven-plugin/ See: http://mojo.codehaus.org/tomcat-maven-plugin/deployment.html#Running%20a%20WAR%20project http://mojo.codehaus.org/tomcat-maven-plugin/run-mojo.html Cheers, Mark - 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: dependency graph plugin?
hello, try the mvn site. it will generate a dependency html page under target/generated-site. Patrick Moore wrote: Hi there- Is there a plugin that explodes the dependency graph so that it is possible to see why a jar is being included in the build? I have a bunch of mystery jars that I would like to eliminate, or at least know which library is trying to use them. Thanks. -Pat __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: war plugin 2.0.1 webResources pom.* filtering
Did anyone get a resolution to this ? I'm getting exactly the same error. Only solution I could find was going back to version 2.0 of war plugin On 03/07/06, SkipWalker [EMAIL PROTECTED] wrote: So my basic question is, how do I get some of my webapp files in my war project to be filtered with my pom.version value? I've done what I think I need to do, but the build appears to be executing the plugin twice or something, creating errors. There some configuration tweak that I can't figure out to get this to work. So here's what I have. I have a war project in my maven 2.0.4 multi-project build. I have a few files in src/main/webapp that I need to filter in the ${pom.version} value. This apparently was a bug with version 2.0 of the plugin ( see bug http://jira.codehaus.org/browse/MWAR-41 ). Hemce, I changed my version to the recently released 2.0.1. Also, see this thread . So, I modified my pom.xml to use to use the 2.0.1 plugin via the following configuration. plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0.1/version configuration !-- we need to filter the resources so the correct version gets into the jsp links -- webResources resource directory${basedir}/src/main/webapp/directory filteringtrue/filtering includes include**/web.xml/include include**/context.xml/include include**/*.jsp/include /includes /resource /webResources archive manifestEntries Implementation-Build${pom.version} (r${buildNumber})/Implementation-Build /manifestEntries /archive /configuration /plugin This appears to work sort of. In the build it appears to be doing the webResource filtering twice. This wouldn't be so bad, but it causes in error when the thing tries to set the Implementation-Build the second time it does the copy. Here's a snippet of the build output. It says the webResources are being copied, and then the next line it says the webResources are being copied again. This appears to be the reason why it fails. Something is causing the build to try and produce the manifest twice. [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-war-plugin:2.0.1:war' -- [DEBUG] (f) manifestEntries = {Implementation-Build=1.0-BETA (r1956)} [DEBUG] (f) archive = [EMAIL PROTECTED] [DEBUG] (f) archiveClasses = false [DEBUG] (s) classesDirectory = C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\target\classes [DEBUG] (f) filters = [] [DEBUG] (f) outputDirectory = C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\target [DEBUG] (f) primaryArtifact = true [DEBUG] (s) project = [EMAIL PROTECTED] [DEBUG] (f) warName = mywebapp-1.0-BETA [DEBUG] (s) warSourceDirectory = C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\src\main\webapp [DEBUG] (s) directory = C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www/src/main/webapp [DEBUG] (s) filtering = true [DEBUG] (s) includes = [**/web.xml, **/context.xml, **/*.jsp] [DEBUG] (f) webResources = [Lorg.apache.maven.model.Resource;@1dfd868 [DEBUG] (s) webappDirectory = C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\target\mywebapp-1.0-BETA [DEBUG] (f) workDirectory = C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\target\war\work [DEBUG] -- end configuration -- [INFO] [war:war] [INFO] Exploding webapp... [INFO] Copy webapp webResources to C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\target\mywebapp-1.0-BETA [INFO] Copy webapp webResources to C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\target\mywebapp-1.0-BETA [INFO] Assembling webapp www in C:\Builds\mywebapp\manual\work\branches\checkout\30Jun06-1.0beta\www\target\mywebapp-1.0-BETA ... [ERROR] BUILD ERROR [INFO] [INFO] Error assembling WAR Embedded error: The attribute Implementation-Build may not occur more than once in the same section [INFO] -- View this message in context: http://www.nabble.com/war-plugin-2.0.1-webResources-pom.*-filtering-tf1886910.html#a5158779 Sent from the Maven - Users forum at Nabble.com. - To
MavenProject property added by MOJO not inherited?
1) I have a MOJO that adds property to the MavenProject, using :- project.getProperties().put(myNewProperty, value); This mojo gets invoked during the parent pom's generate-resources 2) But I then find that child poms cannot see the property, even though they have the above as a parent. Are properties like this supposed to be inherited ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
maven-changes-plugin help please
Help, I'm trying to switch from the old codehaus maven-changes-plugin to the new org.apache.maven.plugins version. Previously I had my pom configured to use the old plugin during the compile phase, so that a changes-report.html could be nested inside the web app's pages. Now with the new plugin it doesn't seem to generate a report at all, is there something about the new plugin which means it will only generate during the 'site' goal ? I've tried with and without a phase, and -X doesn't show any configuration for the plugin happening at all :- plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-changes-plugin/artifactId version2.0-beta-2-SNAPSHOT/version executions execution idproduce changes html page/id !-- phasecompile/phase-- inheritedfalse/inherited configuration xmlPath${project.build.outputDirectory}/changes/changes.xml/xmlPath reportSets reportSet reports reportchanges-report/report /reports /reportSet /reportSets /configuration goals goalchanges-report/goal /goals /execution /executions /plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: profiles / ear content . how to do this?
I did this on a previous project like this :- EAR pom.xml webModule groupIdmygroup/groupId artifactIdmyartifact/artifactId contextRoot/myroot/contextRoot bundleFileNamename/bundleFileName excluded${myartifact.optional.war.excluded}/excluded /webModule then either in the parent pom.xml or in settings.xml you can define a property with a different setting per profile e.g. profile idenv_dev/id activation activeByDefaulttrue/activeByDefault /activation properties profile.nameenv_dev/profile.name myartifact.optional.war.excludedfalse/myartifact.optional.war.excluded /properties /profile profile idenv_live/id properties profile.nameenv_live/profile.name myartifact.optional.war.excludedtrue/myartifact.optional.war.excluded /properties /profile this also works for EAR javaModule and ejbModule Pete On 18/09/06, Eric Redmond [EMAIL PROTECTED] wrote: http://maven.apache.org/plugins/maven-ear-plugin/howto.html The ear plugin configuration to generate the application.xml can be different per profile. Eric On 9/18/06, Marco Mistroni [EMAIL PROTECTED] wrote: hi all, i have a usecase in which i have to deploy an ear.. if the .ear is set to production, i have to include modules 1, 2 and 3 if the .ear is set to test/qa, i have to include modules 1,2,3,4 i was wondering if having profiles could helpbut i fail to see how to achieve to include only certain modules in an .ear, unless i provide myself the application.xml for thte two different configurations has anyone any idea / tips on how to do it properly? thanks in advance and regards marco -- Eric Redmond http://codehaus.org/~eredmond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Running surefire-report goal as part of maven test goal
You need to have plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin in the build section of your POM. On 15/09/06, Manish Shah [EMAIL PROTECTED] wrote: Hi, We're maven newbies and would like to configure our surefire-report:report goal so that it always runs as part of the test goal. This would mean we wouldn't have to manually run it when a test failed. Here's the except from our pom: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId version2.2/version configuration useFilefalse/useFile suiteXmlFiles suiteXmlFiletestng.xml/suiteXmlFile /suiteXmlFiles /configuration /plugin Any ideas on what configuration we need to provide to tell this plugin to always run as part of the mvn test goal? Thanks, Manish This email is intended only for the use of the addressees named above and may be confidential or legally privileged. If you are not an addressee you must not read it and must not use any information contained in it, nor copy it, nor inform any person other than TietoEnator or the addressees of its existence or contents. If you have received this email and are not a named addressee, please delete it and notify the TietoEnator UK Technical Services Team on 0113 390 0700. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
uniqueVersion property accessible during deploy ?
Is there a way of referencing the date timestamp that is appended to artifacts during a deploy ? e.g. my_ear-1.0-20060912.160818-730.ear Can I reference something like ${uniqueVersion} ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
need my Mojo to execute a CVS status command - help
Could any of you guys help with the code I would need to put in my MOJO to execute a cvs command. The command is cvs status -v filename which isn't supported by maven-scm-providers-cvs. I see there is a AbstractCvsStatusCommand but this issues a cvs update I believe. Is there a way I can execute an arbitary CVS command using the api ? If so how ? All I really need is the result as a String so I could parse it. What I'm trying to do is determine the most recent CVS Tag, so that I could write a MOJO to get the next tag, and pass this to the scm:tag goal. output from 'cvs status -v filename' is like File: ChangeLog Status: Needs Patch Working revision: 1.3338.2.122 Repository revision:1.3338.2.152/cvs/gnome/gtk+/ChangeLog,v Sticky Tag: gtk-2-0 (branch: 1.3338.2) Sticky Date:(none) Sticky Options: (none) Existing Tags: GTK_2_0_6 (revision: 1.3338.2.147) GTK_2_0_5 (revision: 1.3338.2.120) GTK_2_0_4 (revision: 1.3338.2.115) GTK_2_0_3 (revision: 1.3338.2.68) GTK_MULTIHEAD_MERGEPOINT_19_04_02 (revision: 1.3347) gtk-2-0 (branch: 1.3338.2) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs command from mojo gives error
I am trying to use the org.codehaus.plexus.util.cli.Commandline in a mojo to run a cvs status command (which isn't supported at the mo) the command looks correct on the log, and executes fine if I cut paste into a cvs command prompt, but via CommandLineUtils.executeCommandLine( cl, consumer, stderr ); I get this , any ideas ?? :- Executing: cvs -z3 -d :pserver:[EMAIL PROTECTED]:/data/cvsroot/myproject status -v pom.xml Working directory: D:\JavaProjects\myproject\myapplication_ear Unknown file status: '='. Unknown file status: 'F'. Unexpected input, the line must be at least three characters long. Line: ''. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unexpected input, the line must be at least three characters long. Line: ''. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unknown file status: ' '. Unexpected input, the line must be at least three characters long. Line: ''. command output is null - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: incorrect war file structure
i see, then just use https://svn.apache.org/repos/asf/maven/plugins/trunk; Jeff Mutonho wrote: On 8/15/06, Pete Marvin King [EMAIL PROTECTED] wrote: There's a space between trunk and plugins on the url, the last plugin is the destination directory 1. svn co https://svn.apache.org/repos/asf/maven/plugins/trunkspaceplugins 2. cd plugins/maven-war-plugin 3. mvn install I tried that also and got the BAD Url error message as well.I'm doing this from Eclipse , using the SVN plugin Jeff Mutonho GoogleTalk : ejbengine Skype: ejbengine Registered Linux user number 366042 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: incorrect war file structure
There's a space between trunk and plugins on the url, the last plugin is the destination directory 1. svn co https://svn.apache.org/repos/asf/maven/plugins/trunkspaceplugins 2. cd plugins/maven-war-plugin 3. mvn install Jeff Mutonho wrote: On 8/13/06, Pete Marvin King [EMAIL PROTECTED] wrote: Hello Jeff, Sorry about that, can you try this 1. svn co https://svn.apache.org/repos/asf/maven/plugins/trunk plugins 2. cd plugins/maven-war-plugin 3. mvn install the steps above should do it. pete marvin Thanks Pete .Tried https://svn.apache.org/repos/asf/maven/plugins/trunk/plugins and that url seem not correct as I get the Bad URL passed to RA layer svn: URL ' https://svn.apache.org/repos/asf/maven/plugins/trunk/plugins; error. Couldn't you or someone build the 2.0.2-SNAPSHOT with the fix for altering the default path.That would be greatly appreciated. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: incorrect war file structure
Hello Jeff, Sorry about that, can you try this 1. svn co https://svn.apache.org/repos/asf/maven/plugins/trunk plugins 2. cd plugins/maven-war-plugin 3. mvn install the steps above should do it. pete marvin Jeff Mutonho wrote: On 8/9/06, Pete Marvin King [EMAIL PROTECTED] wrote: Hello Jeff, Sorry about the example, the correct one should be configuration webResources [...] resource directoryconfigurations/directory !-- override the destination directory for this resource -- targetPathWEB-INF/targetPath !-- enable filtering -- filteringtrue/filtering excludes exclude**/propertiesexclude /excludes /resource /webResources /configuration it's webResources/resource. So far I can only assure you that the targetPath configuration will only work in 2.1-SNAPSHOT. I'm not sure if the targetPath patch was applied to the 2.0 series. If you have the time you can get the source and built the latest war plugin from the trunk. --- svn co https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-war-plugin cd maven-war-plugin mvn install --- hope this helps, pete marvin I checked out the maven-war-plugin project and tried to build it by running mvn install , but got stumped by the error : D:\jeff\workspace\maven2\maven-war-plugin\maven-war-pluginmvn install [INFO] Scanning for projects... [INFO] - --- [ERROR] FATAL ERROR [INFO] - --- [INFO] Failed to resolve artifact. GroupId: org.apache.maven.plugins ArtifactId: maven-plugins Version: 2-SNAPSHOT Reason: Unable to download the artifact from any repository org.apache.maven.plugins:maven-plugins:pom:2-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] - --- [INFO] Trace org.apache.maven.reactor.MavenExecutionException: POM 'org.apache.maven.plugins: maven-plugins' not found in repository: Unable to download the artifact from any repository org.apache.maven.plugins:maven-plugins:pom:2-SNAPSHOT This makes sense since the pom.xml has : parent artifactIdmaven-plugins/artifactId groupIdorg.apache.maven.plugins/groupId version2-SNAPSHOT/version /parent Pete , what do I need to get this to build? Jeff Mutonho GoogleTalk : ejbengine Skype: ejbengine Registered Linux user number 366042 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: incorrect war file structure
Hello Jeff, Sorry about the example, the correct one should be configuration webResources [...] resource directoryconfigurations/directory !-- override the destination directory for this resource -- targetPathWEB-INF/targetPath !-- enable filtering -- filteringtrue/filtering excludes exclude**/propertiesexclude /excludes /resource /webResources /configuration it's webResources/resource. So far I can only assure you that the targetPath configuration will only work in 2.1-SNAPSHOT. I'm not sure if the targetPath patch was applied to the 2.0 series. If you have the time you can get the source and built the latest war plugin from the trunk. --- svn co https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-war-plugin cd maven-war-plugin mvn install --- btw, if you decide to use the build/resources/resource configuration make sure you use the package phase instead of directly invoking the war goal. Resource processing is not covered by the war plugin. Just do mvn package just to be sure. hope this helps, pete marvin Denis Cabasson wrote: Jeff Mutonho wrote: On 8/8/06, Denis Cabasson [EMAIL PROTECTED] wrote: Jeff Mutonho wrote: On 8/8/06, Denis Cabasson [EMAIL PROTECTED] wrote: Jeff Mutonho wrote: On 8/8/06, Stefan Magnus Landrø [EMAIL PROTECTED] wrote: Hi Jeff, properties normally go in the src\main\resources BTW, You seem to use a strange layout for your directories. Do you really want it to be that way? Read Better builds with maven for the recommended dir. structure Thats just the way the project is structured and am powerless to change it. This is eclipse WTP directory layout. You should really work the other way round: take maven's directory structure (far better), and create the eclipse descriptor with: mvn -Dwtpversion=1.0 eclipse:eclipse See http://maven.apache.org/plugins/maven-eclipse-plugin/wtp.html for more details Denis. -- View this message in context: http://www.nabble.com/incorrect-war-file-structure-tf2072468.html#a5708197 Sent from the Maven - Users forum at Nabble.com. I understand that , that would work better but I do not have the liberty to change the directory structure now to the maven structure.The war plugin in document ( http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html talk about specifying what it calls an external resource using the webResources resource directory/path-to-external-directory/directory and then under the section Overriding the default destination directory of a web resource) says it should be possible to specify what it calls an external resource and override the target directory ie the directory where you want the resources to be copied to , by specifying targetPath in my case its targetPathWEB-INF/classes/targetPath I just don't understand why I won't work. Jeff webRessources, are ressources bundled in your war archive... You should rather specify the build/ressources element in your POM to include the correct ressources, and let the maven-war-plugin include those ressources in your produced war. Something like: ... build ... resources resource directoryWebContent/JavaSource/directory excludes exclude**/*.java/exclude /excludes /resource /resources ... /build ... That should work (alternatively, you can specify includes instead of excludes tags). Denis -- View this message in context: http://www.nabble.com/incorrect-war-file-structure-tf2072468.html#a5708705 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I just noticed that the example provided on the plugin website has a resource tag nested inside another resource , as shown below : Overriding the default destination directory of a web resource By default web resources are copied to the root of the war, as shown in the previous example. To override the default destination directory, specify the target path. [...] configuration webResources resource [...] resource directoryconfigurations/directory !-- override the destination directory for this resource -- targetPathWEB-INF/targetPath !-- enable filtering -- filteringtrue/filtering excludes exclude**/propertiesexclude /excludes /resource
Re: war plugin, webResources-overriding default Location
use version 2.1-SNAPSHOT [EMAIL PROTECTED] wrote: Hi all I'm trying to override the webResources default location by adding targetPath, but this is not working form, the welogic.xml is being still copied into the Root directory, is there some thing i'm doing wrong here, please help plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0/version configuration warName${pom.artifactId}/warName webResources resource directory${basedir}/../../config/directory targetPathWEB-INF/targetPath includes includeweblogic.xml/include /includes /resource /webResources /configuration /plugin Thanks, - This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non-classpath resources filtering?
Hello, I don't know why you want to do this but the work around is to add the following to your pom : [...] build [...] plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-resources-plugin/artifactId version2.2/version /plugin /plugins resources resource !-- this is relative to your project root -- directorysourceDir/directory !-- this is relative to target/classes -- !-- this dir will land on your project root -- targetPath../../destinationDir/targetPath filteringtrue/filtering /resource [...] /resources [...] /build [...] you can add as many resource entries as you want. Hope this helps. pete marvin Adrian Shum wrote: Dear all, I am new to Maven and I have tried to find related answer but I failed. Is it possible to perform non-classpath resources filter? My application has its own application configs which I don't want to put into the JAR. Instead I want it be put in a separated directory to let users able to change directly (which I think I can achieve by using maven-assembly-plugin, right?). I'd like to use filtering to generate config files for different environments. Seems I can only filter resources under buildresources in POM. However, if resources are put there it will be jarred which is not I want. Is there any suggestion if I want to achieve this? Thanks. Best regards, Alien This email is confidential. If you are not the intended recipient, please delete it from your system and notify the sender immediately. Any unauthorized use, disclosure, dissemination or copying of this email is prohibited. Tai Fook Securities Group, its group companies and their content providers (Parties) shall not be responsible for the accuracy or completeness of this email or its attachment, if any, which could contain virus, be corrupted, destroyed, incomplete, intercepted, lost or arrive late. The Parites do not accept liability for any damage caused by this email. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Placing war resources
Hello, the targetPath configuration for webResources is only available in maven war plugin 2.1-SNAPSHOT. you need to use the latest from the trunk to avail of this feature. svn co https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-war-plugin cd maven-war-plugin mvn install hope that helps, pete marvin Laurie Harper wrote: According to the war-plugin documentation [1], I should be able to control where webapp resources are copied to using the targetPath element: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0/version configuration webResources resource filteringtrue/filtering directorysrc/main/conf/directory targetPathWEB-INF/conf/targetPath /resource /webResources /configuration /plugin but targetPath seems to be ignored; the resources end up in the webapp root, not under WEB-INF. Am I doing something wrong, or is this a bug? I'm guessing I can work around it by moving everything from src/main/conf to src/main/conf/WEB-INF/conf, but I'd rather avoid the redundant paths... Thanks, L. [1] http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-war-plugin 2.0.1 not copying xml files
hello, the src/main/resources is handled by the resource plugin, by default the resource plugin copies the contents to target/classes. =) you need to explicitly invoke the compile phase before using the war goals. check the war plugin documentation for the details : http://maven.apache.org/plugins/maven-war-plugin/usage.html pete marvin Charles Harvey III wrote: Hello. I am trying to build a war with: mvn war:exploded mvn war:inplace mvn war:war And, no matter how I configure it, only .properties files get copied from my src/main/resources directory into the webapp/WEB-INF/classes/. plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.0.1/version configuration webResources resource directorysrc/main/resources/directory targetPathWEB-INF/classes/targetPath filteringtrue/filtering includes include**/*/include /includes /resource /webResources /configuration /plugin /plugins When I set it up this way, it copes all the files from src/main/resources into the root directory of the webapp. If I don't have this plugin declaration (which I should not need because everything is in the default location), only .properties files are copied over. Is there something I am doing wrong? When I put this config in, it says: Copy webapp webResources to workspace\projectname\target\projectname-1.0 TWICE. If I leave it out, I only see it once. It doesn't say it is copying it to the WEB-INF/classes directory. Any help is much appreciated. Charlie - 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: Prevent maven from adding pom file to jar
http://maven.apache.org/guides/mini/guide-archive-configuration.html [EMAIL PROTECTED] wrote: Hi all, Is there a way of preventing maven from adding the effective pom to the generated JAR? Thanks Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - 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: Accessing the build number
Hi Luasz, 1) Is there any chance you could send me your mojo source code and descriptor files, I am quite new to MOJOs. 2) Using you MOJO how would you then access this value. I am trying to think of a way of accessing the build timestamp in a filter.properties file e.g. filter.properties ${build.timestamp} Pete On 17/07/06, Lukasz Szelag [EMAIL PROTECTED] wrote: I had a similar problem (trying to access the artifact timestamp, which includes the build number). The following is from my Mojo: /** * The project artifact. * * @parameter expression=${project.artifact} * @required * @readonly */ private Artifact artifact; and then artifact.getVersion(). Perhaps you can do it also from POM via ${project.artifact.version}. -- View this message in context: http://www.nabble.com/Accessing-the-build-number-tf1908562.html#a5361395 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: m2 multiple war files with some common code
the war plugin is also capable of war overlaying. if you declare another war as a dependency it will automatically unpack the war to your current project. =) i'm not sure if this will fit in your current development build structure but try to check it anyway. http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html pete marvin Martin Gladdish wrote: I had the same problem the other day; trying to share JSPs and config files across multiple maven2 apps. I solved it by configuring the war plugin to pull in the resources from the shared folder, following instructions here: http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html A word of warning though: the targetPath functionality hasn't even been checked in to the head of the war plugin as yet - I had to apply a patch that was attached to the jira entry and use my own local patched build of the war plugin. See http://jira.codehaus.org/browse/MWAR-54 for further details. Hope this helps On 13/07/06, Bravo, Kris [EMAIL PROTECTED] wrote: Two options then. The less desirable is to build the common war, then unpack it into the target directory of each webapps before packaging them up. You'll have to watch this because the web.xml and other files are liable to get trampled. See http://mojo.codehaus.org/dependency-maven-plugin/ and the unpack'ing goals. The other is to create an ear project for each common/webapp pair and share the session across both webapps within the ear. I'm gathering from a quick google that this is a challenge - you are up for a challenge are you? ;) kris bravo -Original Message- From: Srinivas Pavani [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 3:57 PM To: users@maven.apache.org Subject: RE: m2 multiple war files with some common code Kris, Thanks for your reply. Most likely they will not be placed in the same ear file. Yes there are common servlets and jsps that need to be shared across the apps. The question still remains how to integrate the servlets from common and module specific directories into a single WAR file. I don't think just listing it as a dependency would solve the problem, would it? -- View this message in context: http://www.nabble.com/m2-multiple-war-files-with-some-common-code-tf1939 224.html#a5315554 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
Hello, the exclude paramater of the war plugin is only meant for the webapp sources, the parameter name is a little bit vague. =) if you want to exclude certain dependencies from the war, just specify the scope as compile. only dependencies with runtime scope will be included in the war. pete marvin Markus Wolf wrote: Hi, I have a problem creating my EAR file containing a WAR and a EJB. First I setup my WAR-pom to have the EAR as provided dependency, but then it is not possible to add it to the manifests classpath. Then I read through the mailinglist and found an exclude configuration should help. But no matter how I configure my excludes they are ignored... I've checked the version of the war plugin as well and I'm using 2.0.1. Is there anything I've overlooked in my pom.xml? ... dependencies dependency groupIdde.esw.services/groupId artifactIdemediaservices-core/artifactId version1.0-SNAPSHOT/version scoperuntime/scope /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameemediaservices-web/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration excludes excludeWEB-INF/lib/*.jar/exclude /excludes archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin /plugins /build ... Any ideas? Thanks Markus Wolf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
sorry my mistake, SCOPE_RUNTIME = systemScope = false; providedScope = false; compileScope = true; runtimeScope = true; testScope = false; ---AbstractWarMojo snippet -- // TODO: utilise appropriate methods from project builder ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME ); if ( !artifact.isOptional() filter.include( artifact ) ) { String type = artifact.getType(); if ( tld.equals( type ) ) { copyFileIfModified( artifact.getFile(), new File( tldDirectory, targetFileName ) ); } else ---AbstractWarMojo snippet -- thanx for the correction mike. i need to stop assuming things. =) Mike Perham wrote: Not true. -Original Message- From: Pete Marvin King [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 11:52 AM To: Maven Users List Subject: Re: WEB-INF/lib excludes once more if you want to exclude certain dependencies from the war, just specify the scope as compile. only dependencies with runtime scope will be included in the war. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes
btw, just make sure you compile first before you invoke war:war or just use the package phase just to be sure. if you invoke war:war, it will not automatically compile the source. see the war plugin documentation for more details. Vinny wrote: yes, it is set to war On 7/7/06, Mykel Alvis [EMAIL PROTECTED] wrote: Is your packaging in the pom set to war instead of the default jar? On 7/7/06, Vinny [EMAIL PROTECTED] wrote: One additional datapoint: the files are being copied to target/classes correctly just not to target/webapp/WEB-INF/classes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disecting a webapp?
it's now documented here http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html. just ignore the warning it's obsolete, the overwriting bug is already fixed. cheers, pete marvin Stefan Hübner wrote: Hi guys, 2006/7/7, Alexandre Poitras [EMAIL PROTECTED]: Can't you create more than one war and add them to an ear archive? If it's not a valid strategy in your case than I guess you can use the dependency plugin unpack goal (http://mojo.codehaus.org/dependency-maven-plugin/) or you can use the war merging feature of Maven (don't know how it works but I know it exists). war merging feature? Is this documented somewhere out there? sounds promissing. I'm also interested in best practises on this topic, since we're producing large webapps too. having all resources in just one big module is a bit nasty. -Stefan In my case, I use the dependency plugin to unpack resources (images, css, ...) dependencies. Note those aren't limitations of Maven but of JEE since each web modules must be packaged as an individual war and of the web because there isn't any standard resources archive format. Hope it helps! On 7/6/06, Alex Shneyderman [EMAIL PROTECTED] wrote: Thanks, guys for your responses. But ... I think I was not understood correctly. Let me clarify a bit here. The problem is not so much to separate layers into modules (it seems that's what examples demonstrate), but how to break up a big web application into smaller modules. The module's boundary is not that of the layer (business, webapp, core, etc). Web application itself needs to be broken onto smaller submodules. So core would have all the templates, js and css files and will be a webapp on its own, the child module would have concrete pages that utilize those templates and styles and in combination with the core module would constitute complete sub-application of a bigger app. When I develop I would like to checkout just one module and a few modules that this module depends on. Of course I would be able to deploy this one small module (and all of its dependencies), but it will not be the site itself, just one little portion. It also makes creation of the new module easier. Just declare dependencies and create a simple WAR structure. When I am happy with the little module I worked on, I will want to deploy it to production. This is when I will have to merge all the configuration files (web.xml comes to mind) and directory structures but only on creation of the WAR no need for physical merge on the system someplace. I am not sure if this made my question any clearer :-) On 7/6/06, Tamás Cservenák [EMAIL PROTECTED] wrote: Hi Alex, a quick example for this, see here: https://is-micro.myip.hu/trac/ismicro-commons/browser/trunk/ismicro-proximity Three modules: px-core (j2ee and transport independent), px-core-maven (maven bindings for core, till no sign of webapp) and px-webapp. The module separation should be natural and/or logical -- whetever it means :) In my practice it means, produce ONLY ONE ARTIFACT, be as small and as simple as it can (but naturally keep the overall module count manageable). Maven generated site from these sources here: http://proximity.abstracthorizon.org/ ~t~ On 7/6/06, ben short [EMAIL PROTECTED] wrote: Also have a look at the better builds with maven book, there is an example in there. On 7/6/06, ben short [EMAIL PROTECTED] wrote: Create a project for each of the core module and the children. then the webapp can pull them in as dependancies. On 7/6/06, Alex Shneyderman [EMAIL PROTECTED] wrote: How does one disect a web app into many modules but deploy it as one web app? This is what I mean: We have a web application that is quite big. We can identify many modules of it. There is a few core modules, and a bunch of child modules. Practically all children are dependendent on core modules, some child modules depend on other child modules. The modularization is done in purely logical way. Meaning, we still have one maven project for the webapp. I was wondering if anyone can suggest a way to break those modules up into seprate physical modules while keeping the ability to create a unifying webapp? Is it even possible with Maven 1 or 2? -- Thanks, Alex. - 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] -- Thanks, Alex
Re: [m2] war plugin, ignores classifier in dependency
issue created : http://jira.codehaus.org/browse/MWAR-58 Robert Biernat wrote: Hi, I have a web application that I'm trying to build which has two dependencies which have exactly the same groupId, artifactId and version, however one of them has a classifier so I can distinguish between the two. When it comes to packaging up the webapp, the war plugin complains that their are duplicate jar files, renames the one which has the classifier set and excludes the other one. The missing jar prevents my web app from being able to be deployed. Obviously I can get around this issue by using a unique artifactId, however I think the war plugin should respect classifiers that have been specified in the dependencies. Thanks Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] webapp
try turning on the remote debugging capability of your sevlet container's jvm by adding the following argument on the java command line : -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8030 the jvm would block when passing these arguments, waiting for a remote debugger to connect. in your eclipse, choose Run-Debug then select Remote Java Application. click on the new button below while the Remote Java Application is selected. change the port to 8030 and on the common tab select the radio button under the display in favorite menu - debug. the projects debugging icon will now be displayed under the debug icon. make sure the project that you want to debug is selected while you are doing this. if the deployed webapp is in sync with your webapp source then stepping function would sync with the execution. the maven user list is not the best place to ask this. =) but here it is anyway..hope this helps. pete marvin christophe blin wrote: Hi, the nicely documented stuff (that I already read BTW) talks about jetty and does not mention debugging... My concern is to run the war under tomcat and/or jboss with the associated plugins in Eclipse in order to benefit from the debug perspective. Maybe there is a solution to do this with jetty ? If so, could you please provide any hints in order to switch my dev to jetty. Regards, chris Geoffrey De Smet a écrit : Download and read the free m2 book from mergere.com :) It has all stuff nicely documented christophe blin wrote: Hi, My first question is where do I put java source files in a webapp (i.e archetype = war) ? Should I create a directory src/main/java ? Or maybe I should create another module to hold the java sources ? Then, a small question but maybe difficult to answer : how can I integrate maven into eclipse for a webapp ? I find this good article [1] but it seems to be maven1 only as I do not manage to have correct dependencies when deploying into tomcat. Also, maybe someone has osme experience with the tomcat plugin (I'd prefer to avoid it since the j2ee plugin supports more platforms)? Thanks for any help, chris [1] http://www.eclipse.org/webtools/jst/components/j2ee/scenarios/MavenEclipseIntegration.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Maven2] test resources
try putting your mapping_common.hbm.xml on src/main/resources/ instead. or modify your getResourceAsStream to get the file META-INF/mapping_common.hbm.xml resources are searched on all the classpaths, normally META-INF is added to the classpath so getClass().getResourceAsStream(mapping_common.hbm.xml) would normally work if you're using a jar. But for your unit test it is not, only target/classes is added to your classpath. you need to specify the directory it is in which is META-INF. correct me if i'm wrong. =) christophe blin wrote: Hi, I am new to maven so excuse me if the questions have already been posted (I do not find a related in the archives so I think it has not been so). I am working with maven2 and hibernate. My hibernate mapping is in /src/main/resources/META-INF : mapping_common.hbm.xml First question : if I manually copy this file into /src/test/resources and I do (as stated in the docs getting started) : InputStream is = getClass().getResourceAsStream(mapping_common.hbm.xml); assert(is != null); the assertion is thrown. Am I doing something wrong or Should I configure something in the pom to use src/test/resources as the resources directory for the unit tests ? Second question : I'd like to use the same mapping file when doing unit tests. How can I configure the pom in order to perform a copy of the file just before the execution of the test goal ? Thanks and regards, chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: warSourceDirectory
perhaps you can do a war overlay, add the war to your depedency list with a scope of runtime. you might need to rename it to *.war, the war plugin uses the extension to determine if it will do a war overlay. Alexandre Poitras wrote: To those who are facing the same issue, I just submitted a patch that seems to fix the problem. Hope it helps. On 6/27/06, Alexandre Poitras [EMAIL PROTECTED] wrote: This is what I'm already doing. The problem is that the WTP .component file is not generated correctly since the files aren't placed in the war source directory. Basically, I'm just trying to unpack some css files from a resources jar files and I don't want to extract them under the src directory. On 6/27/06, Mike Perham [EMAIL PROTECTED] wrote: If you are generating them, why are you considering them source in the first place? Why not just generate them straight into target/artifactId-version? That's where everything is copied to so it can be jarred into a war. -Original Message- From: Alexandre Poitras [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 1:52 PM To: Maven Users List Subject: warSourceDirectory Why is the War plugin supporting only one war source directory instead of a list? It bothers me because I need to generate some html sources files and of course I don't want to mess with my src directory. Any hint? I think I'll try to develop a patch. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: List of Maven Archetypes?
Currently there's : - maven-archetype-j2ee-simple - maven-archetype-portlet - maven-archetype-simple - maven-archetype-site-simple - maven-archetype-webapp - maven-archetype-marmalade-mojo - maven-archetype-quickstart Sorry, I'm not sure if there's a guide for each. running mvn site:site on archetypes only generates the basic reports..no guides. command for generating projects using archetype : mvn archetype:create -DgroupId=group -DartifactId=artifact name -DarchetypeGroupId=org.apache.maven.archetype -DarchetypeArtifactId=archetype name -DarchetypeVersion=version ex. mvn archetype:create -DartifactId=test -DgroupId=org.test -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeVersion=1.0-alpha-4 try checking http://www.ibiblio.org/maven2/org/apache/maven/archetypes for the latest version of the archetypes and if you feel the urge to write a guide on how to use them, the Maven community will greatly appreciate it. =) cheers, pete marvin siegfried wrote: I'm doing a google search for maven archetypes and was expecting to find a long list of archetypes. Instead I found definitions of the term and a section on creating archetypes. Back in fall of 2005 (or was it winter 2006?) m2 did not have many archetypes yet. I was guessing by now someone would of ported all the m1 archetypes (or whatever they were called) to m2. Has this happened? I found one at http://maven.apache.org/guides/mini/guide-webapp.html and I'll try this out soon. I was specifically hoping to find an EJB, SWT, Swing and a boatload of web archetypes like tapestry, spring and other MVCs. Thanks, Siegfried - 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] problem w/ antcall in ANT-based mojo
Here's a macrodef macrodef name=macro.dbunit-update attribute name=databaseDriver / attribute name=databaseUrl / attribute name=databaseUsername / attribute name=databasePassword / attribute name=datatypeFactory / attribute name=operation / attribute name=srcDir / attribute name=filename / attribute name=file-extension / attribute name=format / !-- element name=options optional=true / -- sequential echo message=-- MACRO macro.dbunit-update --- / dbunit driver=${databaseDriver} url=${databaseUrl} userid=${databaseUsername} password=${databasePassword} datatypeFactory=${datatypeFactory} classpath refid=dbunit.classpath/ operation type=${operation} src=${srcDir}/[EMAIL PROTECTED] format=@{format}/ /dbunit /sequential /macrodef Here's invoking it target name=dbunit-update-XML depends=int.echo-properties description=Refreshes DB using data from XML file macro.dbunit-update databasedriver=${databaseDriver} databasepassword=${databasepassword} databaseurl=${databaseurl} databaseusername=${databaseusername} datatypefactory=${datatypefactory} file-extension=xml filename=${filename} format=flat operation=${operation} srcdir=${srddir} /macro.dbunit-update /target On 20/06/06, cristal [EMAIL PROTECTED] wrote: Thanks Pete, that sounds very promising. Could you also post a piece of sample code? Thanks a lot. -- View this message in context: http://www.nabble.com/-m2--problem-w--antcall-in-ANT-based-mojo-t1307160.html#a4956130 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] snapshot repository: exploding size
You can specify uniqueVersionfalse/uniqueVersion in your snapshotRepository this omits the timestamp from the jar and keeps just the latest. By the way, are snaphots working ok for all of you, we are still finding they get downloaded the first time, but if Continuum then does a 'mvn deploy' for a new version - our developers don't get the new snapshot version downloaded (unless they delete their local repo). I posted about this separately. It's driving us mad! Pete On 21/06/06, Feniks Nator [EMAIL PROTECTED] wrote: It's a pity that this is not yet supported (cleaning of snapshot repo's). I assume I can simply remove old snapshot versions. Why does Maven keep old versions anyway? If you depend on a snapshot, you depend on the latest version of the snapshot, so why keep the old versions of a snapshot? I must be missing something - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [m2] problem w/ antcall in ANT-based mojo
I got around this issue in the end by using Ant 1.6's new macrodef feature, this allows you to easily create a macro instead of a callable ant target. See http://ant.apache.org/manual/CoreTasks/macrodef.html so I put the Macrodef's in the same build file and called them where necessary. Pete On 16/06/06, cristal [EMAIL PROTECTED] wrote: The only work-around to this issue is to add a line of ant script in the target before you invoke the antcalltask, like this copy file=/my/plugin/path/mymojo.build.xml tofile=/my/plugin/path/build.xml / so that there is always a build.xml available in the directory by the time antcall is executed. But you will always need to remember the mymojo.build.xml is the real one for you to work with when you modify the mojo plugin. It's ugly but works for me. -- View this message in context: http://www.nabble.com/-m2--problem-w--antcall-in-ANT-based-mojo-t1307160.html#a4905731 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [M2] Ghost dependencies
Hello, 2.1-SNAPSHOT of the war plugin only includes dependencies with a runtime scope for exploded,inplace and war goals. I think by default an artifact has a compile scope unless you modify the default scope then it shouldn't be included in the war. pete marvin Markus Reinhardt wrote: Hi Sebastien, I don't know how the war packaging plugin handles scoperuntime/scope dependencies. I use no scope at all for required JARs and scopeprovided/scope for those, which should not be packaged inside the WAR file i.e. are available on your Container. How do you build you WAR? Markus Am Freitag, den 02.06.2006, 07:33 +0200 schrieb Sebastien Arbogast: I have trouble understanding the new dependency mechanism. I added a dependency like this in my root pom dependencyManagament section: dependency groupIdjakarta-regexp/groupId artifactIdjakarta-regexp/artifactId version1.4/version scoperuntime/scope /dependency It's not the only one, I've added several ones like that and they all appear in the resulting webapp WEB-INF/lib directory, except for this one. There is no exclude on jakarta-regexp in other dependencies, and I can't find what's wrong. Any idea?
Re: maven Website - I'm struggling getting the information I seek
hello, try to download the maven book at www.mergere.com. There's a link on the mid-right for the book, Better Builds With Maven. There's a lot of information there that you might find useful. hope this helps...=) cheers, pete marvin Stefan Arentz wrote: On 5/30/06, Marc Weber [EMAIL PROTECTED] wrote: Hello I'm using mvn for 2 month now and I'm till struggling finding the finding the documentation on the maven.apache.org website. Same here. I started using Maven 2 about a month ago. It has been *extremely* painful because of the complete chaos that is called documentation. Figuring out how plugins work is impossible because the documentation is either missing or halve-baked. I have more success with asking things on the list here, or searching the list archives. Or even reading source code of plugins. It is a pleasure to use Maven for my project, but it was all but a simple start. I think the Maven team should set some standards for documentation and simply ask every plugin developer to take care of it or else simply drop the plugin. S. - 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: What does dependentWarExcludes do???
it's use for war overlays, for excluding dependent war files from being included in the exploded war. this is use in war:exploded and war:inplace btw, only the artifacts with a runtime scope is included in the war. when using war:war pete marvin Roland Asmann wrote: Part of the problem was solved, but one question remains: What does dependentWarExcludes in the war-plugin do??? Roland On Monday 29 May 2006 15:52, Roland Asmann wrote: Okay, so I figured it out! The provided-scope DOES work, but I had an exclusion defined somewhere else, which for some reason removed my declaration of commons-logging... I've noticed, because I was checking a little more thorough and found that the version I set to provided (and also tried to exclude) was 1.0.3 and the included version was 1.0.4! So, I removed the exclusion and now the provided-scope does what it is supposed to do. Tried it several times, to make sure no random-behaviour remained. Roland On Monday 29 May 2006 15:24, Roland Asmann wrote: Unfortunately yes. Per default I run it 'mvn clean install'. On Monday 29 May 2006 15:20, Kees de Kooter wrote: Does it also happen after you do an mvn clean? On 5/29/06, Roland Asmann [EMAIL PROTECTED] wrote: Yes, I know how to do that. But like I said, it doesn't always work the way it is supposed to! I have no clue as to why this wouldn't work, might be some sort of bug in Maven... Roland On Monday 29 May 2006 15:14, Kees de Kooter wrote: Just to make sure you understood my answer, this is how we do it: dependency groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId version1.0.4/version scopeprovided/scope /dependency It works for us, using maven 2.0.4 On 5/29/06, Roland Asmann [EMAIL PROTECTED] wrote: That only seems to work at random! For some strange reason 3 out of 5 builds are correct when the scope is set, but those other 2 builds still have the JAR! I have no problem with building a couple of times more, but for automated testing this is disastrous! Roland On Monday 29 May 2006 15:09, Kees de Kooter wrote: Give it scope provided. On 5/29/06, Roland Asmann [EMAIL PROTECTED] wrote: Hi, I am building a WAR, in which I would like to remove some JAR's that come up transitively. I've tried to configure my war-plugin like this: plugin artifactIdmaven-war-plugin/artifactId configuration archive compressfalse/compress manifest addClasspathtrue/addClasspath /manifest /archive dependentWarExcludescommons-logging/dependentWarExcludes /configuration /plugin But this doesn't seem to work. Could anybody tell me how to exclude commons-logging from the WAR? And also, could someone explain what this 'dependentWarExcludes' does?? Thanks, Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cobertura under solaris
I agree with wayne fay there's usually a default jdk installed on Solaris. try to verify your JAVA_HOME and PATH just to be sure. Wayne Fay wrote: You must have an older JDK installed on your server. Run java -fullversion on both machines and upgrade the Solaris JDK to the version you're running on Windows. Wayne On 5/25/06, vadimsh [EMAIL PROTECTED] wrote: Hi, I use m2.0.4 and cobertura 2.0 for report generation. It works fine under windows , but under solaris i get follow error [INFO] [cobertura:instrument] [INFO] Cobertura 1.7 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file Instrumenting 30 classes to ../target/generated-classes/cobertura [ERROR] Exception in thread main java.lang.NoClassDefFoundError: java/util/TimerTask at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass0(Compiled Code) at java.lang.ClassLoader.defineClass(Compiled Code) at java.security.SecureClassLoader.defineClass(Compiled Code) at java.net.URLClassLoader.defineClass(Compiled Code) at java.net.URLClassLoader.access$1(Compiled Code) at java.net.URLClassLoader$1.run(Compiled Code) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivileged(Compiled Code) at java.net.URLClassLoader.findClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at sun.misc.Launcher$AppClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClass(Compiled Code) at java.lang.ClassLoader.loadClassInternal(Compiled Code) at java.lang.Class.getFields0(Native Method) at java.lang.Class.getFields0(Compiled Code) at java.lang.Class.getDeclaredFields(Compiled Code) at java.io.ObjectStreamClass$1.run(Compiled Code) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.init(ObjectStreamClass.java:259) at java.io.ObjectStreamClass.createLocalDescriptor(ObjectStreamClass.java:138) at java.io.ObjectStreamClass.lookupInternal(ObjectStreamClass.java:84) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:274) at net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler.saveCoverageData(CoverageDataFileHandler.java:170) at net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler.saveCoverageData(CoverageDataFileHandler.java:136) at net.sourceforge.cobertura.instrument.Main.parseArguments(Compiled Code) at net.sourceforge.cobertura.instrument.Main.main(Main.java:462) When i check generated-classes/cobertura directory i see that part of the classes were instrumented but others don't exist. This problem is not of one specific module but repits in all of them . Any help appreciated, thanks a lot ! -- View this message in context: http://www.nabble.com/Cobertura+under+solaris-t1680318.html#a4556741 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: urgent - downloading of snapshot not working, aaaargh!
Just bumping this up the list, as this is still an issue for us. On 18/05/06, Alexandre Poitras [EMAIL PROTECTED] wrote: Also try to delete the metadata file in your local repository, I don't know why but it has fixed this kind of trouble for me in the past. I agree with you, snapshots handling seems weird lately... Maybe you're right and this is a regression bug of Maven 2.0.4. On 5/18/06, Alexandre Poitras [EMAIL PROTECTED] wrote: Weird, when you use the -U option on the command line, does it work? On 5/18/06, Pete [EMAIL PROTECTED] wrote: I have just tried a simple new project (with no parent). Did a mvn deploy on this. Then set up a new simple jar project and declared a dependency to above. But again the newly deploy snapshots don't get downloaded (not after the initial download) Are snapshots working for anyone ? On 18/05/06, Jörg Schaible [EMAIL PROTECTED] wrote: Hi Pete, Pete wrote on Thursday, May 18, 2006 9:51 AM: Jorg, Are you thinking that this has regressed then ? As I've successfully used maven 2.0.0 and 2.0.1 with deploying 1.0-SNAPSHOTS successfully ? Can't say, we started serious work with 2.0.4. - Jörg [snip] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: urgent - downloading of snapshot not working, aaaargh!
Jorg, Are you thinking that this has regressed then ? As I've successfully used maven 2.0.0 and 2.0.1 with deploying 1.0-SNAPSHOTS successfully ? cheers Pete On 17/05/06, Jörg Schaible [EMAIL PROTECTED] wrote: Hi Pete, Pete wrote on Wednesday, May 17, 2006 5:52 PM: Jörg, thanks for your reply, but we aren't using versionSNAPSHOT/version we are using version1.0-SNAPSHOT/version on all our artifacts (some of them inherit this from the parent's version though) So I don't think the JIRA applies here ? SNAPSHOT is SNAPSHOT - independent of a version prefix! But you may add your observation about the refreshed metadata.xml. This might be a good hint for the developers. - Jörg - 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: urgent - downloading of snapshot not working, aaaargh!
I have just tried a simple new project (with no parent). Did a mvn deploy on this. Then set up a new simple jar project and declared a dependency to above. But again the newly deploy snapshots don't get downloaded (not after the initial download) Are snapshots working for anyone ? On 18/05/06, Jörg Schaible [EMAIL PROTECTED] wrote: Hi Pete, Pete wrote on Thursday, May 18, 2006 9:51 AM: Jorg, Are you thinking that this has regressed then ? As I've successfully used maven 2.0.0 and 2.0.1 with deploying 1.0-SNAPSHOTS successfully ? Can't say, we started serious work with 2.0.4. - Jörg [snip] - 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]
urgent - downloading of snapshot not working, aaaargh!
Maven 2.0.4. We have a common jar Maven Project call 'infra_Common', but even though it deploys, it won't download to developer workstations after a 'mvn deploy' We have Continuum building deploying this project as 1.0-SNAPSHOT, however the snapshot jar only seems to get downloaded from our Company Repository if a developer's localRepository is empty (i.e the first time only). Once the jar is in a developer's localRepository if it is then changed by someone else and re-deployed using mvn deploy (either by hand or by Continuum) it won't download again. Maven will continue to use the locally installed snapshot version. This is driving us mad, as it makes a mockery of binary dependancies and Continuous builds. What I do notice is that Maven goes off and DOES download the metadata xml file maven-metadata-remote_rdfgroup.xml (where the suffix appears to be our company repository name remote_rdfgroup) so the build number in the local repository increments (as the new file is xml downloaded) but it doesn't download the jar !!! What's driving me mad is that I have had this working at other development sites, with no problems at all. I have tried changing the updatePolicy to always, in the project that is dependant on the common jar. e.g. repository idremote_rdfgroup/id nameRDFGroup Remote Repository/name urlfile:///\\x\maven2/url layoutdefault/layout snapshots enabledtrue/enabled updatePolicyalways/updatePolicy /snapshots /repository sequence of events :- 1) localrepository maven-metadata-remote_rdfgroup.xml before a build :- ?xml version=1.0 encoding=UTF-8?metadata groupIdrdf.infra/groupId artifactIdinfra_Common/artifactId version1.0-SNAPSHOT/version versioning snapshot buildNumber23/buildNumber /snapshot lastUpdated20060517141954/lastUpdated /versioning /metadata i.e. timestamp 14:19 pm 2) Central Company Repository (rdfgroup) maven-metadata.xml ?xml version=1.0 encoding=UTF-8?metadata groupIdrdf.infra/groupId artifactIdinfra_Common/artifactId version1.0-SNAPSHOT/version versioning snapshot buildNumber24/buildNumber /snapshot lastUpdated20060517143018/lastUpdated /versioning /metadata i.e. timestamp 14:30 pm 3) then run a mvn install on the dependant project localrepo - maven-metadata-remote_rdfgroup.xml ?xml version=1.0 encoding=UTF-8?metadata groupIdrdf.infra/groupId artifactIdinfra_Common/artifactId version1.0-SNAPSHOT/version versioning snapshot buildNumber24/buildNumber localCopytrue/localCopy /snapshot lastUpdated20060517143018/lastUpdated /versioning /metadata i.e. timestamp changed to 14:30 pm but only the xml changed, jar not downloaded. console output :- [INFO] snapshot rdf.infra:infra_Common:1.0-SNAPSHOT: checking for updates from remote_rdfgroup [DEBUG] Skipping disabled repository central [DEBUG] infra_Common: using locally installed snapshot [DEBUG] Retrieving parent-POM: rdf.infra:mform_infrastructure::1.0-SNAPSHOT for project: rdf.infra:infra_Common:jar:1.0-SNAPSHOT from the repository. finally here's the infra_common parent pom distributionManagement repository idremote_rdfgroup/id uniqueVersionfalse/uniqueVersion namerdfgroup_remote_repository Repository/name urlfile:///\\x\maven2/url /repository snapshotRepository idremote_rdfgroup/id uniqueVersionfalse/uniqueVersion urlfile:///\\xxx\maven2/url /snapshotRepository /distributionManagement - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: urgent - downloading of snapshot not working, aaaargh!
Jörg, thanks for your reply, but we aren't using versionSNAPSHOT/version we are using version1.0-SNAPSHOT/version on all our artifacts (some of them inherit this from the parent's version though) So I don't think the JIRA applies here ? Pete On 17/05/06, Jörg Schaible [EMAIL PROTECTED] wrote: Pete wrote on Wednesday, May 17, 2006 4:56 PM: Maven 2.0.4. We have a common jar Maven Project call 'infra_Common', but even though it deploys, it won't download to developer workstations after a 'mvn deploy' We have Continuum building deploying this project as 1.0-SNAPSHOT, however the snapshot jar only seems to get downloaded from our Company Repository if a developer's localRepository is empty (i.e the first time only). Once the jar is in a developer's localRepository if it is then changed by someone else and re-deployed using mvn deploy (either by hand or by Continuum) it won't download again. Maven will continue to use the locally installed snapshot version. [snip] but only the xml changed, jar not downloaded. console output :- [INFO] snapshot rdf.infra:infra_Common:1.0-SNAPSHOT: checking for updates from remote_rdfgroup [DEBUG] Skipping disabled repository central [DEBUG] infra_Common: using locally installed snapshot [DEBUG] Retrieving parent-POM: rdf.infra:mform_infrastructure::1.0-SNAPSHOT for project: rdf.infra:infra_Common:jar:1.0-SNAPSHOT from the repository. finally here's the infra_common parent pom distributionManagement repository idremote_rdfgroup/id uniqueVersionfalse/uniqueVersion namerdfgroup_remote_repository Repository/name urlfile:///\\x\maven2/url /repository snapshotRepository idremote_rdfgroup/id uniqueVersionfalse/uniqueVersion urlfile:///\\xxx\maven2/url /snapshotRepository /distributionManagement Vote here: http://jira.codehaus.org/browse/MNG-2289 - Jörg - 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: War plugin and filtering webapp files
what war plugin version are you currently using? Julian Wood wrote: On 15-May-06, at 1:51 PM, Julian Wood wrote: PS. I do regularly use the trick where you configure the war plugin to use a resources directory which was the target of a regular resource filtering process, and this works well, but adds a lot of ambiguity to the pom. Hmm, I've just noticed that this trick seems to have broken with the latest war plugin. I'm not getting filtering on any of my old projects which employ this technique. It depends on: plugin artifactIdmaven-war-plugin/artifactId executions execution goals goalwar/goal /goals configuration warSourceDirectory${project.build.directory}/filtered-webapp-resources/warSourceDirectory /configuration /execution /executions /plugin where you've filtered resources as normal to the filtered-webapp-resources dir. That part still works of course, but the maven-war-plugin now seems to ignore it's source directory and figure out its resources differently. I would normally think this was okay, since it forces you to upgrade to a more transparent method of filtering (though there are still problems with that), but now that I think about it, none of my released (tagged) builds will build properly anymore, which seems like a bad thing. J -- Julian Wood [EMAIL PROTECTED] Software Engineer Teaching Learning Centre University of Calgary http://tlc.ucalgary.ca - 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] problem w/ antcall in ANT-based mojo
Did anyone reslove this issue ? This is a major flaw with the ant-based mojo. Wayne is correct in that if you place a build.xml containing the antcall targets it works, BUT this build.xml has to be in the current directory. Therefore I cannot create a reusable ant-based plugin, because everywhere I need to use it I have to have a build.xml in the current directory ! (containing these internal helper targets) Pete On 21/03/06, Adrian Herscu [EMAIL PROTECTED] wrote: Wayne, thanks for your reply. I will try your idea now. Wayne Fay wrote: When you create the my/project/path/build.xml file and add the task to that file, does the antcall function work as you expected? Not saying this is the proper solution, just trying to help figure it out... Wayne On 3/19/06, Adrian Herscu [EMAIL PROTECTED] wrote: Hi all, When using antcall in an ANT-based mojo the build fails with [ERROR] BUILD ERROR [INFO] - --- [INFO] Failed to execute: Executing Ant script: /my/plugin/path/mymojo.build.xml [my-target]: Failed to execute. my/project/path/build.xml (The system cannot find the file s pecified) (of course in my project dir. there is no build.xml) ANT's documentation (http://ant.apache.org/manual/CoreTasks/antcall.html) says that antcall invokes targets in the same build file, namely in mymojo.build.xml -- so why it tries to find build.xml in project's directory? Thanks for any hint, Adrian. - 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: EJB Client Jar Problem
if you don't provide excludes, then the default excludes will override the includes if both contains the same pattern. for the meantime try overriding the exclusion rules / assigning your own values default excludes: **/*Bean.class **/*CMP.class **/*package.html pete marvin [EMAIL PROTECTED] wrote: Well i tried with 2.1 ejb plugin noticed that client includes works fine but when i tried to include *Session.class its not doing that i think by default its filtering Session.class, i reopened the issue with Jira Thanks, Raghu Pete Marvin King [EMAIL PROTECTED] 05/04/2006 04:54 AM Please respond to Maven Users List To: Maven Users List users@maven.apache.org cc: Subject:Re: EJB Client Jar Problem verified, it's already fixed on version 2.1 of the plugin clientExclude doesn't work on version 2.0. Pete Marvin King wrote: include and exclude works fine in the unit test. can you try getting the latest version. =) btw, if you don't specify client exclusion it will automatically exclude the following : **/*Bean.class **/*CMP.class **/*package.html pete marvin [EMAIL PROTECTED] wrote: It sounds like an bug I created a bug in jira for this http://jira.codehaus.org/browse/MEJB-12 Thanks, Raghu Pete [EMAIL PROTECTED] 05/03/2006 04:43 PM Please respond to Maven Users List To: Maven Users List users@maven.apache.org cc: Subject:Re: EJB Client Jar Problem I had the same problem so would be interested if anyone can help ? On 02/05/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi,, I'm trying to create ejb client from ejb project this is what i have in my pom plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient clientExcludes clientExclude**/Session*/clientExclude /clientExcludes clientIncludes clientInclude**/Shop*/clientInclude /clientIncludes archive manifest addClasspathtrue/addClasspath /manifest manifestEntries Build-Environment${build.env}/Build-Environment /manifestEntries /archive /configuration /plugin it is creating ejb-client jar but it just includes almost all class files from the ejb.jar files, and has no effect on clientExcludes or clientInclude either i specify both of them or only one of them Has anyone made it working something like this please advise?? Thanks, Raghu - 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: Deployment of war file using JBOSS
Use the JBoss plugin http://mojo.codehaus.org/jboss-maven-plugin/harddeploy-mojo.html this copies the war/ear file to the jboss deploy On 03/05/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The simplest way would be to copy the war to the jboss deploy directory. If your Jboss server is on the same server as your build machines you can just do an outputDirectory / to your jboss deploy directory. plugin artifactIdmaven-war-plugin/artifactId configuration warSourceDirectory${basedir}/Web//warSourceDirectory webXml${basedir}/Web/WEB-INF/web.xml/webXml * outputDirectory${war.deploy}/outputDirectory* /configuration /plugin On 5/3/06, Marco Mistroni [EMAIL PROTECTED] wrote: Hello, easy way to copy your file with maven2 is that you write an antrun 'task' in your pom.xml i hth marco On 4/28/06, Vincent Massol [EMAIL PROTECTED] wrote: Anshuman, BTW you didn't answer my question: It would be nice to understand why you are confused as this is not good and I'd like to improve the site as much as possible. Let us know and also please do not hesitate to use the Cargo mailing list (http://archive.codehaus.org/cargo/) as Cargo is not a project hosted by the Maven team. Could you please let me know what's confusing and how we could improve it please? Thanks -Vincent -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED] Sent: vendredi 28 avril 2006 08:50 To: 'Maven Users List' Subject: RE: Deployment of war file using JBOSS Hi Anshuman, -Original Message- From: Anshuman Srivastava [mailto:[EMAIL PROTECTED] Sent: vendredi 28 avril 2006 06:37 To: Maven Users List Subject: Re: Deployment of war file using JBOSS Hi Vincent Thanks for your concern.My problem is that I have already installed jboss-4.0.4 so I dont need to install it from a zip file.Where do I need to put this entry -- configuration !-- Container configuration -- container containerIdjboss4x/containerId homec:/boss-4.0.4/home /container !-- Deployer configuration -- deployer typelocal/type deployables deployable groupIdactive.DMS/groupId artifactIdDMS/artifactId typewar/type properties context/context /properties pingURL/pingURL /deployable /deployables /deployer /configuration I tried to put it after /build,before build, between build and /build but everytime it is giving me error that -Reason: Parse error reading POM. Reason: Unrecognised tag: 'configuration' (position: START_TAG seen .../dependencies\r\n\t configuration... @163:18) I believe that i need to put some plugin entry for jboss-4.0.4and distribution management section for deployment. Nope. You're configuring the cargo plugin and thusn, as usual, you need to put that plugin config in build as shown on the link I gave you: http://cargo.codehaus.org/Maven2+plugin :-) [snip] -Vincent ___ Nouveau : téléphonez moins cher avec Yahoo! Messenger. Appelez le monde entier à partir de 0,012 €/minute ! Téléchargez sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EJB Client Jar Problem
I had the same problem so would be interested if anyone can help ? On 02/05/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi,, I'm trying to create ejb client from ejb project this is what i have in my pom plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient clientExcludes clientExclude**/Session*/clientExclude /clientExcludes clientIncludes clientInclude**/Shop*/clientInclude /clientIncludes archive manifest addClasspathtrue/addClasspath /manifest manifestEntries Build-Environment${build.env}/Build-Environment /manifestEntries /archive /configuration /plugin it is creating ejb-client jar but it just includes almost all class files from the ejb.jar files, and has no effect on clientExcludes or clientInclude either i specify both of them or only one of them Has anyone made it working something like this please advise?? Thanks, Raghu
Re: EJB Client Jar Problem
include and exclude works fine in the unit test. can you try getting the latest version. =) btw, if you don't specify client exclusion it will automatically exclude the following : **/*Bean.class **/*CMP.class **/*package.html pete marvin [EMAIL PROTECTED] wrote: It sounds like an bug I created a bug in jira for this http://jira.codehaus.org/browse/MEJB-12 Thanks, Raghu Pete [EMAIL PROTECTED] 05/03/2006 04:43 PM Please respond to Maven Users List To: Maven Users List users@maven.apache.org cc: Subject:Re: EJB Client Jar Problem I had the same problem so would be interested if anyone can help ? On 02/05/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi,, I'm trying to create ejb client from ejb project this is what i have in my pom plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient clientExcludes clientExclude**/Session*/clientExclude /clientExcludes clientIncludes clientInclude**/Shop*/clientInclude /clientIncludes archive manifest addClasspathtrue/addClasspath /manifest manifestEntries Build-Environment${build.env}/Build-Environment /manifestEntries /archive /configuration /plugin it is creating ejb-client jar but it just includes almost all class files from the ejb.jar files, and has no effect on clientExcludes or clientInclude either i specify both of them or only one of them Has anyone made it working something like this please advise?? Thanks, Raghu
Re: EJB Client Jar Problem
verified, it's already fixed on version 2.1 of the plugin clientExclude doesn't work on version 2.0. Pete Marvin King wrote: include and exclude works fine in the unit test. can you try getting the latest version. =) btw, if you don't specify client exclusion it will automatically exclude the following : **/*Bean.class **/*CMP.class **/*package.html pete marvin [EMAIL PROTECTED] wrote: It sounds like an bug I created a bug in jira for this http://jira.codehaus.org/browse/MEJB-12 Thanks, Raghu Pete [EMAIL PROTECTED] 05/03/2006 04:43 PM Please respond to Maven Users List To: Maven Users List users@maven.apache.org cc: Subject:Re: EJB Client Jar Problem I had the same problem so would be interested if anyone can help ? On 02/05/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi,, I'm trying to create ejb client from ejb project this is what i have in my pom plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-ejb-plugin/artifactId configuration generateClienttrue/generateClient clientExcludes clientExclude**/Session*/clientExclude /clientExcludes clientIncludes clientInclude**/Shop*/clientInclude /clientIncludes archive manifest addClasspathtrue/addClasspath /manifest manifestEntries Build-Environment${build.env}/Build-Environment /manifestEntries /archive /configuration /plugin it is creating ejb-client jar but it just includes almost all class files from the ejb.jar files, and has no effect on clientExcludes or clientInclude either i specify both of them or only one of them Has anyone made it working something like this please advise?? Thanks, Raghu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven 2: war plugin excludes doc wrong?
both are correct, wf's example and the comma separated values wf's example is supported during assigning of values to the parameter and the csv in the war plugin code itself. you can even mix and match, still need to verify this. =) pete marvin Wayne Fay wrote: Generally, the new way of handling these kinds of multiple excludes would be with a nested exclude ie: configuration excludes exclude.../exclude exclude.../exclude /excludes Previously some plugins were using the comma-separator for multiple values, some were using nested children, and some were doing other things entirely. Now it seems the standard is to use nested children elements. Give this a try? I have no idea if this will work in the released war plugin, so you might need to pull a snapshot or even build from SVN, but this should be the right way to do it going forward, unless of course the plugin documentation specifies otherwise... Wayne On 5/3/06, Ken Arnold [EMAIL PROTECTED] wrote: When I read the configuration doc for war:war, it says: excludes (Optional) The comma separated list of tokens to exclude from the WAR. Except it doesn't seem to work like that. I'm trying to use plugin artifactIdmaven-war-plugin/artifactId configuration excludes**/*.fla,**/*.as/excludes /configuration /plugin In this incarnation nothing is excluded. I also have tried replacing the comma with a space. When I say excludes**/*.fla/excludes Then the expected files are included, but that's only have the game. I can go through the several other incarnations I've tried, but I suspect it would be merely tiresome to the reader. Is this a bug, known or otherwise? Or am I missing something so obvious I can't see it? Ken P.S. I got into this because I was working with Flash whose input files (.fla and .as) want to live with their various configuration files (mostly .xml). I had tried to set up src/main/flash, but then I could get resources from there *and* from src/main/webapp into the top level of the war. That was my preferred model, but the war plugin seems tightly wedded to the single input directory model. Which is well and good, but this required me to merge all the flash stuff into webapp so I could do flash development with the configuration files that would end up in the war, and then I got to the exclusion problem above. This is mostly just context, but if someone has another way to solve the original issue I'm open to suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-antrun-plugin - if issue
I am using Antrun with antcontrib if's as follows :- configuration tasks taskdef resource=net/sf/antcontrib/antcontrib.properties classpath pathelement location=../../src/ant/lib/optional.jar/ pathelement location=../../src/ant/lib/ant-contrib-1-0b1.jar/ /classpath /taskdef if . this works fine. On 01/05/06, Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) [EMAIL PROTECTED] wrote: I did try that. Copied the ant-contrib jar to my local repository and added the dependency. But still didn't work :-( Same error msg that task if cannot be found. Thanks -Jagan -Original Message- From: Daniel Kulp [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 5:37 AM To: users@maven.apache.org Cc: Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) Subject: Re: maven-antrun-plugin - if issue You could try using the antcontrib stuff from: http://ant-contrib.sourceforge.net/tasks/tasks/index.html There is an if task, etcI don't think it's available on ibiblio, so you would either need to put it in your own repository or file the right jira issue to get it added. Dan On Monday 01 May 2006 06:51, Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: I have some ant tasks which needs to be executed only if packaging is ejb. But don't want to repeat this code in all ejb POMs. So thought of adding this to a parent POM, which all other modules (many components- ejbs, wars, jars, ears, etc) inherit. So in order to make sure that this gets executed only for ejb projects, I want to check, tasks if equals arg1=${project.packaging} arg2=pom / then ant tasks details... /then /if Does this makes sense ? -Jagan -Original Message- From: Kenney Westerhof [mailto:[EMAIL PROTECTED] Sent: Monday, May 01, 2006 2:42 AM To: Maven Users List Subject: Re: maven-antrun-plugin - if issue On Mon, 1 May 2006, Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco) wrote: Can you give me an example of what you're doing? A POM snippet for example? It's true that tasks if=... unless=... does not work. It's on my todo list. -- Kenney Hi, ANT if condition doesn't seem to work while using maven-antrun-plugin. I have added the ant-contrib dependency. Could someone please let me know what may be the issue. Please send me a sample code if you have any. Thanks -Jagan -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- J. Daniel Kulp [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
won't accept activation jar
I am a long time Maven 1.0 user making my first transition to a 2.0 project For whatever reason, my javax.activation jar won't be seen. Everything googled points to the same thing that apparently others have had happen, first you get this error Missing: -- 1) javax.activation:activation:jar:1.0.2 which brings you this suggestion: Try downloading the file manually from: http://java.sun.com/products/javabeans/glasgow/jaf.html Then, install it using the command: mvn install:install-file -DgroupId=javax.activation -DartifactId=activation \ -Dversion=1.0.2 -Dpackaging=jar -Dfile=/path/to/file But what the ??? When I attempt this mvn install, I get this access denied error on a w2k box ?? Huh ??? [INFO] Error installing artifact 'javax.activation:activation:jar': Error installing artifact: C:\blah\workspace\my-app (Access is denied) I have gone over everything meticulously, logged a full half a day on this, and it does not appear to be repeatable on a buddy's linux box, using exactly same stuff. Suggestions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: won't accept activation jar
Send us your full command from DOS and perhaps we can help. Thanks Wayne. First, this is the dependency that blows up. dependency groupIdjavax.activation/groupId artifactIdactivation/artifactId version1.0.2/version /dependency To match that I have the standard folder configuration I have used for a year or two repository -javax.activation --jars ---activation-1.0.2.jar [Since this didn't work, I had my buddy email his exact folder configuration from his linux box that does work, and pasted that in with the pom and all and it resulted in exactly the same error] I also tried the apparently newer setup that goes like repository -javax.activation --activation ---1.0.2 activation-1.0.2.jar But this one had exactly same results Then, here is my command shell history using cygwin shell, but I have also run it with identical results in dos shell $ mvn compile [INFO] Scanning for projects... [INFO] [INFO] Building Maven Quick Start Archetype [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [WARNING] Artifact junit:junit:jar:3.8.1:test retains local scope 'test' overriding broader scope 'compile' given by a dependency. If this is not intended, modify or remove the local scope. Downloading: http://repo1.maven.org/maven2/javax/activation/activation/1.0.2/activation-1. 0.2.jar [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) javax.activation:activation:jar:1.0.2 Try downloading the file manually from: http://java.sun.com/products/javabeans/glasgow/jaf.html Then, install it using the command: mvn install:install-file -DgroupId=javax.activation -DartifactId=activation \ -Dversion=1.0.2 -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) com.mycompany.app:my-app:jar:1.0-SNAPSHOT 2) javax.activation:activation:jar:1.0.2 -- 1 required artifact is missing. for artifact: com.mycompany.app:my-app:jar:1.0-SNAPSHOT from the specified remote repositories: central (http://repo1.maven.org/maven2) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 6 seconds [INFO] Finished at: Thu Mar 30 11:25:24 CST 2006 [INFO] Final Memory: 2M/5M [INFO] OK, so I try to follow those instructions $ mvn install:install-file -DgroupId=javax.activation -DartifactId=activation -Dversion= 1.0.2 -Dpackaging=jar -Dfile=/ [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'install'. [INFO] [INFO] Building Maven Quick Start Archetype [INFO]task-segment: [install:install-file] (aggregator-style) [INFO] [INFO] [install:install-file] [INFO] Installing c:\blah\workspace\my-app to \maven\repository\javax\activation\activ ation\1.0.2\activation-1.0.2.jar [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Error installing artifact 'javax.activation:activation:jar': Error installing artif act: c:\semantra\workspace\my-app (Access is denied) [INFO] [INFO] For more information, run Maven with the -e switch [INFO] [INFO] Total time: 3 seconds [INFO] Finished at: Thu Mar 30 11:27:33 CST 2006 [INFO] Final Memory: 1M/3M [INFO] None of my other jars are freaking out, all are acting very normal and going in fine Wayne On 3/30/06, Pete Carapetyan [EMAIL PROTECTED] wrote: I am a long time Maven 1.0 user making my first transition to a 2.0 project For whatever reason, my javax.activation jar won't be seen. Everything googled points to the same thing that apparently others have had happen, first you get this error Missing: -- 1) javax.activation:activation:jar:1.0.2 which brings you this suggestion: Try downloading the file manually from: http://java.sun.com/products/javabeans/glasgow/jaf.html Then, install it using the command
Re: won't accept activation jar
BINGO ! Huge assist, thank you sir. That's exactly why I wanted the full command... $ mvn install:install-file -DgroupId=javax.activation -DartifactId=activation -Dversion= 1.0.2 -Dpackaging=jar -Dfile=/ This should be: -Dfile=/activation-1.0.2.jar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to generate html test reports with maven-surefire-plugin
You don't have to do a full site goal you can just do mvn sure-report:report and you'll get the HTML report alone in the target/site directory. On 27/03/06, Venkatagopalaraju [EMAIL PROTECTED] wrote: Thank youI am able to generate surefire-report in html format by using this mvn site command. Thanks Regards Gopal - Original Message - From: Wayne Fay [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Sent: Friday, March 24, 2006 10:01 PM Subject: Re: how to generate html test reports with maven-surefire-plugin Run mvn site to generate this html report. Wayne On 3/24/06, Thomas Recloux [EMAIL PROTECTED] wrote: Still now, I am getting Plain Text and Xml format reports only, But not getting any html reports. I really wonder, how it is happenning like this. Could you please let me know, whether we need to use any dependencies or not.Where I did wrong..? Are you launching the site goal ? You should obtain a surefire-report.html in your target/site/surfire-report.html -- Thomas Recloux -- --- 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]
jboss-maven-plugin jboss:start does it work for anyone ?
Has anyone succeeded in using the jboss-maven-plugin to start JBoss ? It says starting... but as far as I can tell it isn't started ? I put a pause in the pom.xmlusing AntRun just to make sure it wasn't shutting down again. I was hoping it would start JBoss the echo the console to the Maven2 console window ? I'd then run some JUnits that require the container started, then stop jboss. [INFO] [jboss:start {execution: jboss-maven-plugin start container}] [INFO] Starting JBoss... POM.XML is like this plugin groupIdorg.codehaus.mojo/groupId artifactIdjboss-maven-plugin/artifactId executions execution idjboss-maven-plugin start container /id phaseinstall/phase configuration !-- below is set in parent POM but can be overidden in user's settings.xml -- jbossHome${JBossHome}/jbossHome serverNamedefault/serverName /configuration goals goalstart/goal /goals /execution /executions /plugin
Re: jboss-maven-plugin jboss:start does it work for anyone ?
o/s : Windows XP Maven: 2.0.2 JBoss 4 : latest version for EJB3 Java 1.5 Will have to check the jboss-maven-plugin version at work tomorrow, but it should be the latest as I specified no specific version in the pomx.xml Thanks. On 22/03/06, Wayne Fay [EMAIL PROTECTED] wrote: It would be helpful if you could include the following info: operating system maven version jboss version java/jdk version jboss-maven-plugin version Wayne On 3/22/06, Pete [EMAIL PROTECTED] wrote: Has anyone succeeded in using the jboss-maven-plugin to start JBoss ? It says starting... but as far as I can tell it isn't started ? I put a pause in the pom.xmlusing AntRun just to make sure it wasn't shutting down again. I was hoping it would start JBoss the echo the console to the Maven2 console window ? I'd then run some JUnits that require the container started, then stop jboss. [INFO] [jboss:start {execution: jboss-maven-plugin start container}] [INFO] Starting JBoss... POM.XML is like this plugin groupIdorg.codehaus.mojo/groupId artifactIdjboss-maven-plugin/artifactId executions execution idjboss-maven-plugin start container /id phaseinstall/phase configuration !-- below is set in parent POM but can be overidden in user's settings.xml -- jbossHome${JBossHome}/jbossHome serverNamedefault/serverName /configuration goals goalstart/goal /goals /execution /executions /plugin
user's settings.xml not being picked up
Hi there I'm used to Maven2 picking up the settings.xml from C:\Documents and Settings\login\.m2 when in a windows environment, however I'm using Maven2 at a new company now, and for some reason the user's settings.xml doesn't seem to be being picked up. I have profiles profile iddeveloper_me/id properties JBossHomeD:/java/jboss-4.0/server/default/deploy/JBossHome /properties /profile /profiles activeProfiles activeProfiledeveloper_me/activeProfile /activeProfiles yet when I do mvn projecthelp:active-profiles the profile isn't listed and the properties are unset. Any idea how I can verify where Maven2 is looking for the user's settings.xml. I did create the .m2 directory and settings.xml manually. PS. The conf/settings.xml is working.
Re: user's settings.xml not being picked up
Thanks for the suggestins guys, but still no luck :-( 1) Tried subdirectory of /conf 2) The above code snippet String uh = System.getProperty(user.home); System.out.println(user.home is + uh); java.io.File m2 = new java.io.File(uh, .m2); java.io.File settings = new java.io.File(m2, settings_test.xml); settings.createNewFile(); user.home is \\FILESERVER\Users\myLoginId however putting the settings.xml in \\FILESERVER\Users\mylogin\.m2\ file://\\FILESERVER\Users\mylogin\.m2\ user.home=\\FILESERVER\Users\pthomas next to the test file settings_test.xml still doesn't work ! Also tried subdirectory of /conf Any more ideas - this is normally something that just works, I must be missing something simple here ? On 21/03/06, Milos Kleint [EMAIL PROTECTED] wrote: afaik teh algorithm is this: String uh = System.getproperty(user.home); File m2 = new File(uh, .m2); File settings = new File(m2, settings.xml); so probably maven is looking at some other place for your settings than you expect it to.. Milos On 3/21/06, Pete [EMAIL PROTECTED] wrote: Hi there I'm used to Maven2 picking up the settings.xml from C:\Documents and Settings\login\.m2 when in a windows environment, however I'm using Maven2 at a new company now, and for some reason the user's settings.xml doesn't seem to be being picked up. I have profiles profile iddeveloper_me/id properties JBossHomeD:/java/jboss-4.0/server/default/deploy/JBossHome /properties /profile /profiles activeProfiles activeProfiledeveloper_me/activeProfile /activeProfiles yet when I do mvn projecthelp:active-profiles the profile isn't listed and the properties are unset. Any idea how I can verify where Maven2 is looking for the user's settings.xml. I did create the .m2 directory and settings.xml manually. PS. The conf/settings.xml is working. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: user's settings.xml not being picked up
cheers but see my recent reply, must be missing something else here. On 21/03/06, Franz Fehringer [EMAIL PROTECTED] wrote: With the attached program you can see where Java thinks your user.home is. Greetings Franz Pete schrieb: Hi there I'm used to Maven2 picking up the settings.xml from C:\Documents and Settings\login\.m2 when in a windows environment, however I'm using Maven2 at a new company now, and for some reason the user's settings.xml doesn't seem to be being picked up. I have profiles profile iddeveloper_me/id properties JBossHomeD:/java/jboss-4.0/server/default/deploy/JBossHome /properties /profile /profiles activeProfiles activeProfiledeveloper_me/activeProfile /activeProfiles yet when I do mvn projecthelp:active-profiles the profile isn't listed and the properties are unset. Any idea how I can verify where Maven2 is looking for the user's settings.xml. I did create the .m2 directory and settings.xml manually. PS. The conf/settings.xml is working. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
user's settings.xml not being picked up (BUG? more details found out )
I'm guessing this is a bug with Maven2 that can't deal with a user's user.home being like this user.home=\\FILESERVER\Users\mylogin As I have confirmed there is nothing wrong with my settings.xml, because if I run with the -Dorg.apache.maven.user-settings e.g. mvn projecthelp:active-profiles -Dorg.apache.maven.user-settings=C:\Documents and Settings\myLoginId\.m2\settings.xml all works fine. So I'm guessing the \\FILESERVER path is giving Maven2 problems ? QUESTION: How can I work around this ? e.g. Can I set the - Dorg.apache.maven.user-settings as a permanent setting somehow, but obviously it will vary per developer. Can it be set in conf/settings.xml ? On 21/03/06, Pete [EMAIL PROTECTED] wrote: cheers but see my recent reply, must be missing something else here. On 21/03/06, Franz Fehringer [EMAIL PROTECTED] wrote: With the attached program you can see where Java thinks your user.homeis. Greetings Franz Pete schrieb: Hi there I'm used to Maven2 picking up the settings.xml from C:\Documents and Settings\login\.m2 when in a windows environment, however I'm using Maven2 at a new company now, and for some reason the user's settings.xml doesn't seem to be being picked up. I have profiles profile iddeveloper_me/id properties JBossHomeD:/java/jboss-4.0/server/default/deploy/JBossHome /properties /profile /profiles activeProfiles activeProfiledeveloper_me/activeProfile /activeProfiles yet when I do mvn projecthelp:active-profiles the profile isn't listed and the properties are unset. Any idea how I can verify where Maven2 is looking for the user's settings.xml. I did create the .m2 directory and settings.xml manually. PS. The conf/settings.xml is working. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
M2 assembly plugin works from wrong directory if run via Reactor
1) I am using assembly:assembly during the normal lifecycle 'package' phase, on a Maven2 submodule's pom with a descriptor as follows :- assembly iddep/id formats formatzip/format /formats includeBaseDirectoryfalse/includeBaseDirectory fileSets fileSet directorytarget/directory outputDirectory/outputDirectory includes include*.ear/include include*.jar/include /includes /fileSet fileSet directorysrc/main/assembly/resources/directory outputDirectory/outputDirectory includes include*.xml/include /includes /fileSet /fileSets /assembly All works fine if this is executed from the submodule's pom.xml directory, but if it is run via the reactor from parent project, then the value for directorytarget/directory becomes the location relative to the parent pom (which obviously doesn't have a target directory) How can I make the target relative to the child project always ? Here's the child's pom.xml part :- plugin artifactIdmaven-assembly-plugin/artifactId executions execution phasepackage/phase configuration descriptors descriptorsrc/main/assembly/descriptor.xml/descriptor /descriptors finalName${project.build.finalName}/finalName /configuration goals goalassembly/goal /goals /execution /executions /plugin
Re: DESPERATE: JBoss EJB3 embeddable container fails under surefire?
Chris or Dan, Just wondered if you could share your POM and testing approach with me , I'm looking to test JBoss EJB3 EJBs using surefire or testNG, so I am wondering what the options are, and how this emedded EJB3 container works / fits in ? Pete On 19/03/06, Chris Richardson [EMAIL PROTECTED] wrote: Dan, I also had a problem using maven2 to run the EJB3/JBoss microcontainer tests for the example from my book. It got this error: Caused by: java.net.MalformedURLException: no protocol: and at java.net.URL.lt;initgt;(URL.java:567) at java.net.URL.lt;initgt;(URL.java:464) at java.net.URL.lt;initgt;(URL.java:413) A quick google found this: http://mail-archives.apache.org/mod_mbox/geronimo-dev/200512.mbox/[EMAIL PROTECTED] It suggests that the problem is caused by the path to the repository being under Documents and Settings, which has a space :-( After specifying a different location for the local repository, which didn't have spaces in the path, the problem went away and tests passed. Chris -- Enterprise POJO consulting - http://www.chrisrichardson.net Author, POJOs in Action - http://www.manning.com/crichardson Enterprise POJOs blog - http://chris-richardson.blog-city.com On 3/19/06, Dan Greening [EMAIL PROTECTED] wrote: I am pulling my hair out. If you have gotten maven2 surefire plugin (or anything else) to initiate a JBoss EJB3 embeddable container, I am desperate for your POM. I am trying very hard to get the JBoss EJB3 embeddable container to operate under the surefire-plugin, under the test phase. I cannot, for the life of me, get it to find the InitialContext. I've set the system properties properly, and I even have a duplicated it in jndi.properties . My configuration works under maven1, but not maven2. I think it could be caused by one of two things. Either a. The surefire plugin isolated classloader is making it impossible for the embeddable container to find the annotated classes. b. I have screwed up my POM somehow. If all you tell me is yes, I have gotten the JBoss EJB3 embeddable container to run and see my classes under surefire, you will have done me a favor, because that would indicate it is possible. However, it would be really nice if you would also send your POM so I could understand your configuration. Seriously, this has been driving me nuts for days, so I could really use the help. Dan R. Greening, Ph.D., CEO BigTribe Corporation, http:// dan.greening.name/contact.htm
Re: How to bind execution of integration tests to integration-test phase
re: 1) My EAR pom.xml copies the ear file to the oc4j applications directory. I used AntRun to do this copy, antrun bound to install, but I think a better solution is to use the dependency-plugin (copyfile goal ?? can't remember). So during the 'install' the EAR file redeploys if the server is already started or is picked up when the server is next started. re 2) See http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html this allows you to wrap any embedded Ant Script (i.e. with AntRun plugin would be inside configuration ) into a self contained plugin, that gets installed/deployed to your company repository. This is useful where you could have say a startOC4J Ant Plugin that could be used by multiple projects. Whereas my original solution either had the ant script embedded, or the configuration called out to an existing ant script. But this means you can't do a Maven build without getting the ant script first. re 3) 4) I used JUnitEE, with this you have to have a JAR file container the incontainer JUnit Tests. so my tests_ServerSide was this. This needed deploying in WebApp (like Cactus) so I just had the tests_ServerSide as dependency on the WebApp maven project (also needed classifier tests on the dependency) . The WepApp was aggregated in the EAR. Webapp was just a normal maven project packaging war, with a web.xml containing the JUNitEE servlet e.g. servlet servlet-nameJUnitEETestServlet/servlet-name descriptionJUnitEE test runner/description servlet-classorg.junitee.servlet.JUnitEEServ let /servlet-class init-param param-namesearchResources/param-name param-valuetests_Serverside-1.0-SNAPSHOT-tests.jar/param-value /init-param /servlet On 10/03/06, Dave Muirhead [EMAIL PROTECTED] wrote: Back on Feb 11 there was a thread regarding integration testing with the subject line How to bind execution of integration tests to integration-test phase. Like Pete, who offered good advice in that thread, I also need to do in-container testing via Cactus, run CruiseControl and deploy to OAS/OC4J. Pete, if you see this posting, I'm interested in a few additional details about your approach. 1) does your runtests-integration project (or sub-projects) deploy the application (ear file) under test, or does it assume that the application under test is already deployed? 2) You said in your posting that With m2.02 I should now convert the Antruns to Ant Plugins. Why is that? Is there a new version of the Ant plugin that provides some new functionality that obviates the need for Antrun? I couldn't find any release notes or other info about the Ant Plugin that suggested anything new. Can you explain further? 3) You refer to two other modules - tests-serverside and tests-incontainer. What is the relationship of the tests-incontainer modules to your runtests-integration module(s) and/or your application module(s)? Is the tests-incontainer artifact (jar) packaged into, and deployed with, your application ear? Is it packaged and deployed separately? If the latter, is your runtests-integration module responsible for deploying that (perhaps inside of a war with the Cactus jar and its dependency jars)? 4) How do you deploy and configure Cactus and all its dependencies? Did you set up a shared library in OC4J or deploy them along with the tests? 5) You must have a web app somewhere that gets the Cactus servlets, filters, etc. in the game, right? Is it packaged in the ear or separate? Thanks for any additional info about your approach. Dave Dave Muirhead 303-638-4618 [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to add release-info
I used the Maven2 Changes plugin to do very similar :- See http://www.nabble.com/Is-there-a-way-to-get-a-Build-Date-Time-and-Version-Release-into-a-Maven-build--t1100519.html#a2930030 On 13/03/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: is there a way to include that maven-metadata.xml into created .ear artifacts? i guess right now its being created on the fly, and stays in repository , but i want to include that xml file into .ear then deploy it to server so later i can directly access this like (www.mycompany.com/release-info.xml} Thanks, Raghu Emmanuel Venisse [EMAIL PROTECTED] 03/13/2006 02:48 AM Please respond to Maven Users List To: Maven Users List users@maven.apache.org cc: Subject:Re: How to add release-info Actually, only maven-metadata.xml file is available and it contains some informations like list of release, last updated date and current version Do you need more informations? You can create a new plugin attached to deploy phase that will do the work. Emmanuel raghu guru a écrit : Hi All I'm using maven2.0.2 when i deploy my artifacts i want to create an xml file called release-info.xml so when these artifacts deployed into server, and when i need to know the deployed version of my artifact i can directly access this xml to see. These xml contains the buildnumber,date,and some other details.. Is this possible with maven build,? is there something maven already does it?, any one has any idea on this , please share - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EJB3/J2EE project using Maven2
Hi Marco, Can you try sending it to me again please. I know yesterday you tried sending the M1 version, but I never received it. many thanks Pete On 11/03/06, Marco Mistroni [EMAIL PROTECTED] wrote: Hello all, i have done a J2EE project which includes some EJB3, using Maven2. as of now, main limitation (due to its simplicity) is that i am NOT using maven-ejb-plugin since i am letting jboss figure out the ejb-jar.xml from the deployed package the current project does not use any maven-ejb3 plugins, nor any maven-par-plugins... but it's a very simple example of a J2EE project using maven2 Btw, i have copied from a sample that i have downloaded from some maven repositories i'd like to send it to the whole list, but i guess it's impractical if someone is interested, please let me know email and i send it privately alternatively, if i can post it to some maven guy so that it ends up in some repositories, i will be glad to do so regards marco
finding JBoss EJB3 Jars on ibiblio ?
I was looking for the JBoss EJB JARS on http://www.ibiblio.org/maven2/jboss/ Are they not there yet ? e.g. jboss-ejb3.jar jboss-ejb3x.jar ejb3-persistence.jar I was also looking for hibernate-ejb3-persistence.jar (used by JBoss EJB3TrailBlazer ) any ideas where to find this on ibiblio ? not under hibernate Is this best workaround to deploy these to my internal repository for now ? Pete
M2: JBoss EJB3 Examples ?
Does anyone out there have a JBoss EJB3 Maven2 working example / POMs. This is what I'm attempting to do, any ideas or samples would be much appreciated. thanks Pete
Re: ejb3 plugin
Hi there, I'm trying to build the example EJB3 maven project mentioned above by Tim, but am getting [INFO] Building Unnamed - test:test-ear:ear:1.0-SNAPSHOT [INFO]task-segment: [clean, install] [INFO] [INFO] [clean:clean] [INFO] [ear:generate-application-xml] [INFO] [ERROR] BUILD FAILURE [INFO] [INFO] Artifact[test:test-ejb:ejb] is not a dependency of the project. [INFO] I managed to install the par and ejb3 plugins from the sandbox, the above message seems confusing as EAR pom.xml does have the ejb as a dependency :- dependency groupIdtest/groupId artifactIdtest-ejb/artifactId version1.0-SNAPSHOT/version typeejb3/type /dependency This dependency appears to be correct because it is valid i.e. if I change the artifactid it fails earlier. So it seems its the ejbModule part below that it doesn't like. My local repo has version 2.1 of the ear plugin, I tried building the EAR project in the trunk, but same error. ejbModule groupIdtest/groupId artifactIdtest-ejb/artifactId bundleFileNamename-without-version.ejb3/bundleFileName /ejbModule On 07/03/06, Nidhi Tuli [EMAIL PROTECTED] wrote: Changing the version on maven archiver in pom.xml made install to work. I changed the version to point to 2.01. version in my local copy. /Nidhi -Original Message- From: Tim Kettler [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 11:53 AM To: Maven Users List Subject: Re: ejb3 plugin Tim Kettler schrieb: Hi Nidhi, you can checkout the maven-ejb3-plugin vie svn from the maven sandbox at: http://svn.apache.org/repos/asf/maven/sandbox/plugins/maven-ejb3-plugin you then probably also want the maven-par-plugin from: http://svn.apache.org/repos/asf/maven/sandbox/plugins/maven-par-plugin Once you have the plugins on your harddrive you can install them to your local repository by executing 'mvn install' in the project root directories. There is an attached zip file (test-prj.zip) at http://jira.codehaus.org/browse/MNG-1723 which contains a very minimalistic test project with an EJB3 project and an EAR project that packages the EJB file. You can use that as an starting point for your project. However, according to the latest draft of the spec (see section 6.2 of ejb-3_0-pfd-spec-persistence.pdf and chapter 19 of ejb-3_0-pfd-spec-ejbcore.pdf) Enterprise Beans are packaged in plain Jar files (not .ejb3 and .par). So if you use an EJB3 implementation that implements the latest spec (like the one from JBoss) you can use the 'standard' maven-ejb-plugin. The only problem with this is that the plugin enforces the presence of an 'ejb-jar.xml' file which is not needed with EJB3 if you use annotations. I submitted a patch for the plugin (http://jira.codehaus.org/browse/MEJB-6) to make the 'ejb-jar.xml' optional but i don't know if this will be applyed in the near furure. ...applied in the near future. Grmmph. -Tim Nidhi Tuli schrieb: Hi, I just started working on Maven 2 and trying to build my EJB3 project using maven2. Any ideas what plug-in should I use? In one of the articles I am advised to do ejb3 on the jar file which I created. The package for that is suggested to be maven-ejb3-plugin with groupId of goal bindings org.apache.maven.plugins. But I am not able to find this plugin? Any suggestions? Thanks Nidhi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: M2 : Excluding WAR from EAR for a live build - is profile the only way ?
Well like all these things, after you've written them down, the answer pops up. I now simply define a property in the profile (that can be different per build profile) e.g. junitee.optional.war.excludedfalse/junitee.optional.war.excluded then in the EAR's pom.xml I configure the maven-ear-plugin webModule groupIdmygroup/groupId artifactIdmyArtifact/artifactId contextRoot/myContextRoot/contextRoot bundleFileNamemyArtifact.war/bundleFileName excluded${junitee.optional.war.excluded}/excluded /webModule On 17/02/06, Lee Meador [EMAIL PROTECTED] wrote: How about an optional ant task that runs after the 'package' phase in the ear project that runs winzip or something similar to delete the war from the ear. Ant probably has a way to remove a file from a jar but I don't remember ever needing to do that. Its ugly but it would work. I do something similar to run the websphere 'end point enabler' on the ear that maven 2 just finished building. It adds an additional war into the ear and what-not. -- Lee On 2/17/06, Pete [EMAIL PROTECTED] wrote: I have an EAR project that includes a normal webapp, but also a JUnitEE testing WAR. For some builds we need it in the EAR, but for a live build we don't want it aggregated. Now I guess I could wrap the EAR plugin in a profile, but the EAR plugin's configuration section is very long, so this would mean repeating all of it bar one webModule , and it would also mean we would need to maintain changes in two places - probably leading to an error only detectable in a live build. Is there any more simple way to achieve this ? I remember in Ant I used to cheat by declaring a property e.g. optional.junitee.war and then I'd only set its value to the war file name if not a ' live.build' , so for a live build it would be unset and the Ant EAR/JAR mechanism doesn't complain if it can't aggregate a file. In Maven all dependencies have to be valid, so I can't use this dynamic dependency type of thing. Any thoughts / ideas appreciated . -- -- Lee Meador Sent from gmail. My real email address is [EMAIL PROTECTED]
M2 : Excluding WAR from EAR for a live build - is profile the only way ?
I have an EAR project that includes a normal webapp, but also a JUnitEE testing WAR. For some builds we need it in the EAR, but for a live build we don't want it aggregated. Now I guess I could wrap the EAR plugin in a profile, but the EAR plugin's configuration section is very long, so this would mean repeating all of it bar one webModule , and it would also mean we would need to maintain changes in two places - probably leading to an error only detectable in a live build. Is there any more simple way to achieve this ? I remember in Ant I used to cheat by declaring a property e.g. optional.junitee.war and then I'd only set its value to the war file name if not a 'live.build' , so for a live build it would be unset and the Ant EAR/JAR mechanism doesn't complain if it can't aggregate a file. In Maven all dependencies have to be valid, so I can't use this dynamic dependency type of thing. Any thoughts / ideas appreciated .
Re: Is there a way to get a Build Date/Time and Version/Release into a Maven build ?
Well I ended up using the 'Maven 2 Changes Plugin' to produce a changes-report based on the changes.xml that is input to the plugin. I bind the plugin to the generate-resources phase, but found that it wouldn't allow me to override the outputDirectory, so the html report still ends up in the /site folder. I then use the antrun plugin to copy the file from the site directory to a new directory in webapp/pages/release (during the process-resources phase). So changes-report.html ends up getting embedded in the built WAR file. On 14/02/06, Edwin Punzalan [EMAIL PROTECTED] wrote: Seems like you have no other choice but to use the ant-run plugin just for replacing/filtering part. Please see: http://maven.apache.org/plugins/maven-antrun-plugin/introduction.html Pete wrote: When I used to use Ant I had an ant target that would copy a pre-prepared HTML file into the webApp's pages - replacing/filtering ${build.date} ${ build.version} etc, so that Users and Testers could see which version of the application they have deployed. I was about to do a similar function for Maven, but then wondered how does everyone else do this ? Are there any M2 plugins to help ? I've seen the http://mojo.codehaus.org/changes-maven-plugin/howto.html 'Maven 2 Changes Plugin', but presumably this is just published to the Application's Site, where as I want the information deployed as part of the app's web pages. Any thoughts / suggestions appreciated. We're currently not using the release plugin because of the unresolved issues. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to bind execution of integration tests to integration-test phase
I have achieved integration testing (both JunitEE/Cactus and JUnits calling remote interfaces) in M2 using a very simple lightweight POM for each discrete task/execution in the integration phase e.g. + runtests-integration pom.xml (parent pom, invoking child modules in the order below) + rebuild-database pom.xml (antrun) + start-container pom.xml (antrun or cargo) + runtests-serverside (runs junits needing server started as they invoke remote interfaces) pom.xml (surefire:test) + runtests-incontainer-tests pom.xml (antrun for running JUnitEE or Cactus incontainer tests) + stop-container pom.xml (antrun or cargo) All plugins above bound to the integration-test phase I found this approach also necessary, because you can only have one instance of the antRun plugin for the integration-test phase, therefore you can't use antrun, then surefire, then antrun again as the last antrun overrides the first if they are bound to the same phase. I did want to use Cargo, but unfortunately there was no support for OC4J with an existing configuration. I have the above 'runtests-integration' suite only execute if the M2 build profile is set to -Pintegrationtests. In this way developers can run a regular M2 build which just runs standalone JUnits, or specify the profile to run a fuller build. We have CruiseControl always running the integrations tests profile. With m2.02 I should now convert the Antruns to Ant Plugins. I'm hoping that when M2 supports integration tests more I can migrate to the approved strategy, but this works right now, we have Applications (both EARs) that are built with M2 via CruiseControl, the above integration projects start the container run all the integration tests (with the 2nd EAR application even invoking the 1st EAR's services) I have two other M2 modules in addition to those shown above that actually hold the integration tests :- + tests-serverside pom.xml (JAR pom, building those JUnits needing server started as they invoke remote interfaces) + tests-incontainer pom.xml (JAR pom, building those JUnits needing to run inside container JUnitEE or cactus) Pete On 10/01/06, Bengt-Erik Fröberg [EMAIL PROTECTED] wrote: OK, kinda' weird actually... is it a hard task to extend this surefire plugin to support different kinds of tests? It would be great if you were able to define your own set of directories with tests of different types and to optionally bind each directory to a custom phase. Maybe a tests-tag in the POM? I saw there is already a discussion on these matters in the link you submitted. That's great! Regards, /B-E -Ursprungligt meddelande- Från: Vincent Massol [mailto:[EMAIL PROTECTED] Skickat: den 10 januari 2006 16:38 Till: 'Maven Users List' Ämne: RE: How to bind execution of integration tests to integration-test phase -Original Message- From: Bengt-Erik Fröberg [mailto:[EMAIL PROTECTED] Sent: mardi 10 janvier 2006 16:28 To: 'Maven Users List' Subject: SV: How to bind execution of integration tests to integration- test phase Hi and thanks for answering. I see but what does the integration-test phase actually do today then? It's a phase you can bind to. What I'm simply saying is that the surefire plugin currently only supports running one type of tests at once. -Vincent -Ursprungligt meddelande- Från: Vincent Massol [mailto:[EMAIL PROTECTED] Skickat: den 10 januari 2006 16:12 Till: 'Maven Users List' Ämne: RE: How to bind execution of integration tests to integration-test phase Hi, -Original Message- From: Bengt-Erik Fröberg [mailto:[EMAIL PROTECTED] Sent: mardi 10 janvier 2006 14:34 To: 'Maven Users List' Subject: How to bind execution of integration tests to integration-test phase Hi I have a set of JUnit unit tests which are executed during the test lifecycle phase. Now I want to add integration-test classes in another directory to be executed during the integration-test phase. How do I accomplish that? Using Maven2 and ANT. Right now you can't run both unit tests and integration tests in the same project. We're discussing this and we'll probably modify the surefire plugin to allow it. See http://docs.codehaus.org/display/MAVEN/best+practices+-+testing+strategies Thanks -Vincent __ _ Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: Release plugin needs MAJOR warnings...
I believe there is also still an issue where if you have flattened the root pom to be alongside the sub modules - because Eclipse doesn't support nested Projects. If you then do a mvn release:prepare from the flattened root, it only seems to Tag the flattened root and NOTHING else i.e. not the sub modules. This makes it unusable for us. This was flagged back in Sept so hopefully there is is JIRA for this ? On 23/01/06, Daniel Kulp [EMAIL PROTECTED] wrote: Jason, WARNING: the release plugin performs several actions that are potentially irreversible including modifying the pom.xml files as well as performing SCM operations. Nothing is irreversible provided you are using an SCM correctly. That's not exactly true. The fact that the plugin created a new version of a file is an irreversible change in many (most) SCM's. Yes, you can alway checkout an older version of the file to restore it, but the fact is, in the the history, you now have another version.Also, various SCM reporting tools, etc... will now report that version/file as changed, cruisecontrol/continuum will trigger a build, etc That said, going through and restoring a bunch of pom.xml files can take time which is something that we usually don't have around release time. Definitely good advice. When I make another pass at the release plug-in I'll add some notices until the release plug-in is production quality. I think it's widely known that the release plug-in is not production quality yet but we usually warn people in back channels. It should be more up-front with the release plug-ins capabilities. Agreed. The release plugin guide doesn't really mention that it isn't completely production ready. My boss was glad I was experimenting with it in our test repository and not the production one. Cause of that, we're going to be writing some perl scripts or something to do something similar. Why not try to help improve the release plug-in? I wish I could, just no time.It's very easy to do a perl search/replace for the version string and run a svn cp trunk tags/TAG type of thing. It doesn't do everything the release plugin would do (verify snapshot usage, etc...), but good enough for us for now. A dry run mode would certainly be valuable. If that's not in JIRA I'll add that. dry run That's the phrase I was searching for. I was going nuts this morning trying to think of that. I must be losing my mind... :-( Thanks! -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shipping different environments - different property/xml files
Have a look at these for some ideas http://www.nabble.com/How-to-for-building-for-different-environments-t494243.html#a1343428 http://www.nabble.com/How-to-use-different-context.xml-files--t444332.html#a1213765 On 24/01/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi there, Firstly, m2 rocks, it took some time to implement but what a great result. Much faster, clearer esp. for web projects. So my question, I have read the doco, reviewed the lists and found many things that might fit this bill and am confused as to best practice. I wonder even if an extra plug-in might be needed and if so, will write it. Here is the issue: deploy targets: test production differences: src/main/webapp/WEB-INF/applicationContext.hibernate.xml src/main/webapp/WEB-INF/default.properties So between the two WARs generated for these environments, I need to have different settings in these xml/properties files. I figure that I could : 1. Create an overlay directory tree per env. and sort of merge the overlay over the standard WAR. 2. Use profiles to somehow select one subdir for resources vs another. 3. Something else, much smarter. Any ideas? It doesnt seem to be covered clearly in the doco or miniguides. Unless of course I missed it! If I was to write a plugin I would be looking to call this sort of thing: m2 -Dship.to.env=test package which would merge into the WAR the test environment differences and probably call the result myapp-test.war ATB Stuart Guthrie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]