Re: archetype for creating packaging 'pom'?
On Sun, Apr 27, 2008 at 5:48 AM, Lachlan Deck <[EMAIL PROTECTED]> wrote: > I'm sure this must be a FAQ - but I can't see an answer anywhere. Is there > not an archetype for creating a pom.xml with packaging pom? Not afaik, it's generally less typing to just copy one and modify it. It might be nice to have the values filtered in though... if you'd like to contribute an archetype we can see about adding it to the list. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: archetype for creating packaging 'pom'?
What kind of project are you really looking to build? For what purpose? The more detail you provide, the better the answer you will get, generally. Wayne On 4/26/08, Lachlan Deck <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm sure this must be a FAQ - but I can't see an answer anywhere. Is there > not an archetype for creating a pom.xml with packaging pom? > > Thanks. > > with regards, > -- > > Lachlan Deck > > > > > - > 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: Hook ivy repository to Maven
I think we've answered it a few times, but here it is in one place: Yes, it seems you can access Maven repos from Ivy. I've never used it personally, but they recently made a bunch of announcements regarding metadata support. No, you can't access an IVY repo from Maven. I guess that means people using both are sharing the maven repo layout. HTH, Brian -Original Message- From: Wei Tan [mailto:[EMAIL PROTECTED] Sent: Saturday, April 26, 2008 3:31 AM To: Maven Users List Subject: Re: Hook ivy repository to Maven Hi Scott, Thanks. Can you explain a little bit more? You use Ivy and Maven to access Maven repo, right? What I want is to access Ivy repo with Maven. Best regards, Wei On 4/25/08, Scott Ryan <[EMAIL PROTECTED]> wrote: > > You are correct. We use both Ivy and Maven to access our Archiva proxy > repository as well as several external Maven repositories. The > configuration is very straightforward and you can turn on and off the > transitive dependency feature of Maven within Ivy if you like. > > Scott D. Ryan > President and CTO > Soaring Eagle, L.L.C. > 9742 S.Whitecliff Place > Highlands Ranch, Co. 80129 > (303) 263-3044 > [EMAIL PROTECTED] > > -Original Message- > From: Wei Tan [mailto:[EMAIL PROTECTED] > Sent: Friday, April 25, 2008 5:47 AM > To: users@maven.apache.org > Cc: [EMAIL PROTECTED] > Subject: Hook ivy repository to Maven > > Dear all, > > We have a project which needs to use jars in a ivy repository, but our > project is managed by Maven. > Can Maven access ivy repo. and fetch the dependencies (jars)? > >I was told that ivy can acess Maven repo. > >Thanks. > > Wei > > > - > 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: Mvn2/Selenium/CArgo/JUnit problem
On Sun, Apr 27, 2008 at 1:22 AM, Marco Mistroni <[EMAIL PROTECTED]> wrote: > Problem i have now is that cargo starts/stops at every setUP and tearDown. > Even though tests are ran automatically, i am trying to use a mechanism > so tha cargo is started only once and it is stopped only once during hwole > lifecycle of my tests. There is a JUnit TestSetup class in the Shale test framework that will help with this (and I'm sure it's described on the Cargo website...) http://shale.apache.org/shale-test/apidocs/org/apache/shale/test/cargo/CargoTestSetup.html -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mvn2/Selenium/CArgo/JUnit problem
lump all you test cases into one test suit, and then have your test suite's setup/teardown to start/stop tomcat respectively. I think the Struts 2 integration test does this. check it out. -D On Sat, Apr 26, 2008 at 10:22 AM, Marco Mistroni <[EMAIL PROTECTED]> wrote: > hi all, > i am running my UAT tests in mvn2 using Cargo and selenium . > Due to problems using cargo plugin (when it started it was not able to find > some jars for my webapp), i have written a base test > which starts cargo and selenium. > Problem i have now is that cargo starts/stops at every setUP and tearDown. > Even though tests are ran automatically, i am trying to use a mechanism > so tha cargo is started only once and it is stopped only once during hwole > lifecycle of my tests. > > Wiuth JUnit3, i am unable to find a method that gets called only once (sort > of SetUpFixture) for the whole junit session... > > anyone could give help hee? > > here' smy AbstractSeleniumTest for reference > > public abstract class AbstractSeleniumTest extends SeleneseTestCase { >protected DefaultSelenium selenium; >private Logger log = Logger.getLogger(this.getClass()); >private InstalledLocalContainer container; > >public void setUp() throws Exception { >System.err.println("--SettingUp Fixture"); >startCargo(); >selenium = createSeleniumClient("http://localhost:8080/";); >selenium.start(); >} > > > >public void tearDown() throws Exception { >stopCargo(); >selenium.stop(); > >} > >protected DefaultSelenium createSeleniumClient(String url) throws > Exception { >return new DefaultSelenium("localhost", , "*firefox", url); >} > >private void startCargo() throws Exception { >// (1) Optional step to install the container from a URL pointing to > its distribution >System.err.println("--- Starting cargo.. .."); >Installer installer = new ZipURLInstaller( >new URL(" > http://www.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip > ")); >installer.install(); > >// (2) Create the Cargo Container instance wrapping our physical > container >LocalConfiguration configuration = >(LocalConfiguration) new > DefaultConfigurationFactory().createConfiguration( >"tomcat5x", ContainerType.INSTALLED, > ConfigurationType.STANDALONE); >container = >(InstalledLocalContainer) new > DefaultContainerFactory().createContainer( >"tomcat5x", ContainerType.INSTALLED, configuration); >container.setHome(installer.getHome()); > >// (3) Statically deploy some WAR (optional) >configuration.addDeployable(new WAR("target/BudgetWeb.war")); > >// (4) Start the container >container.start(); >} > >private void stopCargo() throws Exception { >container.stop(); >} > > thanks and regards > Marco > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clover 2 plug-in on Maven 2.0.9
with Maven 2.0.7, the property is set to c:\mytest\myproject\target\clover when under Clover run because Clover maven 2 plug-in is instrumenting code under that directory. However, it doesn't work anymore under Maven 2.0.9. To me, it sounds like a bug in 2.0.9. Otherwise, we would've examined all of existing plug-ins whenever there is new Maven release. On Sat, Apr 26, 2008 at 6:21 AM, Brian E. Fox <[EMAIL PROTECTED]> wrote: > Someone else reported issues with that property in 2.0.9 so it could be > maven. ${project.buid.directory} should be c:\mytest\myproject\target > but maybe the problem is with clover trying to change it? > > > -Original Message- > From: Ryan H. [mailto:[EMAIL PROTECTED] > Sent: Friday, April 25, 2008 4:31 PM > To: Maven Users List > Subject: Clover 2 plug-in on Maven 2.0.9 > > Folks, > > I just found that Maven 2.0.9 does not work with the existing Clover 2 > maven 2 plug-in (group ID: com.atlassian.maven.plugins) if you are > using some of maven 2 properties specifying project directories such > as ${project.build.directory} etc. > > You can use maven's antrun plug-in to echo out this property under Maven > 2.0.7 and 2.0.9 when running "clover:instrument" goal. Under Maven > 2.0.7, ${project.build.directory} prints: > > c:\mytest\myproject\target/clover > > Whereas Maven 2.0.9 prints: > > c:\mytest\myproject\target > > > Has anyone used Clover 2 plug-in on Maven 2.0.9 successfully? Is it a > bug in Maven 2.0.9 or Clover 2 plugin? > > Thanks > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: project.parent.* properties?
Thanks Wayne, An example of how to do this is found here: http://blogs.sonatype.com/brian/2008/04/17/120848550.html On 26/04/2008, at 4:44 PM, Wayne Fay wrote: I can't solve your specific problem for you, but I would generally expect that dependency:unpack would be involved in most solutions: http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html http://maven.apache.org/plugins/maven-dependency-plugin/usage.html You are welcome to continue using ".." etc. But if you expect your code to compile as a stand-alone module (eg in a continuous integration server) then you will need to limit your modules to their own source code only, plus anything you're bringing in via dependencies etc. Wayne On 4/26/08, Lachlan Deck <[EMAIL PROTECTED]> wrote: Hi, would you mind showing an example of how to achieve this? All that's in the ../src/main/resources dir is a single file that's being filtered with properties relevant for each module (rather than having a copy of the same file in each module). On 26/04/2008, at 3:22 PM, Wayne Fay wrote: This is an anti-pattern in Maven usage. Modules should be self-contained. If you must include content from another module, then you should depend on the Jar just like any other artifact and use various plugins to unpack the files you need into a specific area in your project etc. You should not use ".." or hard-code paths etc to access content which belongs to other modules (parents or children). Wayne On 4/25/08, Lachlan Deck <[EMAIL PROTECTED]> wrote: Hi there, If I have the following, all's fine... i.e., the resources are filtered and found in the build output. Resources true ../src/main/resources However the following produces no results... Resources true ${project.parent.basedir}/src/main/resources What properties are available for referencing the parent? Thanks. with regards, -- Lachlan Deck - 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] with regards, -- Lachlan Deck - 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] with regards, -- Lachlan Deck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
archetype for creating packaging 'pom'?
Hi there, I'm sure this must be a FAQ - but I can't see an answer anywhere. Is there not an archetype for creating a pom.xml with packaging pom? Thanks. with regards, -- Lachlan Deck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can't deploy site with different user ID and only SSH key
Does the id in your server.xml match the id of the / element in your POM? Julian Dunn wrote: I'm using Maven 2.0.8 and can't seem to deploy a project site over SCP. The UID that the site is to be deployed under is "integration", and I have a passwordless SSH key that I verified works. My settings.xml snippet: whatson.website integration ${user.home}/.ssh/id_dsa_integrationtest 664 775 Whenever I try to run "mvn site:deploy" I keep getting asked for a password. On the remote end I looked at the syslog and it seems Maven is trying keyboard-interactive authentication instead of publickey. Can anyone help? - Julian -- -- Julian C. Dunn, P.Eng. <[EMAIL PROTECTED]> -- Assistant Team Lead / Chef d'équipe adjoint -- Media Production Support / Soutien à la production des médias -- Canadian Broadcasting Corporation / Société Radio-Canada -- Office/Bureau: 2C310-N * Tel.: (416) 205-3311 x6988 * DID: 1-151-6988 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dennis Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-checkstyle-plugin basedir
Are you using the text ${basedir} in your Checkstyle configuration file? Hart, Leo wrote: I'm trying to migrating my build process from Ant to Maven and have been struggling quite a bit so far. I want to integrate CheckStyle into the build, so I've added the following: org.apache.maven.plugins maven-checkstyle-plugin false false config/CheckStyle Rules.xml My "CheckStyle Rules.xml" file is location in directory>/config. I'm receiving the following error: C:\workspace\shares>mvn checkstyle:check -e + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'checkstyle'. [INFO] [INFO] Building shares [INFO]task-segment: [checkstyle:check] [INFO] [INFO] Preparing checkstyle:check [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderRe sourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] ** [INFO] Starting Jakarta Velocity v1.4 [INFO] RuntimeInstance initializing. [INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties [INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) [INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader [INFO] ClasspathResourceLoader : initialization starting. [INFO] ClasspathResourceLoader : initialization complete. [INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) [INFO] Default ResourceManager initialization complete. [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach [INFO] Created: 20 parsers. [INFO] Velocimacro : initialization starting. [INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader. [INFO] Velocimacro : error using VM library template VM_global_library.vm : org.apache.velocity.exception.Res ourceNotFoundException: Unable to find resource 'VM_global_library.vm' [INFO] Velocimacro : VM library template macro registration complete. [INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definition s [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be global in scope if allowed. [INFO] Velocimacro : initialization complete. [INFO] Velocity successfully started. [INFO] [checkstyle:checkstyle] [INFO] [ERROR] BUILD ERROR [INFO] [INFO] An error has occurred in Checkstyle report generation. Embedded error: Failed during checkstyle configuration Property ${basedir} has not been set [INFO] [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred in Checkstyle report generation. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:583) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle (DefaultLifecycleExecutor.j ava:931) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Defaul tLifecycleExecutor.java:767 ) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default LifecycleExecutor.java:529) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa l(DefaultLifecycleExecutor. java:512) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL ifecycleExecutor.java:482) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle Failures(DefaultLifecycleEx ecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( DefaultLifecycleExecutor.ja va:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec ycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.Defa
Re: Mvn2/Selenium/CArgo/JUnit problem
Pom-based is pretty simple and we are using Tomcat in that case: http://svn.trails.codehaus.org/browse/~raw,r=844/trails/trunk/trails/examples/simple/pom.xml. Setting up the container in abstract base test class doesn't have much to do with Maven, but the advantage is that you can run everything in-process and from your IDE. Kalle On Sat, Apr 26, 2008 at 1:33 PM, Marco Mistroni <[EMAIL PROTECTED]> wrote: > Kalle, > i have started up cargo in my own test coz when i deployed my .war using > jetty, > it was always complaining on missing jar files (all related to my war > application) > > i did a research and found that there was a bug in jetty 'embedded > container' as it > was not able to load certain classes from classpath > this happened when i started to use selenium tests about 5 months ago > > i'll appreciate if you can share ur pom.xml, as my original idea was to > use > jetty too > > thanks and regards > marco > > On Sat, Apr 26, 2008 at 8:43 PM, Kalle Korhonen < > [EMAIL PROTECTED]> > wrote: > > > An interesting approach. In my container-based integration testing, I've > > either configured all in the pom and used the maven cargo plugin to > start > > up > > the container in pre-integration-test phase, then stop it in > > post-integration-test, or when I've wanted to do everything in-process > and > > in-code, I've created a JUnit base test class and held a Jetty instance > in > > a > > static property (so it survives through repeated setUp/tearDowns). I > don't > > see what using Cargo buys you if you are setting up everything in code. > > > > Kalle > > > > > > On Sat, Apr 26, 2008 at 10:22 AM, Marco Mistroni <[EMAIL PROTECTED]> > > wrote: > > > > > hi all, > > > i am running my UAT tests in mvn2 using Cargo and selenium . > > > Due to problems using cargo plugin (when it started it was not able to > > > find > > > some jars for my webapp), i have written a base test > > > which starts cargo and selenium. > > > Problem i have now is that cargo starts/stops at every setUP and > > tearDown. > > > Even though tests are ran automatically, i am trying to use a > mechanism > > > so tha cargo is started only once and it is stopped only once during > > hwole > > > lifecycle of my tests. > > > > > > Wiuth JUnit3, i am unable to find a method that gets called only once > > > (sort > > > of SetUpFixture) for the whole junit session... > > > > > > anyone could give help hee? > > > > > > here' smy AbstractSeleniumTest for reference > > > > > > public abstract class AbstractSeleniumTest extends SeleneseTestCase { > > >protected DefaultSelenium selenium; > > >private Logger log = Logger.getLogger(this.getClass()); > > >private InstalledLocalContainer container; > > > > > >public void setUp() throws Exception { > > >System.err.println("--SettingUp Fixture"); > > >startCargo(); > > >selenium = createSeleniumClient("http://localhost:8080/";); > > >selenium.start(); > > >} > > > > > > > > > > > >public void tearDown() throws Exception { > > >stopCargo(); > > >selenium.stop(); > > > > > >} > > > > > >protected DefaultSelenium createSeleniumClient(String url) throws > > > Exception { > > >return new DefaultSelenium("localhost", , "*firefox", url); > > >} > > > > > >private void startCargo() throws Exception { > > >// (1) Optional step to install the container from a URL > pointing > > > to > > > its distribution > > >System.err.println("--- Starting cargo.. .."); > > >Installer installer = new ZipURLInstaller( > > >new URL(" > > > > > > > > > http://www.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip > > > ")); > > >installer.install(); > > > > > >// (2) Create the Cargo Container instance wrapping our > physical > > > container > > >LocalConfiguration configuration = > > >(LocalConfiguration) new > > > DefaultConfigurationFactory().createConfiguration( > > >"tomcat5x", ContainerType.INSTALLED, > > > ConfigurationType.STANDALONE); > > >container = > > >(InstalledLocalContainer) new > > > DefaultContainerFactory().createContainer( > > >"tomcat5x", ContainerType.INSTALLED, configuration); > > >container.setHome(installer.getHome()); > > > > > >// (3) Statically deploy some WAR (optional) > > >configuration.addDeployable(new WAR("target/BudgetWeb.war")); > > > > > >// (4) Start the container > > >container.start(); > > >} > > > > > >private void stopCargo() throws Exception { > > >container.stop(); > > >} > > > > > > thanks and regards > > > Marco > > > > > >
Re: Mvn2/Selenium/CArgo/JUnit problem
Kalle, i have started up cargo in my own test coz when i deployed my .war using jetty, it was always complaining on missing jar files (all related to my war application) i did a research and found that there was a bug in jetty 'embedded container' as it was not able to load certain classes from classpath this happened when i started to use selenium tests about 5 months ago i'll appreciate if you can share ur pom.xml, as my original idea was to use jetty too thanks and regards marco On Sat, Apr 26, 2008 at 8:43 PM, Kalle Korhonen <[EMAIL PROTECTED]> wrote: > An interesting approach. In my container-based integration testing, I've > either configured all in the pom and used the maven cargo plugin to start > up > the container in pre-integration-test phase, then stop it in > post-integration-test, or when I've wanted to do everything in-process and > in-code, I've created a JUnit base test class and held a Jetty instance in > a > static property (so it survives through repeated setUp/tearDowns). I don't > see what using Cargo buys you if you are setting up everything in code. > > Kalle > > > On Sat, Apr 26, 2008 at 10:22 AM, Marco Mistroni <[EMAIL PROTECTED]> > wrote: > > > hi all, > > i am running my UAT tests in mvn2 using Cargo and selenium . > > Due to problems using cargo plugin (when it started it was not able to > > find > > some jars for my webapp), i have written a base test > > which starts cargo and selenium. > > Problem i have now is that cargo starts/stops at every setUP and > tearDown. > > Even though tests are ran automatically, i am trying to use a mechanism > > so tha cargo is started only once and it is stopped only once during > hwole > > lifecycle of my tests. > > > > Wiuth JUnit3, i am unable to find a method that gets called only once > > (sort > > of SetUpFixture) for the whole junit session... > > > > anyone could give help hee? > > > > here' smy AbstractSeleniumTest for reference > > > > public abstract class AbstractSeleniumTest extends SeleneseTestCase { > >protected DefaultSelenium selenium; > >private Logger log = Logger.getLogger(this.getClass()); > >private InstalledLocalContainer container; > > > >public void setUp() throws Exception { > >System.err.println("--SettingUp Fixture"); > >startCargo(); > >selenium = createSeleniumClient("http://localhost:8080/";); > >selenium.start(); > >} > > > > > > > >public void tearDown() throws Exception { > >stopCargo(); > >selenium.stop(); > > > >} > > > >protected DefaultSelenium createSeleniumClient(String url) throws > > Exception { > >return new DefaultSelenium("localhost", , "*firefox", url); > >} > > > >private void startCargo() throws Exception { > >// (1) Optional step to install the container from a URL pointing > > to > > its distribution > >System.err.println("--- Starting cargo.. .."); > >Installer installer = new ZipURLInstaller( > >new URL(" > > > > > http://www.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip > > ")); > >installer.install(); > > > >// (2) Create the Cargo Container instance wrapping our physical > > container > >LocalConfiguration configuration = > >(LocalConfiguration) new > > DefaultConfigurationFactory().createConfiguration( > >"tomcat5x", ContainerType.INSTALLED, > > ConfigurationType.STANDALONE); > >container = > >(InstalledLocalContainer) new > > DefaultContainerFactory().createContainer( > >"tomcat5x", ContainerType.INSTALLED, configuration); > >container.setHome(installer.getHome()); > > > >// (3) Statically deploy some WAR (optional) > >configuration.addDeployable(new WAR("target/BudgetWeb.war")); > > > >// (4) Start the container > >container.start(); > >} > > > >private void stopCargo() throws Exception { > >container.stop(); > >} > > > > thanks and regards > > Marco > > >
Re: Mvn2/Selenium/CArgo/JUnit problem
An interesting approach. In my container-based integration testing, I've either configured all in the pom and used the maven cargo plugin to start up the container in pre-integration-test phase, then stop it in post-integration-test, or when I've wanted to do everything in-process and in-code, I've created a JUnit base test class and held a Jetty instance in a static property (so it survives through repeated setUp/tearDowns). I don't see what using Cargo buys you if you are setting up everything in code. Kalle On Sat, Apr 26, 2008 at 10:22 AM, Marco Mistroni <[EMAIL PROTECTED]> wrote: > hi all, > i am running my UAT tests in mvn2 using Cargo and selenium . > Due to problems using cargo plugin (when it started it was not able to > find > some jars for my webapp), i have written a base test > which starts cargo and selenium. > Problem i have now is that cargo starts/stops at every setUP and tearDown. > Even though tests are ran automatically, i am trying to use a mechanism > so tha cargo is started only once and it is stopped only once during hwole > lifecycle of my tests. > > Wiuth JUnit3, i am unable to find a method that gets called only once > (sort > of SetUpFixture) for the whole junit session... > > anyone could give help hee? > > here' smy AbstractSeleniumTest for reference > > public abstract class AbstractSeleniumTest extends SeleneseTestCase { >protected DefaultSelenium selenium; >private Logger log = Logger.getLogger(this.getClass()); >private InstalledLocalContainer container; > >public void setUp() throws Exception { >System.err.println("--SettingUp Fixture"); >startCargo(); >selenium = createSeleniumClient("http://localhost:8080/";); >selenium.start(); >} > > > >public void tearDown() throws Exception { >stopCargo(); >selenium.stop(); > >} > >protected DefaultSelenium createSeleniumClient(String url) throws > Exception { >return new DefaultSelenium("localhost", , "*firefox", url); >} > >private void startCargo() throws Exception { >// (1) Optional step to install the container from a URL pointing > to > its distribution >System.err.println("--- Starting cargo.. .."); >Installer installer = new ZipURLInstaller( >new URL(" > > http://www.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip > ")); >installer.install(); > >// (2) Create the Cargo Container instance wrapping our physical > container >LocalConfiguration configuration = >(LocalConfiguration) new > DefaultConfigurationFactory().createConfiguration( >"tomcat5x", ContainerType.INSTALLED, > ConfigurationType.STANDALONE); >container = >(InstalledLocalContainer) new > DefaultContainerFactory().createContainer( >"tomcat5x", ContainerType.INSTALLED, configuration); >container.setHome(installer.getHome()); > >// (3) Statically deploy some WAR (optional) >configuration.addDeployable(new WAR("target/BudgetWeb.war")); > >// (4) Start the container >container.start(); >} > >private void stopCargo() throws Exception { >container.stop(); >} > > thanks and regards > Marco >
Re: How to preserve the file name running deploy:deploy-file ?
No. You cannot change the repository layout. The file name of an artifact is part of that layout. On Sat, Apr 26, 2008 at 7:58 PM, Stefano Nichele <[EMAIL PROTECTED]> wrote: > Hi all, > running: > > mvn deploy:deploy-file -Durl=myurl -Dfile=my-file.tgz -Dpackaging=tgz > -DgroupId=mygroup -DartifactId=myartifact -Dersion=3.5.1 > -DrepositoryId=private > > the file my-file.tgz is deployed, but in the repository I have: > > mygroup > |myartifact > | 3.5.1 > | myartifact-3.5.1.tgz > > that is the artifcatId is used also as filename. > > Is there a way to change the file name ? I would like to preserve the > original one (my-file.tgz) > > Thnaks in advance > Ste > > - > 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]
How to preserve the file name running deploy:deploy-file ?
Hi all, running: mvn deploy:deploy-file -Durl=myurl -Dfile=my-file.tgz -Dpackaging=tgz -DgroupId=mygroup -DartifactId=myartifact -Dersion=3.5.1 -DrepositoryId=private the file my-file.tgz is deployed, but in the repository I have: mygroup |myartifact | 3.5.1 | myartifact-3.5.1.tgz that is the artifcatId is used also as filename. Is there a way to change the file name ? I would like to preserve the original one (my-file.tgz) Thnaks in advance Ste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mvn2/Selenium/CArgo/JUnit problem
hi all, i am running my UAT tests in mvn2 using Cargo and selenium . Due to problems using cargo plugin (when it started it was not able to find some jars for my webapp), i have written a base test which starts cargo and selenium. Problem i have now is that cargo starts/stops at every setUP and tearDown. Even though tests are ran automatically, i am trying to use a mechanism so tha cargo is started only once and it is stopped only once during hwole lifecycle of my tests. Wiuth JUnit3, i am unable to find a method that gets called only once (sort of SetUpFixture) for the whole junit session... anyone could give help hee? here' smy AbstractSeleniumTest for reference public abstract class AbstractSeleniumTest extends SeleneseTestCase { protected DefaultSelenium selenium; private Logger log = Logger.getLogger(this.getClass()); private InstalledLocalContainer container; public void setUp() throws Exception { System.err.println("--SettingUp Fixture"); startCargo(); selenium = createSeleniumClient("http://localhost:8080/";); selenium.start(); } public void tearDown() throws Exception { stopCargo(); selenium.stop(); } protected DefaultSelenium createSeleniumClient(String url) throws Exception { return new DefaultSelenium("localhost", , "*firefox", url); } private void startCargo() throws Exception { // (1) Optional step to install the container from a URL pointing to its distribution System.err.println("--- Starting cargo.. .."); Installer installer = new ZipURLInstaller( new URL(" http://www.apache.org/dist/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip ")); installer.install(); // (2) Create the Cargo Container instance wrapping our physical container LocalConfiguration configuration = (LocalConfiguration) new DefaultConfigurationFactory().createConfiguration( "tomcat5x", ContainerType.INSTALLED, ConfigurationType.STANDALONE); container = (InstalledLocalContainer) new DefaultContainerFactory().createContainer( "tomcat5x", ContainerType.INSTALLED, configuration); container.setHome(installer.getHome()); // (3) Statically deploy some WAR (optional) configuration.addDeployable(new WAR("target/BudgetWeb.war")); // (4) Start the container container.start(); } private void stopCargo() throws Exception { container.stop(); } thanks and regards Marco
Re: maven struts 2 archetype
HI Wayne I will try maven 2.0.9 The site that I got the command is this : http://struts.apache.org/2.x/docs/ready-set-go.html thanks Wayne Fay <[EMAIL PROTECTED]> wrote: You realize of course that you're complaining about a SNAPSHOT version of an archetype. Snapshots are, by their very nature, not stable and thus prone to problems. Is there not a stable version you could use instead? Also, where did you get this "mvn archetype:create..." line? From a book or tutorial online? Can you send back the webpage? I *really* hope people aren't giving out snapshot repo urls (as you're using) in tutorials for Maven newbies -- that's just a bad idea all around. Finally, you're using Maven 2.0.7 -- can you try this with 2.0.9? Wayne On 4/26/08, Ãrico Teixeira wrote: > > I'm trying to run the following command : > mvn archetype:create -DgroupId=tutorial > -DartifactId=tutorial > -DarchetypeGroupId=org.apache.struts > -DarchetypeArtifactId=struts2-archetype-blank > -DarchetypeVersion=2.0.9-SNAPSHOT > -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository > > It returns the following error : > org.apache.maven.reactor.MavenExecutionException: > Could not find the model file > '/home/myhome/ejb/pom.xml'. for project unknown > ... > Caused by: > org.apache.maven.project.ProjectBuildingException: > Could not find the model file > '/home/myhome/ejb/pom.xml'. for project unknown > ... > > I'm running it with my user in gnome terminal in a > debian etch > > maven version in my computer : > # mvn -version > Maven version: 2.0.7 > Java version: 1.6.0_04 > OS name: "linux" version: "2.6.18-6-686" arch: "i386" > > # echo $M2 > /opt/java/maven-2.0.7/bin > > # echo $M2_HOME > /opt/java/maven-2.0.7 > > echo $JAVA_HOME > /opt/java/jdk1.6.0_04 > > JAVA_HOME, M2 and M2_HOME environment variables are > declared in /etc/profile > > I'm I missing something in my environment so I can > create the project correctly ? > > > - > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Re: [m2] can't get hibernate plugin to work with hsql
This is the hsql.properties that was generated: #HSQL Database Engine 1.8.0.5 #Sat Apr 26 07:57:59 PDT 2008 hsqldb.script_format=0 runtime.gc_interval=0 sql.enforce_strict_size=false hsqldb.cache_size_scale=8 readonly=false hsqldb.nio_data_file=true hsqldb.cache_scale=14 version=1.8.0 hsqldb.default_table_type=memory hsqldb.cache_file_scale=1 hsqldb.log_size=200 modified=no hsqldb.cache_version=1.7.0 hsqldb.original_version=1.8.0 hsqldb.compatible_version=1.8.0 And here is the hsql.script that is generated: CREATE SCHEMA PUBLIC AUTHORIZATION DBA CREATE MEMORY TABLE ADDRESS(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER,ADDRESS VARCHAR(25) NOT NULL,CITY VARCHAR(25) NOT NULL,COUNTRY VARCHAR(2) NOT NULL,POSTAL_CODE VARCHAR(25) NOT NULL,PROVINCE VARCHAR(25) NOT NULL) CREATE MEMORY TABLE APP_USER(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER,CONFIRMPASSWORD VARCHAR(255),EMAIL VARCHAR(50) NOT NULL,FIRST_NAME VARCHAR(50) NOT NULL,LAST_NAME VARCHAR(50) NOT NULL,MIDDLE_NAME VARCHAR(50),PASSWORD VARCHAR(100) NOT NULL,PASSWORD_HINT VARCHAR(50),PHONE_NUMBER VARCHAR(25),USERNAME VARCHAR(25) NOT NULL,WEBSITE VARCHAR(50),ADDRESS_FK BIGINT,CONSTRAINT FK459C57294AD68248 FOREIGN KEY(ADDRESS_FK) REFERENCES ADDRESS(ID)) CREATE MEMORY TABLE ROLE(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,VERSION INTEGER,DESCRIPTION VARCHAR(255) NOT NULL,NAME VARCHAR(64) NOT NULL) CREATE MEMORY TABLE USER_ROLE(USER_ID BIGINT NOT NULL,ROLE_ID BIGINT NOT NULL,PRIMARY KEY(USER_ID,ROLE_ID),CONSTRAINT FK143BF46AE8EA6EF6 FOREIGN KEY(USER_ID) REFERENCES APP_USER(ID),CONSTRAINT FK143BF46A43BFAB16 FOREIGN KEY(ROLE_ID) REFERENCES ROLE(ID)) ALTER TABLE ADDRESS ALTER COLUMN ID RESTART WITH 1 ALTER TABLE APP_USER ALTER COLUMN ID RESTART WITH 1 ALTER TABLE ROLE ALTER COLUMN ID RESTART WITH 1 CREATE USER SA PASSWORD "" GRANT DBA TO SA SET WRITE_DELAY 10 On Sat, Apr 26, 2008 at 7:11 AM, Mick Knutson <[EMAIL PROTECTED]> wrote: > zI am trying to run hibernate to generate sql, populate my db and then run > some tests. > Well, if I use MySql, I do not have any issues at all. But when I switch > to hsql, i can't get the databasse tables to be created, then I get a table > not exist error in dbunit. > > Here is my hibernate plugin: > > org.codehaus.mojo > hibernate3-maven-plugin > 2.1 > > > > hbm2ddl > > annotationconfiguration > > > hbm2hbmxml > > src/main/resources > > > > true > > /src/main/resources/hibernate.cfg.xml > true > ${maven.test.skip} > > > > > hbm2ddl > process-test-resources > > hbm2ddl > > > > > > ${jdbc.groupId} > ${jdbc.artifactId} > ${jdbc.version} > > > > > So what am I missing? Why do the tables for Mysql but with HSQL they do > not? > Also, I do not see any files generated in src/main/resources/ > > Here is the trace when I run hibernate alone: > > [myproject] INFO [main] SchemaExport.execute(154) | Running hbm2ddl schema > export > [myproject] DEBUG [main] SchemaExport.execute(170) | import file not > found: /import.sql > [myproject] INFO [main] SchemaExport.execute(179) | exporting generated > schema to database > [myproject] INFO [main] DriverManagerConnectionProvider.configure(41) | > Using Hibernate built-in connection pool (not for production use!) > [myproject] INFO [main] DriverManagerConnectionProvider.configure(42) | > Hibernate connection pool size: 20 > [myproject] INFO [main] DriverManagerConnectionProvider.configure(45) | > autocommit mode: false > [myproject] INFO [main] DriverManagerConnectionProvider.configure(80) | > using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:target/testd > b-hsql;shutdown=true > [myproject] INFO [main] DriverManagerConnectionProvider.configure(83) | > connection properties: {user=sa, password=} > [myproject] DEBUG [main] DriverManagerConnectionProvider.getConnection(93) > | total checked-out connections: 0 > [myproject] DEBUG [main] > DriverManagerConnectionProvider.getConnection(109) | opening new JDBC > connection > [myproject] DEBUG [main] > DriverManagerConnectionProvider.getConnection(115) | created connection to: > jdbc:hsqldb:file:target/testdb-hsql;shutdown > =true, Isolation Level: 2 > alte
Re: maven struts 2 archetype
You realize of course that you're complaining about a SNAPSHOT version of an archetype. Snapshots are, by their very nature, not stable and thus prone to problems. Is there not a stable version you could use instead? Also, where did you get this "mvn archetype:create..." line? From a book or tutorial online? Can you send back the webpage? I *really* hope people aren't giving out snapshot repo urls (as you're using) in tutorials for Maven newbies -- that's just a bad idea all around. Finally, you're using Maven 2.0.7 -- can you try this with 2.0.9? Wayne On 4/26/08, Ãrico Teixeira <[EMAIL PROTECTED]> wrote: > > I'm trying to run the following command : > mvn archetype:create -DgroupId=tutorial > -DartifactId=tutorial > -DarchetypeGroupId=org.apache.struts > -DarchetypeArtifactId=struts2-archetype-blank > -DarchetypeVersion=2.0.9-SNAPSHOT > -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository > > It returns the following error : > org.apache.maven.reactor.MavenExecutionException: > Could not find the model file > '/home/myhome/ejb/pom.xml'. for project unknown > ... > Caused by: > org.apache.maven.project.ProjectBuildingException: > Could not find the model file > '/home/myhome/ejb/pom.xml'. for project unknown > ... > > I'm running it with my user in gnome terminal in a > debian etch > > maven version in my computer : > # mvn -version > Maven version: 2.0.7 > Java version: 1.6.0_04 > OS name: "linux" version: "2.6.18-6-686" arch: "i386" > > # echo $M2 > /opt/java/maven-2.0.7/bin > > # echo $M2_HOME > /opt/java/maven-2.0.7 > > echo $JAVA_HOME > /opt/java/jdk1.6.0_04 > > JAVA_HOME, M2 and M2_HOME environment variables are > declared in /etc/profile > > I'm I missing something in my environment so I can > create the project correctly ? > > > - > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it > now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[m2] can't get hibernate plugin to work with hsql
zI am trying to run hibernate to generate sql, populate my db and then run some tests. Well, if I use MySql, I do not have any issues at all. But when I switch to hsql, i can't get the databasse tables to be created, then I get a table not exist error in dbunit. Here is my hibernate plugin: org.codehaus.mojo hibernate3-maven-plugin 2.1 hbm2ddl annotationconfiguration hbm2hbmxml src/main/resources true /src/main/resources/hibernate.cfg.xml true ${maven.test.skip} hbm2ddl process-test-resources hbm2ddl ${jdbc.groupId} ${jdbc.artifactId} ${jdbc.version} So what am I missing? Why do the tables for Mysql but with HSQL they do not? Also, I do not see any files generated in src/main/resources/ Here is the trace when I run hibernate alone: [myproject] INFO [main] SchemaExport.execute(154) | Running hbm2ddl schema export [myproject] DEBUG [main] SchemaExport.execute(170) | import file not found: /import.sql [myproject] INFO [main] SchemaExport.execute(179) | exporting generated schema to database [myproject] INFO [main] DriverManagerConnectionProvider.configure(41) | Using Hibernate built-in connection pool (not for production use!) [myproject] INFO [main] DriverManagerConnectionProvider.configure(42) | Hibernate connection pool size: 20 [myproject] INFO [main] DriverManagerConnectionProvider.configure(45) | autocommit mode: false [myproject] INFO [main] DriverManagerConnectionProvider.configure(80) | using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:file:target/testd b-hsql;shutdown=true [myproject] INFO [main] DriverManagerConnectionProvider.configure(83) | connection properties: {user=sa, password=} [myproject] DEBUG [main] DriverManagerConnectionProvider.getConnection(93) | total checked-out connections: 0 [myproject] DEBUG [main] DriverManagerConnectionProvider.getConnection(109) | opening new JDBC connection [myproject] DEBUG [main] DriverManagerConnectionProvider.getConnection(115) | created connection to: jdbc:hsqldb:file:target/testdb-hsql;shutdown =true, Isolation Level: 2 alter table app_user drop constraint FK459C57294AD68248; [myproject] DEBUG [main] SchemaExport.execute(303) | alter table app_user drop constraint FK459C57294AD68248; [myproject] DEBUG [main] SchemaExport.drop(288) | Unsuccessful: alter table app_user drop constraint FK459C57294AD68248 [myproject] DEBUG [main] SchemaExport.drop(289) | Table not found: APP_USER in statement [alter table app_user] alter table user_role drop constraint FK143BF46AE8EA6EF6; [myproject] DEBUG [main] SchemaExport.execute(303) | alter table user_role drop constraint FK143BF46AE8EA6EF6; [myproject] DEBUG [main] SchemaExport.drop(288) | Unsuccessful: alter table user_role drop constraint FK143BF46AE8EA6EF6 [myproject] DEBUG [main] SchemaExport.drop(289) | Table not found: USER_ROLE in statement [alter table user_role] alter table user_role drop constraint FK143BF46A43BFAB16; [myproject] DEBUG [main] SchemaExport.execute(303) | alter table user_role drop constraint FK143BF46A43BFAB16; [myproject] DEBUG [main] SchemaExport.drop(288) | Unsuccessful: alter table user_role drop constraint FK143BF46A43BFAB16 [myproject] DEBUG [main] SchemaExport.drop(289) | Table not found: USER_ROLE in statement [alter table user_role] drop table address if exists; [myproject] DEBUG [main] SchemaExport.execute(303) | drop table address if exists; drop table app_user if exists; [myproject] DEBUG [main] SchemaExport.execute(303) | drop table app_user if exists; drop table role if exists; [myproject] DEBUG [main] SchemaExport.execute(303) | drop table role if exists; drop table user_role if exists; [myproject] DEBUG [main] SchemaExport.execute(303) | drop table user_role if exists; create table address (id bigint generated by default as identity (start with 1), version integer, address varchar(25) not null, city varchar(25) not null, country varchar(2) not null, postal_code varchar(25) not null, province varchar(25) not null, primary key (id)); [myproject] DEBUG [main] SchemaExport.execute(303) | create table address (id bigint generated by default as identity (start with 1), version int eger, address varchar(25) not null, city varchar(25) not null, country varchar(2) not null, postal_code varchar(25) not null, province
maven struts 2 archetype
I'm trying to run the following command : mvn archetype:create -DgroupId=tutorial -DartifactId=tutorial -DarchetypeGroupId=org.apache.struts -DarchetypeArtifactId=struts2-archetype-blank -DarchetypeVersion=2.0.9-SNAPSHOT -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository It returns the following error : org.apache.maven.reactor.MavenExecutionException: Could not find the model file '/home/myhome/ejb/pom.xml'. for project unknown ... Caused by: org.apache.maven.project.ProjectBuildingException: Could not find the model file '/home/myhome/ejb/pom.xml'. for project unknown ... I'm running it with my user in gnome terminal in a debian etch maven version in my computer : # mvn -version Maven version: 2.0.7 Java version: 1.6.0_04 OS name: "linux" version: "2.6.18-6-686" arch: "i386" # echo $M2 /opt/java/maven-2.0.7/bin # echo $M2_HOME /opt/java/maven-2.0.7 echo $JAVA_HOME /opt/java/jdk1.6.0_04 JAVA_HOME, M2 and M2_HOME environment variables are declared in /etc/profile I'm I missing something in my environment so I can create the project correctly ? - Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
RE: Clover 2 plug-in on Maven 2.0.9
Someone else reported issues with that property in 2.0.9 so it could be maven. ${project.buid.directory} should be c:\mytest\myproject\target but maybe the problem is with clover trying to change it? -Original Message- From: Ryan H. [mailto:[EMAIL PROTECTED] Sent: Friday, April 25, 2008 4:31 PM To: Maven Users List Subject: Clover 2 plug-in on Maven 2.0.9 Folks, I just found that Maven 2.0.9 does not work with the existing Clover 2 maven 2 plug-in (group ID: com.atlassian.maven.plugins) if you are using some of maven 2 properties specifying project directories such as ${project.build.directory} etc. You can use maven's antrun plug-in to echo out this property under Maven 2.0.7 and 2.0.9 when running "clover:instrument" goal. Under Maven 2.0.7, ${project.build.directory} prints: c:\mytest\myproject\target/clover Whereas Maven 2.0.9 prints: c:\mytest\myproject\target Has anyone used Clover 2 plug-in on Maven 2.0.9 successfully? Is it a bug in Maven 2.0.9 or Clover 2 plugin? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jars appear timestamped in wars and zips since 2.0.9
They are wrong because dependency is for -SNAPSHOT versions and manifests in jars has classpath to these -SNAPSHOT versions and therefore classes from these wrongly named jar in war lib directory can't be found. War plugin should get these new timestamped jars from local repo and rename them correctly to -SNAPSHOT as ear plugin does - markku . Brian E. Fox wrote: Are you saying the artifacts are _wrong_ or you just don't like the timestamp'd file name? Usually the timestamp'd name indicates the file came from a remote repo, which could happen depending on various settings and if it's newer on the remote. -Original Message- From: Markku Saarela [mailto:[EMAIL PROTECTED] Sent: Friday, April 25, 2008 6:04 AM To: Maven Users List Subject: Re: jars appear timestamped in wars and zips since 2.0.9 Hi, While debugging 2.1-alpha-1 war plugin in method ArtifactsPackagingTask.performPackaging( WarPackagingContext context ) DefaultArtifact class instance has right version number and also method getArtifactFinalName( context, artifact ); returns right name -SNAPSHOT also. But when removing all breakpoints and resuming execution all the rest snapshot artifacts has wrong filename in lib directory - markku Markku Saarela wrote: Hi, This start to happen at least we use Maven 2.0.8 version and still exists in 2.0.9. Tested with war plugin versions 2.0.2 and 2.1-alpha-1 Here is snipped from [DEBUG] Adding managed dependencies for [DEBUG]net.sourceforge.jivalo.fw:jivalo-fw-common:jar:1.5-beta-3-SNAPSHOT [DEBUG] jivalo-fw-client: resolved to version 1.5-beta-3-20080415.204821-1 from repository jivalo-snapshot Classpath is correct for compiling (uses -SNAPSHOT version and not timestamped one) and manifest files in jars. Maven decides to use remote repositories constantly allmost every SNAPSHOT versions, not for all. Reason seems to be lastUpdated timestamp in artifacts local repository -SNAPSHOT directory maven-metadata-local.xml file. It is not updated to newer than remote repository's timestamp at that time than new version is retrieved from remote repository.. Best workaround i found is: set snapshot versions to provided scope and use dependency plugins copy-dependencies goal. - markku [EMAIL PROTECTED] wrote: Hi, In Maven 2.0.8 I built my war with maven-war-plugin:2.1-alpha-1 and my zip with maven-assembly-plugin:2.2-beta-2 The war/zip contained dependent jars as "jarname-version-SNAPSHOT.jar" when the depend jars were located in the localrepository. The war/zip contained dependent jars as "jarname-version-timestamp.jar" when the depend jars were located in the central (company) repository and first need to be downloaded. The difference was in the mavenmetadata-local.xml, where a "true entry exists: ... true ... Now, In Maven 2.0.9 I still built my war with maven-war-plugin:2.1-alpha-1 and my zip with maven-assembly-plugin:2.2-beta-2 But now, the mavenmetadata-local.xml file doesn´t contain a "true entry anymore - even if I paste one, it gets deleted during the build ! This results in always getting wars/zips containing dependent jars as "jarname-version-timestamp.jar". And that´s not very nice, because in the MANIFEST.MF of same jars the ""jarname-version-SNAPSHOT.jar" is mentioned, which doesn´t match the content of the war/zip, Resulting in "NoClassDefFoundError" and so on, caused by an invalid classpath The funny point about that story is that with the maven-ear-plugin the jars appear as ""jarname-version-SNAPSHOT.jar" in the generated *.ear. => Any idea how to fix that for the war and zip? Why is there a difference in handling jars between the war, ear and assembly plugins? Isn´t it always the same? Thanx, Torsten - 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: Hook ivy repository to Maven
Hi Scott, Thanks. Can you explain a little bit more? You use Ivy and Maven to access Maven repo, right? What I want is to access Ivy repo with Maven. Best regards, Wei On 4/25/08, Scott Ryan <[EMAIL PROTECTED]> wrote: > > You are correct. We use both Ivy and Maven to access our Archiva proxy > repository as well as several external Maven repositories. The > configuration is very straightforward and you can turn on and off the > transitive dependency feature of Maven within Ivy if you like. > > Scott D. Ryan > President and CTO > Soaring Eagle, L.L.C. > 9742 S.Whitecliff Place > Highlands Ranch, Co. 80129 > (303) 263-3044 > [EMAIL PROTECTED] > > -Original Message- > From: Wei Tan [mailto:[EMAIL PROTECTED] > Sent: Friday, April 25, 2008 5:47 AM > To: users@maven.apache.org > Cc: [EMAIL PROTECTED] > Subject: Hook ivy repository to Maven > > Dear all, > > We have a project which needs to use jars in a ivy repository, but our > project is managed by Maven. > Can Maven access ivy repo. and fetch the dependencies (jars)? > >I was told that ivy can acess Maven repo. > >Thanks. > > Wei > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >