[maven-failsafe-plugin] Running integration test with its own profile

2011-02-02 Thread nodje

Hi,

I'm facing a problem in the release process when running Integration Tests.

We have different profiles for the different environments the release is
made for, namely DEV, TEST, PROD.

Each profile has its own values for DB access.

Now the IT are made to work on the development environment, i-e with the
values of the DEV profile.

When it comes to do a release for the TEST or PROD env, Failsafe will run
with the given profile and ITs will fail due to invalid DB access values.

Ideally, I'd like to be able to specify a different profile, DEV here, for
the maven-failsafe-plugin execution.
I don't think this is possible yet.

So I don't understand how IT can be part of a systematic release process.

How do you perform your releases for a production environment with IT
validation?

Is there a trick to be able to use different profile in a single maven
execution? 
Is it possible to specify one profile per plugin:

-Pprod for war plugin
-Pdev for failsafe plugin

That's be awesome.

cheers
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/maven-failsafe-plugin-Running-integration-test-with-its-own-profile-tp3367473p3367473.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Out of memory. GC overhead limit error

2011-02-02 Thread Lucas Persson


  
  
I guess you have tried to increase the heap?
  E.g export MAVEN_OPTS="-Xmx512m -Xms256m"
  /Lucas
  

On 02/02/2011 05:00 AM, Sridhar Laxmipuram Srinivasan wrote:

  I get this weird error when I try to run maven...
[INFO] Compilation failure
Failure executing javac, but could not parse the error:


The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:172)
at com.sun.tools.javac.comp.MemberEnter.enterAnnotations(MemberEnter.java:743)
at com.sun.tools.javac.comp.MemberEnter.access$300(MemberEnter.java:42)
at com.sun.tools.javac.comp.MemberEnter$5.enterAnnotation(MemberEnter.java:711)
at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:95)
at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:87)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:472)
at com.sun.tools.javac.comp.Enter.main(Enter.java:429)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
at com.sun.tools.javac.main.Main.compile(Main.java:279)
at com.sun.tools.javac.main.Main.compile(Main.java:270)
at com.sun.tools.javac.Main.compile(Main.java:87)
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:597)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:102)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)

Can somebody suggest how to resolve this issue.

thnkx
sridharl
(You learn from your failures and others will learn from your success)





-- 
  
  Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 | | | Mobile:
+46730946656

Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
  
  Oracle Svenska AB, Kronborgsgrnd 17, S-164 28 KISTA,
reg.no. 556254-6746
  
  
  Oracle is committed to developing practices and
products that help protect the environment
  
  

  



Re: Rtrieving version info

2011-02-02 Thread Martin Schayna

On 02/01/2011 10:23 PM, Wayne Fay wrote:

How do I access the  maven version from my java code.

For what purpose, exactly? Are you building a Maven plugin, or simply
building some Java project with Maven?



I have done this by reading version number during runtime from 
MANIFEST.MF file:


import java.util.jar.Attributes;
import java.util.jar.Manifest;

Manifest manifest = 
(Manifest)app.getServletContext().getAttribute(MANIFEST);

if (manifest == null)
try {
manifest = new 
Manifest(app.getServletContext().getResourceAsStream(/META-INF/MANIFEST.MF));

} catch (Exception e) {
manifest = new Manifest();
}
String version = getAttribute(manifest, Implementation-Version);

Just curious if this solution is ok or exists better one?

Thanks, Martin Schayna.


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Rtrieving version info

2011-02-02 Thread Lucas Persson


  
  
I can not resist ;-)
  this.getClass().getPackage().getImplementationVersion();
  
  And you need to instruct maven jar plugin to include version info
  the MANIFEST.MF
  E.g.
    configuration
      archive
    manifest
     
addDefaultImplementationEntriestrue/addDefaultImplementationEntries
    /manifest
      /archive
    /configuration
  http://maven.apache.org/shared/maven-archiver/index.html
  
  Cheers
  Lucas
  

On 02/02/2011 09:45 AM, Martin Schayna wrote:
On
  02/01/2011 10:23 PM, Wayne Fay wrote:
  
  
How do I access the  maven version from
  my java code.
  

For what purpose, exactly? Are you building a Maven plugin, or
simply

building some Java project with Maven?


  
  
  I have done this by reading version number during runtime from
  MANIFEST.MF file:
  
  
      import java.util.jar.Attributes;
  
      import java.util.jar.Manifest;
  
  
      Manifest manifest =
  (Manifest)app.getServletContext().getAttribute("MANIFEST");
  
      if (manifest == null)
  
      try {
  
      manifest = new
Manifest(app.getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF"));
      } catch (Exception e) {
  
      manifest = new Manifest();
  
      }
  
      String version = getAttribute(manifest,
  "Implementation-Version");
  
  
  Just curious if this solution is ok or exists better one?
  
  
  Thanks, Martin Schayna.
  
  
  
-
  
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  
  For additional commands, e-mail: users-h...@maven.apache.org
  
  


-- 
  
  Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 | | | Mobile:
+46730946656

Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
  
  Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA,
reg.no. 556254-6746
  
  
  Oracle is committed to developing practices and
products that help protect the environment
  
  

  



Re: Rtrieving version info

2011-02-02 Thread Anders Hammar
Unfortunately, this does not work when executing unit tests as the jar has
not been created yet.

/Anders
2011/2/2 Lucas Persson lucas.pers...@oracle.com

  I can not resist ;-)
 this.getClass().getPackage().getImplementationVersion();

 And you need to instruct maven jar plugin to include version info the
 MANIFEST.MF
 E.g.
   configuration
 archive
   manifest

 addDefaultImplementationEntriestrue/addDefaultImplementationEntries
   /manifest
 /archive
   /configuration
 http://maven.apache.org/shared/maven-archiver/index.html

 Cheers
 Lucas


 On 02/02/2011 09:45 AM, Martin Schayna wrote:

 On 02/01/2011 10:23 PM, Wayne Fay wrote:

 How do I access the  maven version from my java code.

 For what purpose, exactly? Are you building a Maven plugin, or simply
 building some Java project with Maven?


 I have done this by reading version number during runtime from MANIFEST.MF
 file:

 import java.util.jar.Attributes;
 import java.util.jar.Manifest;

 Manifest manifest =
 (Manifest)app.getServletContext().getAttribute(MANIFEST);
 if (manifest == null)
 try {
 manifest = new
 Manifest(app.getServletContext().getResourceAsStream(/META-INF/MANIFEST.MF));
 } catch (Exception e) {
 manifest = new Manifest();
 }
 String version = getAttribute(manifest, Implementation-Version);

 Just curious if this solution is ok or exists better one?

 Thanks, Martin Schayna.


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


 --
 [image: Oracle] http://www.oracle.com
 Lucas Persson | Principal Member of Technical Staff
 Phone: +4684773644 tel:+4684773644 | | | Mobile: 
 +46730946656tel:+46730946656
 Oracle Communications Platform
 ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm

 Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
 [image: Green Oracle] http://www.oracle.com/commitment Oracle is
 committed to developing practices and products that help protect the
 environment



Maven can't find a RessourceBundle for French locale on Linux

2011-02-02 Thread Yevgen VORONETSKYY
Hello,

 

I'm using:

* Maven 2.2.1

* JDK 1.6

* the standard maven folder structure.

 

I'm getting a strange error only on the Ubuntu integration server. Some
tests fail with the following error:

 

Caused by: java.util.MissingResourceException: Can't find bundle for base
name EmailMessagesBundle, locale fr_FR
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1
427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:777)

 

The same tests pass with success on my Windows XP.

 

It's seems that is the environment problem.

 

Can anyone help me to debug this issue? 

 

Thanks in advance,

-

VORONETSKYY Yevgen

 



RE: Maven can't find a RessourceBundle for French locale on Linux

2011-02-02 Thread Ludwig Magnusson
Do you have support for French locales in your app?

If not I would guess that the default locale on the Ubuntu server is fr_FR.

 

If so, the solution would be to configure a default locale in the app you're
building. Otherwise the default locale is platform dependent.

/Ludwig

 

From: Yevgen VORONETSKYY [mailto:yevgen.voronets...@open-groupe.com] 
Sent: den 2 februari 2011 10:27
To: users@maven.apache.org
Subject: Maven can't find a RessourceBundle for French locale on Linux 

 

Hello,



I'm using:

* Maven 2.2.1

* JDK 1.6

* the standard maven folder structure.



I'm getting a strange error only on the Ubuntu integration server. Some
tests fail with the following error:



Caused by: java.util.MissingResourceException: Can't find bundle for base
name EmailMessagesBundle, locale fr_FR
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1
427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:777)



The same tests pass with success on my Windows XP.



It's seems that is the environment problem.



Can anyone help me to debug this issue?



Thanks in advance,

-

VORONETSKYY Yevgen




  _  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3417 - Release Date: 02/01/11



Re: Site plugin - broken links between modules only on site stage

2011-02-02 Thread Lukas Theussl



Marcin Kuthan wrote:

Hi Lukas

Sorry for inconvenience with my example. I extracted self-contained
test project:
http://m4enterprise.googlecode.com/svn/trunk/test2/

The example is prepared to use m-site-p version 2.3-SNAPSHOT. You can
customize plugin version with com.acme.maven.corporate-pom.siteVersion
property.

I didn't specify staging location because for the default location
target/staging on aggregate project level the results are the same.

Please execute the following commands on the aggregate pom level (top level):
mvn clean
mvn site:site
mvn site:stage -DsiteUrl='scp://myhost/var/www'

Stage is generated into target/staging/myhost/var/www/ but links
to submodules point to
../../../../localhost/var/www/modular-war-parent/.
Instead localhost myhost should be used as I specified in the
command line property. localhost is defined as a default value in
the pom and should be overwritten.



Yes, this is MSITE-135. When building the modules, the siteUrl from the 
parent is used.


If you remove the siteUrl from your properties, then you get correct 
links when using a cl parameter, however, if you don't specify a cl 
parameter, you'll get a ${siteUrl} literal in your path. If it's just 
for staging, this is probably good enough. For live deploy you might 
want to avoid properties, or you could force to fail the build if a 
property is not set.


HTH,
-Lukas



For plugin version 2.2 siteUrl property is interpreted as I expected,
but the links are broken due to wrong directory depth:
mvn site:stage -DsiteUrl='scp://myhost/var/www'
-Dcom.acme.maven.corporate-pom.siteVersion='2.2'

And the link is ../../../../../myhost/var/www/

I hope that it would help.

Marcin


On 1 February 2011 10:04, Lukas Theusslltheu...@apache.org  wrote:


Dear Marcin,

I am unable to build your project (missing dependencies, failed enforcer
rules), please provide a simple, self-contained test project if you want me
to check something for you.

However, from your description, this still sounds like MSITE-135 to me; in
4. the {very-long-name.siteUrl} property is interpolated with the parent
project value instead of the cl value.

But then, since you specify the staging location on the command line anyway,
I don't see why you don't use the stagingDirectory parameter directly,
instead of going via distributionManagement.siteUrl, see
http://maven.apache.org/plugins/maven-site-plugin/usage.html (Staging a
site).


HTH,
-Lukas


Marcin Kuthan wrote:


Hi Lukas

I don't think that my findings are related to MSITE-135. Only
2.3-SNAPSHOT is affected.

You should reproduce the issue in 10 mins:
1. Follow http://code.google.com/p/m4enterprise/wiki/GettingStarted
(only Checkout Source Code and Install Corporate POM sections)
2. Go to trunk/modular-war
3. Call:
mvn clean
mvn -Dcom.acme.maven.corporate-pom.siteVersion=2.3-SNAPSHOT
-Dcom.acme.maven.corporate-pom.enforcerRulesDisabled site:site
site:stage
4. Call:
mvn clean
mvn -Dcom.acme.maven.corporate-pom.siteVersion=2.3-SNAPSHOT
-Dcom.acme.maven.corporate-pom.enforcerRulesDisabled site:site
site:stage
-Dcom.acme.maven.corporate-pom.distributionManagement.siteUrl=scp://host/var/www

For 3) generated stage are fine, links in modular-war to submodules are
valid.
For 4) links are broken,
com.acme.maven.corporate-pom.distributionManagement.siteUrl property
is ignored

If you use
-Dcom.acme.maven.corporate-pom.distributionManagement.siteUrl=file:///home/
results are even worse. URLs are totally broken.

Marcin

On 31 January 2011 16:32, Lukas Theusslltheu...@apache.orgwrote:


This sounds like a manifestation of
http://jira.codehaus.org/browse/MSITE-135 but I'm not sure. If you can
attach a simple test project that would help, I haven't tried to fix this
yet.

-Lukas


Marcin Kuthan wrote:


Hi Lukas

I'm sorry that I didn't specify versions in the first post. I tested
my poms with version 2.2 (for Maven 2.2.1) and version 3.0-beta-3 (for
Maven 3.0.2). In both cases links are invalid.

I updated my build to 2.3-SNAPSHOT and plugin reported invalid
character inurl  element. There was a mistake in property name, and
literal value ${prop} was used instead of interpreted value. The new
plugin versions helped me to find out this bug - great!

I checked again version 2.2, even with fixed property name links in
the project stage are still invalid.

For version 2.3-SNAPSHOT it seems to be almost ok. The depth of
directory levels in the links is now correct but it looks that
distributionManagement.site.url is not resolved correctly.

Please look at

http://code.google.com/p/m4enterprise/source/browse/trunk/corporate-pom/pom.xml.
Element distributionManagement.site.url is set as a property
${com.acme.maven.corporate-pom.distributionManagement.siteUrl}.
Default value of the property is
scp://sites.intranet.acme.com/var/www. In my settings.xml I
overwrite this property with scp://sites.my-company.com/var/www.

As a result: stage is generated into

Re: [maven-failsafe-plugin] Running integration test with its own profile

2011-02-02 Thread Ron Wheeler

This is a frequent issue.
There has been lost of discussion about this.
The Best Practice is to move the deployment info out of your projects 
into JNDI or some other mechanism that ties the variable information to 
the thing causing the variability.


Profiles is not the right way to do this.

Look through the archives for lots of threads about this.
There are a lot of reasons given for why this is a bad idea.

http://blog.artifact-software.com/tech/?p=58 might help introduce JNDI.
Read the official docs as well.
They seem to try to make JNDI look more complicated than it actually is 
but are the definitive docs.


Ron

On 02/02/2011 3:14 AM, nodje wrote:

Hi,

I'm facing a problem in the release process when running Integration Tests.

We have different profiles for the different environments the release is
made for, namely DEV, TEST, PROD.

Each profile has its own values for DB access.

Now the IT are made to work on the development environment, i-e with the
values of the DEV profile.

When it comes to do a release for the TEST or PROD env, Failsafe will run
with the given profile and ITs will fail due to invalid DB access values.

Ideally, I'd like to be able to specify a different profile, DEV here, for
the maven-failsafe-plugin execution.
I don't think this is possible yet.

So I don't understand how IT can be part of a systematic release process.

How do you perform your releases for a production environment with IT
validation?

Is there a trick to be able to use different profile in a single maven
execution?
Is it possible to specify one profile per plugin:

-Pprod for war plugin
-Pdev for failsafe plugin

That's be awesome.

cheers



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Dependencies get unpacked over and over again

2011-02-02 Thread Phillip Hellewell
 On Wed, Jan 19, 2011 at 21:59, Phillip Hellewell ssh...@gmail.com wrote:

 Has anyone else run into this?  I run into it all the time.  It
 appears to be because unpack-dependencies is not updating the
 timestamp on the marker files like it should.

 I found this bug which seems to be exactly my problem:
 http://jira.codehaus.org/browse/MDEP-225

Good news.  I delved into this last week and came up with an even
better patch, and the developer Brian Fox just applied it!

http://svn.apache.org/viewvc?view=revisionsortby=daterevision=1066323

So this fix will be in the next release of the dependency plugin, 2.2.  Hooray!

Phillip

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: maven profile selection

2011-02-02 Thread Jörg Schaible
Hi Joachim,

Joachim Van der Auwera wrote:

 On 02/01/2011 11:03 PM, Jörg Schaible wrote:
 Hi Joachim,

 Joachim Van der Auwera wrote:

 On 02/01/2011 10:55 AM, Jörg Schaible wrote:
 Joachim Van der Auwera wrote:

 Hi,

 I have a build for a GWT module. This includes the GWT plug-in for
 compilation (which is slow) and selenium integration tests (slow
 again).

 Some of the developers use m2eclipse for development, so we have
 configured the GWT compilation to be disabled when the m2e.version
 property is set (this is the only way we have found to discover the
 use of m2eclipse).

 We would like to be able to disable either GWT compilation using
 -DskipGwt on the command line and/or disable selenium tests to be run
 using -DskipSelenium.

 Our pom currently contains the following profile configuration
 (excluding profile details):
 Activation is only supported for system properties, project properties
 (i.e. properties defined in a POM) cannot be supported. Profile
 evaluation happens before any project evaluation (it has to).
 Thanks for the info.
 Do you think it makes sense to implement allowing expressions like
 !skipGWT  !m2e.version for activation of a profile?
 Could have been handy already. However, my typical approach is currently
 to define as many properties as possible within the profile that triggers
 the build behavior.

 If e.g. the gwt plugin has a skip execution, then invent a property on
 your own (e.g. mycompany.skip.gwt) and set it by default to true. Add the
 skipExecution element to the configuration and set the value using this
 property. In such a case it does not really matter if the profile
 activated by !skipGWT and the one activated by !m2e.version define the
 value of this property as true individually.
 
 Does that not mean that the plugins which are to be enabled/disabled
 each need a property to enable or disable that plugin?

Yes. Fortunately a lot have (incl. GWT plugin, see 
http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html#skip).

 Otherwise I don't
 really understand. Could you point me to a pom where this approach is
 used?

Our poms are inhouse, but the essential part is something like:


 build
   plugins
 artifactIdgwt-maven-plugin
 configuration
   skip${mycompany.skip}/skip
 /configuration
   /plugins
 /build
 properties
   mycompany.skipfalse/mycompany.skip
 /properties
 profiles
   profile
 idA/id
 properties
   mycompany.skiptrue/mycompany.skip
 /properties
   /profile
   profile
 idB/id
 properties
   mycompany.skiptrue/mycompany.skip
 /properties
   /profile
 /profiles


 Thanks for much for your help.

You're welcome,
Jörg



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: adding a jar as resource to a webapp

2011-02-02 Thread Mauricio Ferreyra
Hi Fredy,
You can use the dependency  scope
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope.



On Wed, Feb 2, 2011 at 12:59 PM, Hauschel Fred Robert 
fredrobert.hausc...@cirquent.de wrote:

 Hi all,

 I have to add a jar (maven module! Available in the maven repo) to a war
 file.

 The jar should not be added to the classpath at build, runtime! And it
 should not be included in WEB-INF/lib.



 Any idea ?



 Thanks Fredy




-- 
*Ing. Mauricio Ferreyra*
Cordoba - Argentina

Turn off electronic devices, Simply turning off your television, DVD player,
stereo and computer when you’re not using them will save you thousands of
pounds of carbon dioxide a year.


Re: adding a jar as resource to a webapp

2011-02-02 Thread Antonio Petrelli
2011/2/2 Hauschel Fred Robert fredrobert.hausc...@cirquent.de:
 The jar should not be added to the classpath at build, runtime! And it
 should not be included in WEB-INF/lib.

Not at build, not at runtime and not in WEB-INF/lib? What do you need it for?

Antonio

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: adding a jar as resource to a webapp

2011-02-02 Thread Marc Rohlfs

I'd suggest it could be a JAR containing an Applet.

The maven-dependency-plugin might help You out. Use on of the following 
approaches:

http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html


On 02/02/11 17:06, Antonio Petrelli wrote:

The jar should not be added to the classpath at build, runtime! And it
should not be included in WEB-INF/lib.

Not at build, not at runtime and not in WEB-INF/lib? What do you need it for?


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: Nothing put into target directories

2011-02-02 Thread Kenneth Litwak
Thanks for the links but actually I've read a bunch of stuff on Maven. 
Unfortunately, I've found diverse examples, mostly generic, and none that 
address the exact specifics of precisely, in every possible detail, the exact 
structure that one needs for a multi-module project and every _single_ line in 
every file that Maven needs.  If you can point me to a reference for that, I'll 
happily read it.  I read the POM reference at the Maven site, for example, and 
didn't see any detailed, full-example-based discussion of what I'm trying to 
find out.


-Original Message-
From: Hilco Wijbenga [mailto:hilco.wijbe...@gmail.com] 
Sent: Tuesday, February 01, 2011 5:03 PM
To: Maven Users List
Subject: Re: Nothing put into target directories

On 1 February 2011 16:40, Kenneth Litwak klit...@apu.edu wrote:
 When I use
 mvn compile war:war
 instead, I get the same error I was getting before:
 Error assembling war:  webxml attribute is required

  The web page you pointed me to has one project structure but I am using a 
 different project structure, which involves having two modules in one 
 project.  So I pasted in the source for the pom for the web part.  There 
 seems to be a requirement that I have something like
 Project dir
    core
      src
        main
    web
       src
          main
              webapp
                     aaa
                         bbb
                            ccc
                              FrontController.java
                     WEB-INF
                        web.xml



 In case this loses formatting in email, core and web are at the same 
 directory level under the project directory and aaa and WEB-INF are at the 
 same directory level under webapp.

 Do I need to do more to tell Maven the paths under web so that it can find 
 WEB-INF?  Thanks.

I get the feeling you haven't done much research yet. You don't seem
to know even the very basics. Check out these links:

http://www.sonatype.com/books/maven-book/
http://maven.apache.org/guides/index.html
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Nothing put into target directories

2011-02-02 Thread Hilco Wijbenga
On 2 February 2011 08:50, Kenneth Litwak klit...@apu.edu wrote:
 Thanks for the links but actually I've read a bunch of stuff on Maven. 
 Unfortunately, I've found diverse examples, mostly generic, and none that 
 address the exact specifics of precisely, in every possible detail, the exact 
 structure that one needs for a multi-module project and every _single_ line 
 in every file that Maven needs.  If you can point me to a reference for that, 
 I'll happily read it.  I read the POM reference at the Maven site, for 
 example, and didn't see any detailed, full-example-based discussion of what 
 I'm trying to find out.

I know it's a bit frustrating, you want to get things done but you
want to do it properly and that's slowing you down. You are really
going to have to read Maven by Example
(http://www.sonatype.com/books.html). Try the examples and try to
understand the structure of a project (e.g. Java source files don't go
in src/main/webapp but in src/main/java). Start with a single project,
not a multi-project build. You need to understand the Maven lifecycle
and then have a look at the various plugins as they become relevant to
you (http://maven.apache.org/plugins/index.html).

For all its faults, Maven is incredibly well documented so take
advantage of that and read it. It shouldn't take you all that long.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Nothing put into target directories

2011-02-02 Thread Ron Wheeler

On 02/02/2011 12:46 PM, Hilco Wijbenga wrote:

On 2 February 2011 08:50, Kenneth Litwakklit...@apu.edu  wrote:

Thanks for the links but actually I've read a bunch of stuff on Maven. 
Unfortunately, I've found diverse examples, mostly generic, and none that 
address the exact specifics of precisely, in every possible detail, the exact 
structure that one needs for a multi-module project and every _single_ line in 
every file that Maven needs.  If you can point me to a reference for that, I'll 
happily read it.  I read the POM reference at the Maven site, for example, and 
didn't see any detailed, full-example-based discussion of what I'm trying to 
find out.

I know it's a bit frustrating, you want to get things done but you
want to do it properly and that's slowing you down. You are really
going to have to read Maven by Example
(http://www.sonatype.com/books.html). Try the examples and try to
understand the structure of a project (e.g. Java source files don't go
in src/main/webapp but in src/main/java). Start with a single project,
not a multi-project build. You need to understand the Maven lifecycle
and then have a look at the various plugins as they become relevant to
you (http://maven.apache.org/plugins/index.html).

For all its faults, Maven is incredibly well documented so take
advantage of that and read it. It shouldn't take you all that long.
It really lacks a Best Practice guide that lays out exactly how to 
construct applications of different types in different situations.
The difficulty is that the guys that really know Maven well (Apache team 
members and Sonotype guys) are so intimately involved in the product 
that they can give you 20 ways to get anything done but are not very 
focused on dictating Best Practices.
They also know the code so well and are fluent in reading it that they 
forget that the rest of us are just trying to get going as quickly as 
possible and regard
the Maven setup as a necessary tool but not anywhere near the top of the 
list of things that we have to consider to get our applications built.


The rest of us are so happy that we are getting things built but are not 
sure if we are doing it optimally.


What you are asking for is exactly what is missing in the documentation.
The books are helpful and there are a few but they all suffer from being 
a bit  too inside the beltway and give way too many ways to do things.





-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Nothing put into target directories

2011-02-02 Thread Hilco Wijbenga
On 2 February 2011 11:04, Ron Wheeler rwhee...@artifact-software.com wrote:
 On 02/02/2011 12:46 PM, Hilco Wijbenga wrote:
 On 2 February 2011 08:50, Kenneth Litwakklit...@apu.edu  wrote:
 Thanks for the links but actually I've read a bunch of stuff on Maven.
 Unfortunately, I've found diverse examples, mostly generic, and none that
 address the exact specifics of precisely, in every possible detail, the
 exact structure that one needs for a multi-module project and every _single_
 line in every file that Maven needs.  If you can point me to a reference for
 that, I'll happily read it.  I read the POM reference at the Maven site, for
 example, and didn't see any detailed, full-example-based discussion of what
 I'm trying to find out.

 I know it's a bit frustrating, you want to get things done but you
 want to do it properly and that's slowing you down. You are really
 going to have to read Maven by Example
 (http://www.sonatype.com/books.html). Try the examples and try to
 understand the structure of a project (e.g. Java source files don't go
 in src/main/webapp but in src/main/java). Start with a single project,
 not a multi-project build. You need to understand the Maven lifecycle
 and then have a look at the various plugins as they become relevant to
 you (http://maven.apache.org/plugins/index.html).

 For all its faults, Maven is incredibly well documented so take
 advantage of that and read it. It shouldn't take you all that long.

 It really lacks a Best Practice guide that lays out exactly how to construct
 applications of different types in different situations.
 The difficulty is that the guys that really know Maven well (Apache team
 members and Sonotype guys) are so intimately involved in the product that
 they can give you 20 ways to get anything done but are not very focused on
 dictating Best Practices.
 They also know the code so well and are fluent in reading it that they
 forget that the rest of us are just trying to get going as quickly as
 possible and regard
 the Maven setup as a necessary tool but not anywhere near the top of the
 list of things that we have to consider to get our applications built.

Hear, hear! :-)

 The rest of us are so happy that we are getting things built but are not
 sure if we are doing it optimally.

 What you are asking for is exactly what is missing in the documentation.
 The books are helpful and there are a few but they all suffer from being a
 bit  too inside the beltway and give way too many ways to do things.

I too would love to see such a Best Practices guide. There is too much
you're not doing it the Maven Way without any reference to what the
Maven Way *is*. :-)

But while I agree with you in general, in this particular case I
believe Maven by Example shows (in excruciating detail and with
examples) exactly what the OP wants to do (or seems to want to do).

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Local Clone Helpfullness as a possible Maven Plugin

2011-02-02 Thread Benson Margulies
Here's something that happens to me frequently.

Goal: make a local release off the trunk of some FOSS thing that will
be a while releasing a fix that I need.

Typical set of activities:

1: git svn clone
2:  branch
3: edit poms, change version, scm paths, deploymentRepository
4: run release plugin

#3 is rather a fiddly, error prone process.

If, on top of this, I also want to make local changes and push them
back, it's fiddly to sort out the purely local pom changes.

All of this suggests two possible lines of country:

1) more fun in the version plugin to deal with scm and deployment.

2) some sort of a way to 'shadow' a POM with local changes instead of
editing them in.

Opinions?

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Local Clone Helpfullness as a possible Maven Plugin

2011-02-02 Thread Kalle Korhonen
Why do you need to re-release? I typically checkout/clone, build, edit
the pom directly and change the version to
existingversion-mycompany-1, then take both the pom and the
(snapshot) library and deploy them to Nexus.

Kalle


On Wed, Feb 2, 2011 at 2:17 PM, Benson Margulies bimargul...@gmail.com wrote:
 Here's something that happens to me frequently.

 Goal: make a local release off the trunk of some FOSS thing that will
 be a while releasing a fix that I need.

 Typical set of activities:

 1: git svn clone
 2:  branch
 3: edit poms, change version, scm paths, deploymentRepository
 4: run release plugin

 #3 is rather a fiddly, error prone process.

 If, on top of this, I also want to make local changes and push them
 back, it's fiddly to sort out the purely local pom changes.

 All of this suggests two possible lines of country:

 1) more fun in the version plugin to deal with scm and deployment.

 2) some sort of a way to 'shadow' a POM with local changes instead of
 editing them in.

 Opinions?

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



getting maven failure code in ant

2011-02-02 Thread kamilofski

I am currently invoking mvn from ant.  However, when there is a BUILD FAILURE
inside mvn, the ant script is still showing that the build is successful. 

How could I determine what the error code is from mvn and read it into ant? 
Any ideas?
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/getting-maven-failure-code-in-ant-tp3368588p3368588.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Local Clone Helpfullness as a possible Maven Plugin

2011-02-02 Thread Benson Margulies
For a simple 'just-a-jar' project, that's fine. If I need some stuff
from someone's release profile .. The local change case is probably
more compelling.

On Wed, Feb 2, 2011 at 5:25 PM, Kalle Korhonen
kalle.o.korho...@gmail.com wrote:
 Why do you need to re-release? I typically checkout/clone, build, edit
 the pom directly and change the version to
 existingversion-mycompany-1, then take both the pom and the
 (snapshot) library and deploy them to Nexus.

 Kalle


 On Wed, Feb 2, 2011 at 2:17 PM, Benson Margulies bimargul...@gmail.com 
 wrote:
 Here's something that happens to me frequently.

 Goal: make a local release off the trunk of some FOSS thing that will
 be a while releasing a fix that I need.

 Typical set of activities:

 1: git svn clone
 2:  branch
 3: edit poms, change version, scm paths, deploymentRepository
 4: run release plugin

 #3 is rather a fiddly, error prone process.

 If, on top of this, I also want to make local changes and push them
 back, it's fiddly to sort out the purely local pom changes.

 All of this suggests two possible lines of country:

 1) more fun in the version plugin to deal with scm and deployment.

 2) some sort of a way to 'shadow' a POM with local changes instead of
 editing them in.

 Opinions?

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: getting maven failure code in ant

2011-02-02 Thread Martin Gainty

you can run mvn in ant as a java task

suggested attributes::
spawn=false
fork=false
output=SomeOutputFIle
error=SomeErrorFile
be sure all the necessary maven jars are on classpath before invoking

BTW: this is  the command line you want to emulate in your Java task..you'll 
need to supply all the env variables

%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% 
-Dclassworlds.conf=%M2_HOME%\bin\m2.conf -Dmaven.home=%M2_HOME% 
%CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%

i assume you're using the same JVM for ANT and maven?
 
http://www.jajakarta.org/ant/ant-1.6.1/docs/en/manual/CoreTasks/java.html
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 Date: Wed, 2 Feb 2011 14:45:05 -0800
 From: kamilsk...@gmail.com
 To: users@maven.apache.org
 Subject: getting maven failure code in ant
 
 
 I am currently invoking mvn from ant.  However, when there is a BUILD FAILURE
 inside mvn, the ant script is still showing that the build is successful. 
 
 How could I determine what the error code is from mvn and read it into ant? 
 Any ideas?
 -- 
 View this message in context: 
 http://maven.40175.n5.nabble.com/getting-maven-failure-code-in-ant-tp3368588p3368588.html
 Sent from the Maven - Users mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
  

Re: Using Apache parent pom

2011-02-02 Thread Brian Fox
Hi Craig, there's also release-disc...@apache.org to talk about
release processes specific to Apache.

On Tue, Feb 1, 2011 at 5:54 PM, Craig L Russell
craig.russ...@oracle.com wrote:
 Thanks Kalle, looks like the right level for me to master before I ask more
 detailed questions.

 Craig

 On Feb 1, 2011, at 2:48 PM, Kalle Korhonen wrote:

 http://www.apache.org/dev/publishing-maven-artifacts.html

 Kalle


 On Tue, Feb 1, 2011 at 2:44 PM, Craig L Russell
 craig.russ...@oracle.com wrote:

 Hi,

 I'm using maven2 to build JDO db.apache.org/jdo and would like a pointer
 to
 how to use the Apache parent pom. I've searched Google for a while and
 haven't found a detailed how, why, cookbook description.

 What I have read is that using this pom will simplify the release process
 and allow us to use the Nexus staging repository.

 Any pointers? Please include me in the reply; I'm not subscribed to this
 list.

 Thanks,

 Craig L Russell
 Secretary, Apache Software Foundation
 Chair, OpenJPA PMC
 c...@apache.org http://db.apache.org/jdo










 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: [maven-failsafe-plugin] Running integration test with its own profile

2011-02-02 Thread nodje

Invaluable piece of information Ron, thanks a lot.

I've been searching the archives without success, with 'profile plugin'
'failsafe profile', all woudn't yield much relevant results.
But I'd still be happy if you could point me to some efficient keywords to
search for.

I don't remember JNDI as that complex actually, I just gave up on it since
Spring adoption as it didn't seem necessary. 
And ah, well, that's a piece you configure in the webapp server, so it makes
our app not portable anymore. That's a minor trade off, but still, it's so
valuable to be able to put a war archive in any container without prior
config.

Cheers
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/maven-failsafe-plugin-Running-integration-test-with-its-own-profile-tp3367473p3368765.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Using Apache parent pom

2011-02-02 Thread Benson Margulies
(toots own horn) you might find the doc attached to the JIRA MPOM-5 useful.

On Wed, Feb 2, 2011 at 9:08 PM, Brian Fox bri...@infinity.nu wrote:
 Hi Craig, there's also release-disc...@apache.org to talk about
 release processes specific to Apache.

 On Tue, Feb 1, 2011 at 5:54 PM, Craig L Russell
 craig.russ...@oracle.com wrote:
 Thanks Kalle, looks like the right level for me to master before I ask more
 detailed questions.

 Craig

 On Feb 1, 2011, at 2:48 PM, Kalle Korhonen wrote:

 http://www.apache.org/dev/publishing-maven-artifacts.html

 Kalle


 On Tue, Feb 1, 2011 at 2:44 PM, Craig L Russell
 craig.russ...@oracle.com wrote:

 Hi,

 I'm using maven2 to build JDO db.apache.org/jdo and would like a pointer
 to
 how to use the Apache parent pom. I've searched Google for a while and
 haven't found a detailed how, why, cookbook description.

 What I have read is that using this pom will simplify the release process
 and allow us to use the Nexus staging repository.

 Any pointers? Please include me in the reply; I'm not subscribed to this
 list.

 Thanks,

 Craig L Russell
 Secretary, Apache Software Foundation
 Chair, OpenJPA PMC
 c...@apache.org http://db.apache.org/jdo










 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: getting maven failure code in ant

2011-02-02 Thread kamilofski

Thanks for the quick response.

I am actually already running maven from within ANT, except I am not sure
how to signal ant to say 'build failure' when the maven build fails. 
Currently it is saying 'build successful' in ANT but 'build failure' in
maven.
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/getting-maven-failure-code-in-ant-tp3368588p3368812.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



AW: adding a jar as resource to a webapp

2011-02-02 Thread Hauschel Fred Robert
Hi Marc,
that is exactly what I need! Thank you very much!!

@Antonio, Martin:
Because of classpath manipulation (switching 3rdParty libraries) while runtime! 
The library should not be loaded from the webapp classloader.

Fredy


-Ursprüngliche Nachricht-
Von: Marc Rohlfs [mailto:pomar...@googlemail.com] 
Gesendet: Mittwoch, 2. Februar 2011 17:44
An: Maven Users List
Betreff: Re: adding a jar as resource to a webapp

I'd suggest it could be a JAR containing an Applet.

The maven-dependency-plugin might help You out. Use on of the following 
approaches:
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-artifacts.html
http://maven.apache.org/plugins/maven-dependency-plugin/examples/copying-project-dependencies.html


On 02/02/11 17:06, Antonio Petrelli wrote:
 The jar should not be added to the classpath at build, runtime! And it
 should not be included in WEB-INF/lib.
 Not at build, not at runtime and not in WEB-INF/lib? What do you need it for?

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org