Prevent duplicates in assembly

2010-02-04 Thread Hauschild, Klaus (EXT)
Hi,

I'm using the assembly-plugin to create a jar-with-dependencies by the build-in 
assembly descriptor. In the resulting .jar appears some entries twice. Is there 
a way to prevent those duplicates.
My current workarround is: unzip and zip the jar by hand after packing.

Thanks



Re: Need help configuring maven to get through company Proxy?

2010-02-04 Thread Antonio Petrelli
2010/2/3  tonte.poun...@aviall.com:
 When I try to down load plugins from the Maven Central Repo, I get
 redirected to my companies Novell Proxy Server authentication web page;
 where an actual user is required to enter their (eDirectory/LDAP)
 credentials and click the submit button to be authenticated through the
 proxy and then forward to the destination URL.

Just a fast question: are you using NTLM? This is your case if the
usernames are in the form:
domain\username
If yes, then this wiki might help you:
http://docs.codehaus.org/display/MAVENUSER/Configuring+Maven+behind+an+NTLM+proxy

It's worth a try :-)

Ciao
Antonio

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



Re: Prevent duplicates in assembly

2010-02-04 Thread Anders Hammar
Could this be due to the fact that you have more than one dependency that
includes the same class?

/Anders

On Thu, Feb 4, 2010 at 09:13, Hauschild, Klaus (EXT) 
klaus.hauschild@siemens.com wrote:

 Hi,

 I'm using the assembly-plugin to create a jar-with-dependencies by the
 build-in assembly descriptor. In the resulting .jar appears some entries
 twice. Is there a way to prevent those duplicates.
 My current workarround is: unzip and zip the jar by hand after packing.

 Thanks




Re: Prevent duplicates in assembly

2010-02-04 Thread Aleksey Didik

Hello.
Is twice entries from different jar dependencies?
Is this jar dependencies the same artifacts but with different versions?
Or it's just classes with equals names from different artifacts?

Aleksey.

04.02.2010 12:13, Hauschild, Klaus (EXT) пишет:

Hi,

I'm using the assembly-plugin to create a jar-with-dependencies by the build-in 
assembly descriptor. In the resulting .jar appears some entries twice. Is there 
a way to prevent those duplicates.
My current workarround is: unzip and zip the jar by hand after packing.

Thanks


   



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



Read properties from pom.xml from Java

2010-02-04 Thread Søren Krogh Neigaard
Hi

 

I have been tossed into a maven controlled project. We run our junit tests from 
Eclipse and also on our build server. When ever they are run, some maven magic 
happens so that username/password/driver/url for the dabase is correctly set 
for the user pc or the buildserver. However I need to make a small helper class 
for my junit tests that wipes the database and loads some testdata on the 
database for every junit test.

 

The username/password/driver/url for the database is set in the pom.xml file by 
maven. How do I read these values from my Java helper class?

 

Best regards

Søren 

 



AW: Prevent duplicates in assembly

2010-02-04 Thread Hauschild, Klaus (EXT)
Yes, there are more than one dependency. Currently the problematic entry is 
META-INF/NOTICE.TXT.

After packing the .jar I use this with JNLP and its Jar-Loader doesn't support 
duplicate entries in jar files.

-Ursprüngliche Nachricht-
Von: Aleksey Didik [mailto:di...@magenta-technology.ru] 
Gesendet: Donnerstag, 4. Februar 2010 09:36
An: Maven Users List
Betreff: Re: Prevent duplicates in assembly

Hello.
Is twice entries from different jar dependencies?
Is this jar dependencies the same artifacts but with different versions?
Or it's just classes with equals names from different artifacts?

Aleksey.

04.02.2010 12:13, Hauschild, Klaus (EXT) пишет:
 Hi,

 I'm using the assembly-plugin to create a jar-with-dependencies by the 
 build-in assembly descriptor. In the resulting .jar appears some entries 
 twice. Is there a way to prevent those duplicates.
 My current workarround is: unzip and zip the jar by hand after packing.

 Thanks





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



Re: How to download every dependency we need at once?

2010-02-04 Thread ert_nutler

I have a similar arrangement and would love to see your commands if you can
post them.  Thanks in advance. 
-- 
View this message in context: 
http://n2.nabble.com/How-to-download-every-dependency-we-need-at-once-tp4169797p4511059.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: RFC: Maven License Verifier Plugin

2010-02-04 Thread Karl Heinz Marbaise

Hi,


Anders Hammar wrote:
 
 Maybe have a look how the assembly plugin works with descriptors? Having
 pre-defined configs that can be referenced by id/name could be handy.
Good hint...


Anders Hammar wrote:
 However, I'm not sure if using a URL to download the descriptor/config is
 a
 good idea. I'm thinking that that could be misused by linking to configs
 outside your environment that change or can't sometimes be downloaded.Yeah
 that's that thought about as well...This means someone could define URL
 outside of the build environment 
and that could cause a none reproducible build. Which is bad...


Anders Hammar wrote:
 
 I would start simple and then add new possibilities. What would be very
 nice, is if you implement this in modules so that the functionality can be
 used by other types of plugins as well, such as a Nexus plugin to verify
 this centrally in a repo manager. This is not a big problem to separate
 the code from the plugin functionality...


Anders Hammar wrote:
 But I guess you could re-factor that later on.
This is of course possible as well...

Many thanks for you hints and comments.

Kind Regards
Karl Heinz Marbaise
-- 
View this message in context: 
http://old.nabble.com/RFC%3A-Maven-License-Verifier-Plugin-tp27445231p27449954.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: AW: Prevent duplicates in assembly

2010-02-04 Thread Aleksey Didik
In this case may be better to use maven-shade-plugin
http://maven.apache.org/plugins/maven-shade-plugin/index.html to make
jar-with-dependencies artifact.
As I know, it has some merge mechanizm for compose jars with equal
entries names.

HTH,
Aleksey.

04.02.2010 13:10, Hauschild, Klaus (EXT) пишет:
 Yes, there are more than one dependency. Currently the problematic entry is 
 META-INF/NOTICE.TXT.

 After packing the .jar I use this with JNLP and its Jar-Loader doesn't 
 support duplicate entries in jar files.

 -Ursprüngliche Nachricht-
 Von: Aleksey Didik [mailto:di...@magenta-technology.ru] 
 Gesendet: Donnerstag, 4. Februar 2010 09:36
 An: Maven Users List
 Betreff: Re: Prevent duplicates in assembly

 Hello.
 Is twice entries from different jar dependencies?
 Is this jar dependencies the same artifacts but with different versions?
 Or it's just classes with equals names from different artifacts?

 Aleksey.

 04.02.2010 12:13, Hauschild, Klaus (EXT) пишет:
   
 Hi,

 I'm using the assembly-plugin to create a jar-with-dependencies by the 
 build-in assembly descriptor. In the resulting .jar appears some entries 
 twice. Is there a way to prevent those duplicates.
 My current workarround is: unzip and zip the jar by hand after packing.

 Thanks



 

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

   



Re: RFC: Maven License Verifier Plugin

2010-02-04 Thread Anders Hammar
Your comment about reproducible builds is VERY important. Lots of people
don't think of that I we need to help them not doing bad things...

/Anders

On Thu, Feb 4, 2010 at 10:37, Karl Heinz Marbaise k...@soebes.de wrote:


 Hi,


 Anders Hammar wrote:
 
  Maybe have a look how the assembly plugin works with descriptors? Having
  pre-defined configs that can be referenced by id/name could be handy.
 Good hint...


 Anders Hammar wrote:
  However, I'm not sure if using a URL to download the descriptor/config is
  a
  good idea. I'm thinking that that could be misused by linking to configs
  outside your environment that change or can't sometimes be
 downloaded.Yeah
  that's that thought about as well...This means someone could define URL
  outside of the build environment
 and that could cause a none reproducible build. Which is bad...


 Anders Hammar wrote:
 
  I would start simple and then add new possibilities. What would be very
  nice, is if you implement this in modules so that the functionality can
 be
  used by other types of plugins as well, such as a Nexus plugin to verify
  this centrally in a repo manager. This is not a big problem to separate
  the code from the plugin functionality...


 Anders Hammar wrote:
  But I guess you could re-factor that later on.
 This is of course possible as well...

 Many thanks for you hints and comments.

 Kind Regards
 Karl Heinz Marbaise
 --
 View this message in context:
 http://old.nabble.com/RFC%3A-Maven-License-Verifier-Plugin-tp27445231p27449954.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: Read properties from pom.xml from Java

2010-02-04 Thread bernd . adamowicz
Sounds like this might help you:

- Create a Maven plugin which is executed in any phase bevore test, 
e.g. 'generate-test-resources'. This will make it possible to set up the 
database. This plugin might help for starting the database (only if you're 
using HSQL): 
http://gforge.openehealth.org/gf/project/development/wiki/?pagename=Documentation+HSQLDB+plugin
, but there are others, too.

- Reading of POM-properties inside a Maven plugin is easy and described 
here: 
http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-mojo-params.html#writing-plugins-sect-param-values

However, the scenario described by you clearly indicates that this is not 
a unit test instead it is an integration test where other rules/plugins 
might apply, e.g. maven-invoker-plugin. But this would recommend a 
restructuring of your project and might not be what you want. 

Bernd






Søren Krogh Neigaard soeren.krogh.neiga...@systematic.com wrote on 
04.02.2010 09:59:26:

 [image removed] 
 
 Read properties from pom.xml from Java
 
 Søren Krogh Neigaard 
 
 to:
 
 users
 
 04.02.2010 10:00
 
 Please respond to Maven Users List
 
 Hi
 
 
 
 I have been tossed into a maven controlled project. We run our junit
 tests from Eclipse and also on our build server. When ever they are 
 run, some maven magic happens so that username/password/driver/url 
 for the dabase is correctly set for the user pc or the buildserver. 
 However I need to make a small helper class for my junit tests that 
 wipes the database and loads some testdata on the database for every
 junit test.
 
 
 
 The username/password/driver/url for the database is set in the 
 pom.xml file by maven. How do I read these values from my Java helper 
class?
 
 
 
 Best regards
 
 Søren 
 
 
 



InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. 
Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 / 
USt.-IdNr.: DE 198388516  

Re: RFC: Maven License Verifier Plugin

2010-02-04 Thread Dmitry Katsubo
Hi Karl!

It would be nice to have a plugin, that for each dependency checks the
META-INF\manifest.mf for Bundle-License entry or tries to guess the
licence type from META-INF\LICENSE.txt or META-INF\license files. It
would be nice, if plugin takes care of autodetecting of licences of
leave dependencies, which are not under our control, but for which we
would like to check the license compatibility. It can warn the user,
if the license type is not detected and can, for example, allow you to
set the license for a given groupId/artifactId (and make this setting
project-wide from parent pom).

That would be a dream :) Or is it a reality already?

Karl Heinz Marbaise wrote on 04/02/2010 00:15:
 Hi there,
 
 i have started with implementing some parts of a new Maven Plugin.
 
 The Maven License Verifier Plugin (MLV for short).
 
 I would present you the idea of the plugin and would like to know if
 someone has some suggestions, idea's, comments etc.
 
 
 The basic idea is to check every dependency which is used (incl.
 transitive dependencies) of a build (during a mvn ..) and see if all
 artifacts have licenses which are based on the policy (of a company
 etc.) are allowed ...that's often a point in companies...Some companies
 says only allowed is the Apache License (for example)...
 
 
 The Plugin will use a configuration file which defines different
 categories of Licenses
 (http://site.supose.org/maven-licenses-verifier-plugin/licenses.html).
 
 The default configuration will not break a build it will just warn about
 artifacts which don't have a license defined or which in a particular
 category (WARN, INVALID or none of them).
 
 About what I'm unsure about is where to define the license.xml file (or
 multiple of them):
 
 Option 1:
 Use a particular folder: src/main/licenses/ and put one or more files in
 there which will be automatically be loaded.
 
 Option 2:
 Give a single or multiple locations for license.xml files in the
 configuration section for the plugin.
 
 Option 3:
 Use an URL to define where to download the license.xml file or may be
 multiple URL's. This could be usefull in Companies to have central
 location where maintain such files which can be used for every project
 in a company...(May be it's possible to store that in a repository
 manager like Nexus ?)
 
 Option 4:
 Use an Artifact which can be created and stored into a Maven repository ?
 
 Of course the plugin is configurable in that way to brake the build if
 you do ...(e.g. failOnWarning like ?)...
 
 
 The other question is how to behave in a reactor build (Multi Module
 build):
   - Just have a single Configuration (e.g. in Root) and put the
 configuration file(s) there (not sure how to handle this technically)...
 
 
 And what is needed as well is to be able to exclude particular artifacts
 from being checked (excludes...exclude.).. (I have to check how
 to implement this but this is an other question)...
 
 
 Kind regards
 Karl Heinz Marbaise


-- 
With best regards,
Dmitry

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



SUN Maven(2) repo changes? JMX, JMS, Mail, JMXTOOLS

2010-02-04 Thread Andy Jefferson
For the last few hours I've been getting issues with Maven2 downloading 
jars/poms for the following SUN jars

jmxtools-1.2.1
jmxri-1.2.1
mail-1.4
jms-1.1

Maven2 goes off to, for example,

https://maven-repository.dev.java.net/nonav/repository/com.sun.jmx/poms/jmxri-1.2.1.pom

which replies with HTML as follows

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title301 Moved Permanently/title
/headbody
h1Moved Permanently/h1
pThe document has moved a 
href=http://download.java.net/maven/1/com.sun.jdmk/poms/jmxtools-1.2.1.pom;here/a./p
hr
addressApache Server at maven-repository.dev.java.net Port 443/address
/body/html


which is promptly stored in my local M2 repo as XXX.pom, and hell follows after 
...


The location referred to in this file doesn't exist either.

Can somebody who knows the people in charge of SUN's M2 repo please advise them 
of this.

--
Andy




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



Re: Read properties from pom.xml from Java

2010-02-04 Thread Martin Höller
Hi!

Am Donnerstag, 4. Februar 2010 09:59:26 schrieb Søren Krogh Neigaard:
 The username/password/driver/url for the database is set in the pom.xml
 file by maven. How do I read these values from my Java helper class?

Set them in the pom.xml via properties, eg.:

project
  properties
database.usernamenobody/database.username
  /properties
/project

And access these properties in Java via 
System.getProperty(databse.username).

hth,
- martin


signature.asc
Description: This is a digitally signed message part.


Re: SUN Maven(2) repo changes? JMX, JMS, Mail, JMXTOOLS

2010-02-04 Thread bernd . adamowicz
We had the same problem with, I guess, a Fornax repository a few months 
ago and it was terrible. Question to Maven developers: Wouldn't  it be 
possible to treat a 301 (redirect) error the same way as a 40x error? This 
would prevent the POMs from beeing corrupted.

Bernd


Andy Jefferson andy_jeffer...@yahoo.com wrote on 04.02.2010 11:47:13:

 [image removed] 
 
 SUN Maven(2) repo changes? JMX, JMS, Mail, JMXTOOLS
 
 Andy Jefferson 
 
 to:
 
 users
 
 04.02.2010 11:58
 
 Please respond to Maven Users List
 
 For the last few hours I've been getting issues with Maven2 
 downloading jars/poms for the following SUN jars
 
 jmxtools-1.2.1
 jmxri-1.2.1
 mail-1.4
 jms-1.1
 
 Maven2 goes off to, for example,
 
 https://maven-repository.dev.java.net/nonav/repository/com.sun.jmx/
 poms/jmxri-1.2.1.pom
 
 which replies with HTML as follows
 
 !DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
 htmlhead
 title301 Moved Permanently/title
 /headbody
 h1Moved Permanently/h1
 pThe document has moved a href=http://download.java.net/maven/1/
 com.sun.jdmk/poms/jmxtools-1.2.1.pomhere/a./p
 hr
 addressApache Server at maven-repository.dev.java.net Port 
443/address
 /body/html
 
 
 which is promptly stored in my local M2 repo as XXX.pom, and hell 
 follows after ...
 
 
 The location referred to in this file doesn't exist either.
 
 Can somebody who knows the people in charge of SUN's M2 repo please 
 advise them of this.
 
 --
 Andy
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 



InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. 
Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 / 
USt.-IdNr.: DE 198388516  

Re: RFC: Maven License Verifier Plugin

2010-02-04 Thread Karl Heinz Marbaise

Hi Anders,


Anders Hammar wrote:
 Lots of people
 don't think of that I we need to help them not doing bad things...The
 outcome of this is to remove the option for using an URL...

Thanks for you comments..

Kind Regards
Karl Heinz Marbaise
-- 
View this message in context: 
http://old.nabble.com/RFC%3A-Maven-License-Verifier-Plugin-tp27445231p27451163.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: RFC: Maven License Verifier Plugin

2010-02-04 Thread Karl Heinz Marbaise

Hi Dmitry,


Dmitry Katsubo wrote:
 It would be nice to have a plugin, that for each dependency checks the
 META-INF\manifest.mf for Bundle-License entry or tries to guess the
 licence type from META-INF\LICENSE.txt or META-INF\license files. It
 would be nice, if plugin takes care of autodetecting of licences of
 leave dependencies, which are not under our control, but for which we
 would like to check the license compatibility. It can warn the user,
 if the license type is not detected and can, for example, allow you to
 set the license for a given groupId/artifactId (and make this setting
 project-wide from parent pom).The first step of implementing is (may be i
 call it release 1.0) to check the entries which are made in the pom of the
 artifacts...but this is a really good idea...I have to think about
 this


Dmitry Katsubo wrote:
 That would be a dream :) Or is it a reality already?Only partially ;-) And
 not that aside the point...

Thanks for your idea...

Kind Regards
Karl Heinz Marbaise
-- 
View this message in context: 
http://old.nabble.com/RFC%3A-Maven-License-Verifier-Plugin-tp27445231p27451222.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: starting tomcat in pre-integrations-test haults build

2010-02-04 Thread Douglas Ferguson
I ran it with -X and got tons of debug output but I didn't see anything 
indicating that there might be blocking..

D/

On Jan 28, 2010, at 8:52 AM, Anders Hammar wrote:

 You have to provide more info, like log outputs etc., for us to help. What
 plugins are you using, what's your config?
 
 First of all, try debugging by executing
 mvn install -X
 
 /Anders
 
 On Thu, Jan 28, 2010 at 15:24, Douglas Ferguson
 doug...@douglasferguson.uswrote:
 
 If I start tomcat in the pre-integration-test the build hangs.
 
 Why is this?
 
 D/
 
 -
 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: Read properties from pom.xml from Java

2010-02-04 Thread Karl Heinz Marbaise

Hi,


Søren Krogh Neigaard wrote:
 However I need to make a small helper class for my junit tests that wipes
 the database and loads some testdata on the database for every junit test.
have you taken a look at the  http://mojo.codehaus.org/sql-maven-plugin/
Maven-sql-plugin   and/or to the 
http://maven-plugins.sourceforge.net/maven-dbunit-plugin/
maven-dbunit-plugin   not to forget   http://www.dbunit.org/ dbUnit 
itself...

Kind regards
Karl Heinz Marbaise
-- 
View this message in context: 
http://old.nabble.com/Read-properties-from-pom.xml-from-Java-tp27449529p27451408.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



Slow deployment to JBoss when Maven is used

2010-02-04 Thread Eduardo M KALINOWSKI
I'm facing a strange problem. Before Maven, JBoss took about 20-30s to  
deploy our .ear (including some EJBs, one .war and a few library  
.jars). Now that we are using maven, the same operation is taking  
about 1m20s, despite the file being smaller (since only the  
dependencies that are actually used are now included).


This happens both with the .ear generated with maven alone, and with  
the .ear generated by eclipse (using m2eclipse and WTP integration).


Does anyone have an idea of the cause and things that can be done?


--
Love your neighbour, yet don't pull down your hedge.
-- Benjamin Franklin

Eduardo M KALINOWSKI
edua...@kalinowski.com.br


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



Re: Slow deployment to JBoss when Maven is used

2010-02-04 Thread Eduardo M KALINOWSKI

On Qui, 04 Fev 2010, Eduardo M KALINOWSKI wrote:
I'm facing a strange problem. Before Maven, JBoss took about 20-30s  
to deploy our .ear (including some EJBs, one .war and a few library  
.jars). Now that we are using maven, the same operation is taking  
about 1m20s, despite the file being smaller (since only the  
dependencies that are actually used are now included).


This happens both with the .ear generated with maven alone, and with  
the .ear generated by eclipse (using m2eclipse and WTP integration).


Forgot to mention: what takes most time is deploying the Web  
application. The EJBs are loaded almost instantly, before and after  
maven.



--
Yesterday upon the stair
I met a man who wasn't there.
He wasn't there again today --
I think he's from the CIA.

Eduardo M KALINOWSKI
edua...@kalinowski.com.br


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



do I need to list the ssh wagon as an extension?

2010-02-04 Thread Benson Margulies
If I want to make the dependency plugin deliver over ssh, to I need to
list an extension?

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



Re: do I need to list the ssh wagon as an extension?

2010-02-04 Thread Brett Porter
No.

On 04/02/2010, at 11:19 PM, Benson Margulies wrote:

 If I want to make the dependency plugin deliver over ssh, to I need to
 list an extension?
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/





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



Re: RFC: Maven License Verifier Plugin

2010-02-04 Thread Johannes Schneider
One important thing for me:

It should be possible to define the configuration/license descriptors in
my company pom. Then every dependent project should use the default
configuration provided by the company pom. But it also should be
possible to override/change/extend that configuration.

Sample:
Those two projects have the same company pom:
- Library/reusable project that must not depend on artifacts under GPL.
- Internal project that may depend on GPL


Thanks,

Johannes


Karl Heinz Marbaise wrote:
 Hi there,
 
 i have started with implementing some parts of a new Maven Plugin.
 
 The Maven License Verifier Plugin (MLV for short).
 
 I would present you the idea of the plugin and would like to know if
 someone has some suggestions, idea's, comments etc.
 
 
 The basic idea is to check every dependency which is used (incl.
 transitive dependencies) of a build (during a mvn ..) and see if all
 artifacts have licenses which are based on the policy (of a company
 etc.) are allowed ...that's often a point in companies...Some companies
 says only allowed is the Apache License (for example)...
 
 
 The Plugin will use a configuration file which defines different
 categories of Licenses
 (http://site.supose.org/maven-licenses-verifier-plugin/licenses.html).
 
 The default configuration will not break a build it will just warn about
 artifacts which don't have a license defined or which in a particular
 category (WARN, INVALID or none of them).
 
 About what I'm unsure about is where to define the license.xml file (or
 multiple of them):
 
 Option 1:
 Use a particular folder: src/main/licenses/ and put one or more files in
 there which will be automatically be loaded.
 
 Option 2:
 Give a single or multiple locations for license.xml files in the
 configuration section for the plugin.
 
 Option 3:
 Use an URL to define where to download the license.xml file or may be
 multiple URL's. This could be usefull in Companies to have central
 location where maintain such files which can be used for every project
 in a company...(May be it's possible to store that in a repository
 manager like Nexus ?)
 
 Option 4:
 Use an Artifact which can be created and stored into a Maven repository ?
 
 Of course the plugin is configurable in that way to brake the build if
 you do ...(e.g. failOnWarning like ?)...
 
 
 The other question is how to behave in a reactor build (Multi Module
 build):
   - Just have a single Configuration (e.g. in Root) and put the
 configuration file(s) there (not sure how to handle this technically)...
 
 
 And what is needed as well is to be able to exclude particular artifacts
 from being checked (excludes...exclude.).. (I have to check how
 to implement this but this is an other question)...
 
 
 Kind regards
 Karl Heinz Marbaise

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



Re: Implementing an installer, which is maven-based

2010-02-04 Thread Dmitry Katsubo
Hi everybody!

I am still not sure, what is the best direction for me to solve the
following task. Maybe someone on maillist implemented something similar,
or knows the technology/approach, that can simplify things.

What ideally I want to achieve is:

1. Create a lightweight installator, that will not contain any maven
artifacts (or, if not possible, contain all of them).
2. When end user launches the installator, it is asked for some input,
which is saved as .property file.
3. Installator then fetches only the artifacts needed (selected by user
+ those which are obligatory), and replaces the property file(s) in
those artifacts. Finally it creates ready to-use WAR package.

If you have an example of above -- give me a link, please. That would be
great!

Right now I see the only way is to create a temporary maven project and
after doing steps (1) and (2) launch maven to complete the packaging.

Thanks in advance!

Dmitry Katsubo wrote on 30/01/2010 16:34:
 Hi all!
 
 Sorry, that my question seems to have been asked in maven user list
 http://mail-archives.apache.org/mod_mbox/maven-users/200710.mbox/%3c2fbbcb49-65d3-4258-906f-e252372e9...@massol.net%3e
 
 but I have the situation, similar to that. I hope you can help me, as
 you might know what are the latest approaches to that.
 
 I have some service, packaged as .WAR, which is completely build by
 maven. However, this .WAR file requires customization: I need to package
 it in different ways, depending on user input. Basically, user should
 himself select the components, he would like to add to WAR, and define
 some simple configuration for these components. After the packaging the
 installer should optionally launch tomcat (or jetty) and start a WAR
 application.
 
 I need to write the installer, that:
 1. Asks user for the list of components (=checkboxes)
 2. For each component, asks for the configuration options (then to be
 saved as .property file)
 3. Package everything from steps 1 and 2 into WAR file. Dependences
 should be fetched from publicly available maven repository.
 4. Optionally launch tomcat (or jetty) in a background
 5. Maybe execute some other script, depending on choices in 1 (like
 demo application).
 
 Let me know, if there is a universal solution for that.
 
 Thanks in advance for any hint.
 


-- 
With best regards,
Dmitry

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



Re: How to download every dependency we need at once?

2010-02-04 Thread Baptiste MATHUS
2009/12/16 Anders Hammar and...@hammar.net

 Why not use a corporate repository manager like Nexus or Artifactory*?*
  [...]
 * Any other solution is a hack*.


+1.

Most of the time, users do not consider installing a repository manager
because they think it's complicated.
Please trust us: it's not, it's very simple.

At least, it's far far less complicated than the huge list of commands given
by John... Installing a mrm can only be a big win for you.

Cheers.


Re: How to download every dependency we need at once?

2010-02-04 Thread David Hoffer
+1

I wouldn't use maven without one, doesn't matter if I have 1 developer or
1000.

-Dave

On Thu, Feb 4, 2010 at 7:17 AM, Baptiste MATHUS m...@batmat.net wrote:

 2009/12/16 Anders Hammar and...@hammar.net

  Why not use a corporate repository manager like Nexus or Artifactory*?*
   [...]
  * Any other solution is a hack*.
 

 +1.

 Most of the time, users do not consider installing a repository manager
 because they think it's complicated.
 Please trust us: it's not, it's very simple.

 At least, it's far far less complicated than the huge list of commands
 given
 by John... Installing a mrm can only be a big win for you.

 Cheers.



How to use repo2.maven.org in artifactory

2010-02-04 Thread rgubler2

Hi, 

I added a new remote repository to our artifactory. 
I named it repo2 and use the URL http://repo2.maven.org/maven2/. 
In the repository browser the repo2 appears with 0 artifacts. 
The online status indicate online. 

Whats going wrong that we can't access repo2 data? 


Yours Ruediger 

-- 
View this message in context: 
http://old.nabble.com/How-to-use-repo2.maven.org-in-artifactory-tp27452208p27452208.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: How to use repo2.maven.org in artifactory

2010-02-04 Thread Anders Hammar
Artifactory questions should go on the artifactory mailing list.

/Anders

On Thu, Feb 4, 2010 at 15:31, rgubler2 rgub...@init-ka.de wrote:


 Hi,

 I added a new remote repository to our artifactory.
 I named it repo2 and use the URL http://repo2.maven.org/maven2/.
 In the repository browser the repo2 appears with 0 artifacts.
 The online status indicate online.

 Whats going wrong that we can't access repo2 data?


 Yours Ruediger

 --
 View this message in context:
 http://old.nabble.com/How-to-use-repo2.maven.org-in-artifactory-tp27452208p27452208.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: How to use repo2.maven.org in artifactory

2010-02-04 Thread David Hoffer
Could it be that it only shows you proxied/cached artifacts?  I suspect that
if you start downloading artifacts from that repo they will show here.

-Dave

On Thu, Feb 4, 2010 at 7:31 AM, rgubler2 rgub...@init-ka.de wrote:


 Hi,

 I added a new remote repository to our artifactory.
 I named it repo2 and use the URL http://repo2.maven.org/maven2/.
 In the repository browser the repo2 appears with 0 artifacts.
 The online status indicate online.

 Whats going wrong that we can't access repo2 data?


 Yours Ruediger

 --
 View this message in context:
 http://old.nabble.com/How-to-use-repo2.maven.org-in-artifactory-tp27452208p27452208.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: ear-plugin and profiles: poor cooperation?

2010-02-04 Thread boraldo

I have the same problem and I'd like to explain it.
I want to have an ability to add some web-modules to my ear in some profile.
And I don't want to redefine other modules, only my module. If I only add
dependency on my module in profile, it's context root will be equal to war
name, but I want to set it manually.



snicoll wrote:
 
 A configuration item that is a list can't be merged in a profile. See the
 modules element as a configuration item, like the JavaEE version you
 want
 to use. If you override the value in the profile, you can't expect it to
 merge the elements that are set in the main build (this is a global
 behavior
 of Maven btw).
 
 Why don't you add a dependency section in your profile instead? Why
 quartz.jar should be added to the application context? Maybe you need to
 use
 http://maven.apache.org/plugins/maven-ear-plugin/generate-application-xml-mojo.html#includeLibInApplicationXmlinstead.
 
 Regards,
 Stéphane
 
 On Tue, Dec 22, 2009 at 4:12 PM, Rebholz Paul
 paul.rebh...@six-group.comwrote:
 
  Hi all!
 
  We have a project producing an ear artifact. The contents of the ear
  file are configured with the maven-ear-plugin. In profiles we want to
  be able to flexibly add more artifacts to the ear file as shown in the
  example below. Our tests so far revealed a different behaviour than
  expected. When adding a jar file with the jarModule element, all other
  entries corresponding to jarModules disappear in the application.xml
  and even some other jar files disappear completely from the ear.
  Moreover, when adding a second profile adding jars, the first is
  eclipsed. Is this a bug in the maven-ear-plugin implementation?
 
  Regards, Paul
 
 
  profile
idmy_test/id
activation
  property
namemy_switch/name
valuetrue/value
  /property
/activation
build
  plugins
plugin
  artifactIdmaven-ear-plugin/artifactId
  configuration
modules
  jarModule
groupIdquartz/groupId
artifactIdquartz/artifactId
 
  includeInApplicationXmltrue/includeInApplicationXml
  /jarModule
/modules
  /configuration
/plugin
  /plugins
/build
dependencies
  dependency
groupIdquartz/groupId
artifactIdquartz/artifactId
typejar/type
version1.5.2/version
  /dependency
/dependencies
  /profile

 This message is for the named person's use only. It may contain
 confidential, proprietary or legally privileged information. If you
 receive
 this message in error, please notify the sender urgently and then
 immediately delete the message and any copies of it from your system.
 Please
 also immediately destroy any hardcopies of the message.
 The sender's company reserves the right to monitor all e-mail
 communications through their networks.

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


 
 
 -- 
 Large Systems Suck: This rule is 100% transitive. If you build one, you
 suck -- S.Yegge
 
 

-- 
View this message in context: 
http://old.nabble.com/ear-plugin-and-profiles%3A-poor-cooperation--tp26889824p27452223.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: Need help configuring maven to get through company Proxy?

2010-02-04 Thread Tonte . Pouncil
No I am not using NTLM as my proxy server is Novell Border Manager.  I 
actually saw this wiki page a few days back and check with our System guys 
to make sure I knew what we was using in terms of NTLM.  Thanks for the 
reply.

Has anybody got out through the proxy that is not using a NTLM or CNTLM?

Thanks!

Tonté



From:
Antonio Petrelli antonio.petre...@gmail.com
To:
Maven Users List users@maven.apache.org
Date:
02/04/2010 02:15 AM
Subject:
Re: Need help configuring maven to get through company Proxy?



2010/2/3  tonte.poun...@aviall.com:
 When I try to down load plugins from the Maven Central Repo, I get
 redirected to my companies Novell Proxy Server authentication web page;
 where an actual user is required to enter their (eDirectory/LDAP)
 credentials and click the submit button to be authenticated through the
 proxy and then forward to the destination URL.

Just a fast question: are you using NTLM? This is your case if the
usernames are in the form:
domain\username
If yes, then this wiki might help you:
http://docs.codehaus.org/display/MAVENUSER/Configuring+Maven+behind+an+NTLM+proxy


It's worth a try :-)

Ciao
Antonio

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





Re: Need help configuring maven to get through company Proxy?

2010-02-04 Thread Tonte . Pouncil
Okay I removed my proxy settings in the settings.xml file and configured 
Nexus to use the proxy authentication via its server tab.  When I ran 
maven, it went through Nexus and then complained that my company has 
blocked access to maven central repo site. 

If you have any more suggestion, I would be interested in anymore ideas on 
how to resolve this.

Thanks!



From:
Anders Hammar and...@hammar.net
To:
Maven Users List users@maven.apache.org
Date:
02/03/2010 02:39 PM
Subject:
Re: Need help configuring maven to get through company Proxy?



Resolving this in Maven is just a waste of time. As you switch to use 
Nexus
you need to remove that config and configure Nexus instead.
Don't configure anything locally (except to use Nexus) and then configure
the proxy in Nexus. If you have problems doing that in Nexus, use the 
Nexus
mailing list.

/Anders

On Wed, Feb 3, 2010 at 18:29, tonte.poun...@aviall.com wrote:

 Yes that is correct.  However, to simply the problem I configured my
 settings.xml file to not use my Nexus profiles and configured maven
 central repo manually in the settings.xml file.  So currently my
 configuration does not rely on Nexus.  I prefer, but not locked into,
 resolving this issue base on Maven first before resolving in Nexus.

 I don't think maven's proxy setting inside the settings.xml file are 
being
 read correctly for Novel Border Manager.  Does anyone how to debug the
 proxy settings for maven?  BTW, I have made sure these settings are not
 commented out.

 Thanks!

 Tonté



 From:
 Wayne Fay wayne...@gmail.com
 To:
 Maven Users List users@maven.apache.org
 Date:
 02/03/2010 11:19 AM
 Subject:
 Re: Need help configuring maven to get through company Proxy?



  Thanks for your reply.  We are using Sonatype Nexus for our company
 maven
  repo and we are actually using Novell Border Manager for our proxy
 server.
   I wonder if maven is not sending the correct credential properties to
  Novell Border Manager?

 Aren't your proxying requests through Nexus to the outside world? So
 you should only need to worry about how Nexus is getting out (past
 Novell Border Manager), not Maven itself, right?

 Wayne

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








maven release plugin and subversion externals

2010-02-04 Thread @work

Hello,

we are using svn:externals to add our modules into the parent directory. 
We can build, test, deploy ... but we can't create a release. The release is
only 
created for the parent (which is only a pom module). There are no tags in
subversion 
and no artifacts released to the repository. 

In our parent the modules are referenced as

modules
moduleA/module
moduleB/module

/modules

We are calling: mvn release.clean release:prepare release:perform 
and there are no error messages.

What is going wrong with the releases?


Yours Rüdiger

-- 
View this message in context: 
http://n2.nabble.com/maven-release-plugin-and-subversion-externals-tp4514253p4514253.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: Assembly plugin: specifying an alternative extension name for the assembly

2010-02-04 Thread Graham Charters
Thanks, Joe.  I've only just got round to looking into this again.  I
found I can get this to work by adding the following to the maven
assembly plugin's components.xml file:

component
  roleorg.codehaus.plexus.archiver.Archiver/role
  role-hintext/role-hint
  
implementationorg.codehaus.plexus.archiver.zip.ZipArchiver/implementation
  instantiation-strategyper-lookup/instantiation-strategy
/component

Where 'ext' is the extension I want to use instead of zip.  I've only
been able to get this to work by having my own copy of the maven
assembly plugin.  Is there any other way to provide this configuration
from outside the maven assembly plugin?

Many thanks for any help.

Regards, Graham.




On 19 November 2009 13:03, Joe Hindsley jhinds...@gmail.com wrote:
 Hi Graham,

 The extension for the assembly is configured with the format element of
 the assembly descriptor. There are only a couple of supported formats. My
 guess is that you'd have to write a custom Archiver to get a different
 extension, but haven't looked under the hood of the assembly plugin to know
 for sure.

 More information is here:

 http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_assembly

 Joe Hindsley


 Graham Charters wrote:

 Hi,

 I'm trying to create a zip file using the assembly plugin, but I'd
 like it to have a different extension (not .zip).  I've tried using
 finalName/, but that still insists on giving the file the .zip
 extension.

 Is this possible using the assembly plugin, or should I be using something
 else?

 Many thanks for any help.

 Regards, Graham.

 -
 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: How to use repo2.maven.org in artifactory

2010-02-04 Thread rgubler2




dahoffer wrote:
 
 Could it be that it only shows you proxied/cached artifacts?  I suspect
 that
 if you start downloading artifacts from that repo they will show here.
 
 -Dave
 
 

Yes it acts only as a proxy. We got this problem yesterday, but now the
artifacts are reachable. 
It look like there must be a time period after adding a new remote
repository or there are some 
network problems yesterday. 


Yours Rüdiger

-- 
View this message in context: 
http://old.nabble.com/How-to-use-repo2.maven.org-in-artifactory-tp27452208p27454145.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: Need help configuring maven to get through company Proxy?

2010-02-04 Thread Wayne Fay
 Okay I removed my proxy settings in the settings.xml file and configured
 Nexus to use the proxy authentication via its server tab.  When I ran
 maven, it went through Nexus and then complained that my company has
 blocked access to maven central repo site.

1) The Nexus list would be the proper place to ask questions about Nexus.

2) There is always a possibility that no one in open source land has
ever run across Novell Border Manager and it is not
standards-compliant such that general proxy coding is not
sufficient, and so you will not be able to simply configure and go
but rather you will need to do some coding. I have no idea if this is
true, but it may be. It sounds like you have some research (and work)
to do on your end.

Wayne

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



Re: Transitive exclusions in multi-module project with Maven 2.2.1

2010-02-04 Thread Mark H. Wood
On Wed, Feb 03, 2010 at 04:50:23PM +0100, Lóránt Pintér wrote:
 I have a project called Client that depends on a side-artifact of
 project Server (actually, its RMI client classes; the artifact has the
 classifier rmi), but excludes each of Server's dependencies. I also

Shouldn't the RMI stuff be factored out as a common dependency of
Client and Server?  That's what I do with CORBA which is fairly
similar.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Friends don't let friends publish revisable-form documents.


pgp0mkspFRTCd.pgp
Description: PGP signature


Re: Need help configuring maven to get through company Proxy?

2010-02-04 Thread Tonte . Pouncil
I understand.  I wonder if you know how I can get started in building a 
plugin that extends the existing proxy framework in maven, in this regard?

Thanks!



From:
Wayne Fay wayne...@gmail.com
To:
Maven Users List users@maven.apache.org
Date:
02/04/2010 09:58 AM
Subject:
Re: Need help configuring maven to get through company Proxy?



 Okay I removed my proxy settings in the settings.xml file and configured
 Nexus to use the proxy authentication via its server tab.  When I ran
 maven, it went through Nexus and then complained that my company has
 blocked access to maven central repo site.

1) The Nexus list would be the proper place to ask questions about Nexus.

2) There is always a possibility that no one in open source land has
ever run across Novell Border Manager and it is not
standards-compliant such that general proxy coding is not
sufficient, and so you will not be able to simply configure and go
but rather you will need to do some coding. I have no idea if this is
true, but it may be. It sounds like you have some research (and work)
to do on your end.

Wayne

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





Re: maven release plugin and subversion externals

2010-02-04 Thread Karl Heinz Marbaise

Hi there

first: Have you defined scm section in your root pom ?

we are using svn:externals to add our modules into the parent directory. 
We can build, test, deploy ... but we can't create a release. The release is
only 
How do you use the externals ? fixed to a particular release via tag 
name or trunk with a particular revision ?


Kind regards
Karl Heinz Marbaise
--
SoftwareEntwicklung Beratung SchulungTel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz MarbaiseICQ#: 135949029
Hauptstrasse 177 USt.IdNr: DE191347579
52146 Würselen   http://www.soebes.de

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



help needed with maven antrun plugin

2010-02-04 Thread Pankaj Agarwal
Hi,

 

I am facing a strange problem.

 

I am able to successfully build using an ant build.xml but the same is
failing when I am call it using antrun plugin.

 

Has anyone faced similar issue and any clue on how this can be resolved?

 

I don't want to use exec plugin as that will require ant to be installed
on all developer machines.

 

In my environment we are  using maven 2.0.10, Java 1.6update5. For
testing the ant compilation directly I used ant version 1.7.0.

 

Thanks for your help.

 

-Pankaj

 

 

 

 



Re: help needed with maven antrun plugin

2010-02-04 Thread Wayne Fay
 I am able to successfully build using an ant build.xml but the same is
 failing when I am call it using antrun plugin.

Specific error messages are more helpful than generic it didnt work comments.

Wayne

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



Re: SUN Maven(2) repo changes? JMX, JMS, Mail, JMXTOOLS

2010-02-04 Thread Johannes Schneider
I had a common problem with an invalid repository entry (wicketstuff). 
Maven seems to fail completely when a repository returns some html files 
(redirected I guess) instead of the expected poms



Johannes

Andy Jefferson wrote:

For the last few hours I've been getting issues with Maven2 downloading 
jars/poms for the following SUN jars

jmxtools-1.2.1
jmxri-1.2.1
mail-1.4
jms-1.1

Maven2 goes off to, for example,

https://maven-repository.dev.java.net/nonav/repository/com.sun.jmx/poms/jmxri-1.2.1.pom

which replies with HTML as follows

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title301 Moved Permanently/title
/headbody
h1Moved Permanently/h1
pThe document has moved a 
href=http://download.java.net/maven/1/com.sun.jdmk/poms/jmxtools-1.2.1.pom;here/a./p
hr
addressApache Server at maven-repository.dev.java.net Port 443/address
/body/html


which is promptly stored in my local M2 repo as XXX.pom, and hell follows after 
...


The location referred to in this file doesn't exist either.

Can somebody who knows the people in charge of SUN's M2 repo please advise them 
of this.

--
Andy


  


-
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: help needed with maven antrun plugin

2010-02-04 Thread Pankaj Agarwal
Here's the exact error.

[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] An Ant BuildException has occured: The following error occurred while 
executing this line:
build.xml:118: com.bea.util.jam.internal.javadoc.JavadocClassloadingException: 
An error has occurred while invoking javadoc to inspect your source
files.  This may be due to the fact that $JAVA_HOME/lib/tools.jar does
not seem to be in your system classloader.  One common case in which
this happens is when using the 'ant' tool, which uses a special
context classloader to load classes from tools.jar.

This situation elicits what is believed to a javadoc bug in the initial
release of JDK 1.6.  Javadoc attempts to use its own context classloader
tools.jar but ignores one that may have already been set, which leads
to some classes being loaded into two different classloaders.  The
telltale sign of this problem is a javadoc error message saying that
'languageVersion() must return LanguageVersion - you might see this
message in your process' output.

This will hopefully be fixed in a later release of JDK 1.6; if a new
version of 1.6 has become available, you might be able to solve this
by simply upgrading to the latest JDK.

Alternatively, you can work around it by simply including
$JAVA_HOME/lib/tools.jar in the java -classpath
parameter.  If you are running ant, you will need to modify the standard
ant script to include tools.jar in the -classpath.


[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 minute 40 seconds
[INFO] Finished at: Thu Feb 04 21:31:15 GMT 2010
[INFO] Final Memory: 10M/187M
[INFO] 

-Original Message-
From: Wayne Fay [mailto:wayne...@gmail.com] 
Sent: Thursday, February 04, 2010 1:11 PM
To: Maven Users List
Subject: Re: help needed with maven antrun plugin

 I am able to successfully build using an ant build.xml but the same is
 failing when I am call it using antrun plugin.

Specific error messages are more helpful than generic it didnt work comments.

Wayne

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



Re: help needed with maven antrun plugin

2010-02-04 Thread Stephen Connolly
AFAIK maven munges up the java home in the system properties so that the
${java.home} is actually the jre inside the jdk and not the jdk... however
${env.JAVA_HOME} should still be the java home and the mvn scripts bomb out
if JAVA_HOME is not defined.

-Stephen

On 4 February 2010 21:26, Pankaj Agarwal pankaj_agar...@trimble.com wrote:

 Here's the exact error.

 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] An Ant BuildException has occured: The following error occurred
 while executing this line:
 build.xml:118:
 com.bea.util.jam.internal.javadoc.JavadocClassloadingException: An error has
 occurred while invoking javadoc to inspect your source
 files.  This may be due to the fact that $JAVA_HOME/lib/tools.jar does
 not seem to be in your system classloader.  One common case in which
 this happens is when using the 'ant' tool, which uses a special
 context classloader to load classes from tools.jar.

 This situation elicits what is believed to a javadoc bug in the initial
 release of JDK 1.6.  Javadoc attempts to use its own context classloader
 tools.jar but ignores one that may have already been set, which leads
 to some classes being loaded into two different classloaders.  The
 telltale sign of this problem is a javadoc error message saying that
 'languageVersion() must return LanguageVersion - you might see this
 message in your process' output.

 This will hopefully be fixed in a later release of JDK 1.6; if a new
 version of 1.6 has become available, you might be able to solve this
 by simply upgrading to the latest JDK.

 Alternatively, you can work around it by simply including
 $JAVA_HOME/lib/tools.jar in the java -classpath
 parameter.  If you are running ant, you will need to modify the standard
 ant script to include tools.jar in the -classpath.


 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time: 1 minute 40 seconds
 [INFO] Finished at: Thu Feb 04 21:31:15 GMT 2010
 [INFO] Final Memory: 10M/187M
 [INFO]
 

 -Original Message-
 From: Wayne Fay [mailto:wayne...@gmail.com]
 Sent: Thursday, February 04, 2010 1:11 PM
 To: Maven Users List
 Subject: Re: help needed with maven antrun plugin

  I am able to successfully build using an ant build.xml but the same is
  failing when I am call it using antrun plugin.

 Specific error messages are more helpful than generic it didnt work
 comments.

 Wayne

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




RE: Read properties from pom.xml from Java

2010-02-04 Thread Søren Krogh Neigaard
Thank you all for your answers

I tried adding the following to my pom.xml

properties
  database.driveroracle.jdbc.OracleDriver/database.driver
  database.url${database.url}/database.url
  database.username${database.username}/database.username
  database.password${database.password}/database.password
/properties

And tried reading with System.getProperty(database.username), but it gave me 
null.

The reason for the ${database.url} and so on, is that it gets its values from 
either a default settings.xml or a user specific settings.xml, and that is how 
I need it to be. We are already using the sql-maven-plugin to bootstrap the 
database, but it only gets run once before all junit tests are run, and that is 
not what I need, I need it to run for every test to ensure a clean database.

I can easily make some code that drops my tables and so on, but I need the 
correct database properties from the correct settings.xml.

Bernd you talked about making a plugin that gets called before every test, how 
can I do this?

Med venlig hilsen / Kind regards 


Søren Krogh Neigaard
Systems Engineer

Søren Frichs Vej 39, 8000 Aarhus C
Denmark 

Mobile +4541965252
soeren.krogh.neiga...@systematic.com
www.systematic.com


-Original Message-
From: bernd.adamow...@external.icw-global.com 
[mailto:bernd.adamow...@external.icw-global.com] 
Sent: 4. februar 2010 11:59
To: Maven Users List
Subject: Re: Read properties from pom.xml from Java

Sounds like this might help you:

- Create a Maven plugin which is executed in any phase bevore test, 
e.g. 'generate-test-resources'. This will make it possible to set up the 
database. This plugin might help for starting the database (only if you're 
using HSQL): 
http://gforge.openehealth.org/gf/project/development/wiki/?pagename=Documentation+HSQLDB+plugin
, but there are others, too.

- Reading of POM-properties inside a Maven plugin is easy and described 
here: 
http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-mojo-params.html#writing-plugins-sect-param-values

However, the scenario described by you clearly indicates that this is not 
a unit test instead it is an integration test where other rules/plugins 
might apply, e.g. maven-invoker-plugin. But this would recommend a 
restructuring of your project and might not be what you want. 

Bernd






Søren Krogh Neigaard soeren.krogh.neiga...@systematic.com wrote on 
04.02.2010 09:59:26:

 [image removed] 
 
 Read properties from pom.xml from Java
 
 Søren Krogh Neigaard 
 
 to:
 
 users
 
 04.02.2010 10:00
 
 Please respond to Maven Users List
 
 Hi
 
 
 
 I have been tossed into a maven controlled project. We run our junit
 tests from Eclipse and also on our build server. When ever they are 
 run, some maven magic happens so that username/password/driver/url 
 for the dabase is correctly set for the user pc or the buildserver. 
 However I need to make a small helper class for my junit tests that 
 wipes the database and loads some testdata on the database for every
 junit test.
 
 
 
 The username/password/driver/url for the database is set in the 
 pom.xml file by maven. How do I read these values from my Java helper 
class?
 
 
 
 Best regards
 
 Søren 
 
 
 



InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. 
Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 / 
USt.-IdNr.: DE 198388516  =

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



Re: Read properties from pom.xml from Java

2010-02-04 Thread Anders Hammar
 I tried adding the following to my pom.xml

 properties
  database.driveroracle.jdbc.OracleDriver/database.driver
  database.url${database.url}/database.url
  database.username${database.username}/database.username
  database.password${database.password}/database.password
 /properties


Sure, that doesn't work. The properties you want to be set in settings.xml
(either globally or locally), you just skip those in your pom.
However, you should clearly state in the pom what properties are required. I
think I would use one set of properties to be defined in settings.xml and
then reference those when setting the properties in the project. IMO that's
a little bit more clear.
Like this:

properties
 database.driveroracle.jdbc.OracleDriver/database.driver
 database.url${oracle.db.url}/database.url
 database.username${oracle.db.username}/database.username
 database.password${oracle.db.password}/database.password
/properties

/Anders


 And tried reading with System.getProperty(database.username), but it gave
 me null.

 The reason for the ${database.url} and so on, is that it gets its values
 from either a default settings.xml or a user specific settings.xml, and that
 is how I need it to be. We are already using the sql-maven-plugin to
 bootstrap the database, but it only gets run once before all junit tests are
 run, and that is not what I need, I need it to run for every test to ensure
 a clean database.

 I can easily make some code that drops my tables and so on, but I need the
 correct database properties from the correct settings.xml.

 Bernd you talked about making a plugin that gets called before every test,
 how can I do this?

 Med venlig hilsen / Kind regards


 Søren Krogh Neigaard
 Systems Engineer

 Søren Frichs Vej 39, 8000 Aarhus C
 Denmark

 Mobile +4541965252
 soeren.krogh.neiga...@systematic.com
 www.systematic.com


 -Original Message-
 From: bernd.adamow...@external.icw-global.com [mailto:
 bernd.adamow...@external.icw-global.com]
 Sent: 4. februar 2010 11:59
 To: Maven Users List
 Subject: Re: Read properties from pom.xml from Java

 Sounds like this might help you:

 - Create a Maven plugin which is executed in any phase bevore test,
 e.g. 'generate-test-resources'. This will make it possible to set up the
 database. This plugin might help for starting the database (only if you're
 using HSQL):

 http://gforge.openehealth.org/gf/project/development/wiki/?pagename=Documentation+HSQLDB+plugin
 , but there are others, too.

 - Reading of POM-properties inside a Maven plugin is easy and described
 here:

 http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-sect-mojo-params.html#writing-plugins-sect-param-values

 However, the scenario described by you clearly indicates that this is not
 a unit test instead it is an integration test where other rules/plugins
 might apply, e.g. maven-invoker-plugin. But this would recommend a
 restructuring of your project and might not be what you want.

 Bernd






 Søren Krogh Neigaard soeren.krogh.neiga...@systematic.com wrote on
 04.02.2010 09:59:26:

  [image removed]
 
  Read properties from pom.xml from Java
 
  Søren Krogh Neigaard
 
  to:
 
  users
 
  04.02.2010 10:00
 
  Please respond to Maven Users List
 
  Hi
 
 
 
  I have been tossed into a maven controlled project. We run our junit
  tests from Eclipse and also on our build server. When ever they are
  run, some maven magic happens so that username/password/driver/url
  for the dabase is correctly set for the user pc or the buildserver.
  However I need to make a small helper class for my junit tests that
  wipes the database and loads some testdata on the database for every
  junit test.
 
 
 
  The username/password/driver/url for the database is set in the
  pom.xml file by maven. How do I read these values from my Java helper
 class?
 
 
 
  Best regards
 
  Søren
 
 
 



 InterComponentWare AG:
 Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.:
 Prof. Dr. Christof Hettich
 Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 /
 USt.-IdNr.: DE 198388516  =

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




Re: Read properties from pom.xml from Java

2010-02-04 Thread Martin Höller
Am Freitag, 5. Februar 2010 07:45:51 schrieb Søren Krogh Neigaard:
 Thank you all for your answers

 I tried adding the following to my pom.xml

 properties
   database.driveroracle.jdbc.OracleDriver/database.driver
   database.url${database.url}/database.url
   database.username${database.username}/database.username
   database.password${database.password}/database.password
 /properties

 And tried reading with System.getProperty(database.username), but it gave
 me null.

 The reason for the ${database.url} and so on, is that it gets its values
 from either a default settings.xml or a user specific settings.xml, and
 that is how I need it to be.

It's as Anders wrote already. If you want to use the same property names in 
settings.xml and pom.xml you have to put them in a profile, that's how I do 
it and it works. The profile could be activeByDefault if you prefer.

So your settings.xml could look like this:

settings
  profiles
profile
  idsomeProf/id
  activation
activeByDefault/
  /activation
  properties
database.urlsomeUrl/database.url
  /properties
/profile
  /profiles
/settings
 
And your pom.xml would be this:

project
  ...
  properties
database.urlsomeDummyValue/database.url
  /properties
/project

Now reading the properties via System.getProperty(database.url) shoud work.


hth,
- martin


signature.asc
Description: This is a digitally signed message part.


RE: Read properties from pom.xml from Java

2010-02-04 Thread Søren Krogh Neigaard
Hi

I have this in my settings.xml

settings
  profiles
profile
  activation
activeByDefaulttrue/activeByDefault
  /activation
  properties
database.driveroracle.jdbc.driver.OracleDriver/database.driver
database.urljdbc:oracle:thin:@myhome:1521:orcl/database.url
database.usernamefoo/database.username
database.passwordbar/database.password
  /properties
/profile
  /profiles
/settings

And I have tried with these in my pom.xml:

properties
  db.driveroracle.jdbc.OracleDriver/db.driver
  db.url${database.url}/db.url
  db.username${database.username}/db.username
  db.password${database.password}/db.password
/properties

And this:

properties
  database.driveroracle.jdbc.OracleDriver/database.driver
  database.urldummy/database.url
  database.usernamedummy/database.username
  database.passworddummy/database.password
/properties

I still get null with System.getProperty

Med venlig hilsen / Kind regards 


Søren Krogh Neigaard
Systems Engineer

Søren Frichs Vej 39, 8000 Aarhus C
Denmark 

Mobile +4541965252
soeren.krogh.neiga...@systematic.com
www.systematic.com


-Original Message-
From: Martin Höller [mailto:mar...@xss.co.at] 
Sent: 5. februar 2010 08:30
To: Maven Users List
Subject: Re: Read properties from pom.xml from Java

Am Freitag, 5. Februar 2010 07:45:51 schrieb Søren Krogh Neigaard:
 Thank you all for your answers

 I tried adding the following to my pom.xml

 properties
   database.driveroracle.jdbc.OracleDriver/database.driver
   database.url${database.url}/database.url
   database.username${database.username}/database.username
   database.password${database.password}/database.password
 /properties

 And tried reading with System.getProperty(database.username), but it 
 gave me null.

 The reason for the ${database.url} and so on, is that it gets its 
 values from either a default settings.xml or a user specific 
 settings.xml, and that is how I need it to be.

It's as Anders wrote already. If you want to use the same property names in 
settings.xml and pom.xml you have to put them in a profile, that's how I do it 
and it works. The profile could be activeByDefault if you prefer.

So your settings.xml could look like this:

settings
  profiles
profile
  idsomeProf/id
  activation
activeByDefault/
  /activation
  properties
database.urlsomeUrl/database.url
  /properties
/profile
  /profiles
/settings
 
And your pom.xml would be this:

project
  ...
  properties
database.urlsomeDummyValue/database.url
  /properties
/project

Now reading the properties via System.getProperty(database.url) shoud work.


hth,
- martin

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



RE: Read properties from pom.xml from Java

2010-02-04 Thread bernd . adamowicz
Søren Krogh Neigaard soeren.krogh.neiga...@systematic.com wrote on 
05.02.2010 07:45:51:

 We are already using 
 the sql-maven-plugin to bootstrap the database, but it only gets run
 once before all junit tests are run, and that is not what I need, I 
 need it to run for every test to ensure a clean database.
 
 I can easily make some code that drops my tables and so on, but I 
 need the correct database properties from the correct settings.xml.
 
 Bernd you talked about making a plugin that gets called before every
 test, how can I do this?

Søren,

after reading this post from you I know that my suggestion is not what you 
want, since you already have it (starting the sql-maven-plugin once before 
all tests). If you need something to be done before every single test, 
you'll have to use Junit's '@Before' annotated methods. If you need some 
advice here, we should make this outside this list since this is no Maven 
issue at all.

Bernd

 
 Med venlig hilsen / Kind regards 
 
 
 Søren Krogh Neigaard
 Systems Engineer
 
 Søren Frichs Vej 39, 8000 Aarhus C
 Denmark 
 
 Mobile +4541965252
 soeren.krogh.neiga...@systematic.com
 www.systematic.com
 
 
 -Original Message-
 From: bernd.adamow...@external.icw-global.com [
 mailto:bernd.adamow...@external.icw-global.com] 
 Sent: 4. februar 2010 11:59
 To: Maven Users List
 Subject: Re: Read properties from pom.xml from Java
 
 Sounds like this might help you:
 
 - Create a Maven plugin which is executed in any phase bevore test, 
 e.g. 'generate-test-resources'. This will make it possible to set up the 

 database. This plugin might help for starting the database (only if 
you're 
 using HSQL): 
 http://gforge.openehealth.org/gf/project/development/wiki/?
 pagename=Documentation+HSQLDB+plugin
 , but there are others, too.
 
 - Reading of POM-properties inside a Maven plugin is easy and described 
 here: 
 http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-
 sect-mojo-params.html#writing-plugins-sect-param-values
 
 However, the scenario described by you clearly indicates that this is 
not 
 a unit test instead it is an integration test where other rules/plugins 
 might apply, e.g. maven-invoker-plugin. But this would recommend a 
 restructuring of your project and might not be what you want. 
 
 Bernd
 
 
 
 
 
 
 Søren Krogh Neigaard soeren.krogh.neiga...@systematic.com wrote on 
 04.02.2010 09:59:26:
 
  [image removed] 
  
  Read properties from pom.xml from Java
  
  Søren Krogh Neigaard 
  
  to:
  
  users
  
  04.02.2010 10:00
  
  Please respond to Maven Users List
  
  Hi
  
  
  
  I have been tossed into a maven controlled project. We run our junit
  tests from Eclipse and also on our build server. When ever they are 
  run, some maven magic happens so that username/password/driver/url 
  for the dabase is correctly set for the user pc or the buildserver. 
  However I need to make a small helper class for my junit tests that 
  wipes the database and loads some testdata on the database for every
  junit test.
  
  
  
  The username/password/driver/url for the database is set in the 
  pom.xml file by maven. How do I read these values from my Java helper 
 class?
  
  
  
  Best regards
  
  Søren 
  
  
  
 
 
 
 InterComponentWare AG: 
 Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / 
 Aufsichtsratsvors.: Prof. Dr. Christof Hettich 
 Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 
 351761 / USt.-IdNr.: DE 198388516  =
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 


InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. 
Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 / 
USt.-IdNr.: DE 198388516  

RE: Read properties from pom.xml from Java

2010-02-04 Thread Søren Krogh Neigaard
But I do use the @Before annotation, and I was planning to call my database 
cleanup from here. But my problem is that the database properties are not 
accessible to me (I think), and they are managed by maven (are they not?).

Med venlig hilsen / Kind regards 


Søren Krogh Neigaard
Systems Engineer

Søren Frichs Vej 39, 8000 Aarhus C
Denmark 

Mobile +4541965252
soeren.krogh.neiga...@systematic.com
www.systematic.com


-Original Message-
From: bernd.adamow...@external.icw-global.com 
[mailto:bernd.adamow...@external.icw-global.com] 
Sent: 5. februar 2010 09:13
To: Maven Users List
Subject: RE: Read properties from pom.xml from Java

Søren Krogh Neigaard soeren.krogh.neiga...@systematic.com wrote on 
05.02.2010 07:45:51:

 We are already using 
 the sql-maven-plugin to bootstrap the database, but it only gets run
 once before all junit tests are run, and that is not what I need, I 
 need it to run for every test to ensure a clean database.
 
 I can easily make some code that drops my tables and so on, but I 
 need the correct database properties from the correct settings.xml.
 
 Bernd you talked about making a plugin that gets called before every
 test, how can I do this?

Søren,

after reading this post from you I know that my suggestion is not what you 
want, since you already have it (starting the sql-maven-plugin once before 
all tests). If you need something to be done before every single test, 
you'll have to use Junit's '@Before' annotated methods. If you need some 
advice here, we should make this outside this list since this is no Maven 
issue at all.

Bernd

 
 Med venlig hilsen / Kind regards 
 
 
 Søren Krogh Neigaard
 Systems Engineer
 
 Søren Frichs Vej 39, 8000 Aarhus C
 Denmark 
 
 Mobile +4541965252
 soeren.krogh.neiga...@systematic.com
 www.systematic.com
 
 
 -Original Message-
 From: bernd.adamow...@external.icw-global.com [
 mailto:bernd.adamow...@external.icw-global.com] 
 Sent: 4. februar 2010 11:59
 To: Maven Users List
 Subject: Re: Read properties from pom.xml from Java
 
 Sounds like this might help you:
 
 - Create a Maven plugin which is executed in any phase bevore test, 
 e.g. 'generate-test-resources'. This will make it possible to set up the 

 database. This plugin might help for starting the database (only if 
you're 
 using HSQL): 
 http://gforge.openehealth.org/gf/project/development/wiki/?
 pagename=Documentation+HSQLDB+plugin
 , but there are others, too.
 
 - Reading of POM-properties inside a Maven plugin is easy and described 
 here: 
 http://www.sonatype.com/books/mvnref-book/reference/writing-plugins-
 sect-mojo-params.html#writing-plugins-sect-param-values
 
 However, the scenario described by you clearly indicates that this is 
not 
 a unit test instead it is an integration test where other rules/plugins 
 might apply, e.g. maven-invoker-plugin. But this would recommend a 
 restructuring of your project and might not be what you want. 
 
 Bernd
 
 
 
 
 
 
 Søren Krogh Neigaard soeren.krogh.neiga...@systematic.com wrote on 
 04.02.2010 09:59:26:
 
  [image removed] 
  
  Read properties from pom.xml from Java
  
  Søren Krogh Neigaard 
  
  to:
  
  users
  
  04.02.2010 10:00
  
  Please respond to Maven Users List
  
  Hi
  
  
  
  I have been tossed into a maven controlled project. We run our junit
  tests from Eclipse and also on our build server. When ever they are 
  run, some maven magic happens so that username/password/driver/url 
  for the dabase is correctly set for the user pc or the buildserver. 
  However I need to make a small helper class for my junit tests that 
  wipes the database and loads some testdata on the database for every
  junit test.
  
  
  
  The username/password/driver/url for the database is set in the 
  pom.xml file by maven. How do I read these values from my Java helper 
 class?
  
  
  
  Best regards
  
  Søren 
  
  
  
 
 
 
 InterComponentWare AG: 
 Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / 
 Aufsichtsratsvors.: Prof. Dr. Christof Hettich 
 Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 
 351761 / USt.-IdNr.: DE 198388516  =
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 


InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. 
Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Industriestraße 41 / AG Mannheim HRB 351761 / 
USt.-IdNr.: DE 198388516  =

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



Configuring components.xml into assembly plugin

2010-02-04 Thread Graham Charters
Hi,

I have a components.xml definition that tells the assembly plugin to
use the ZipArchiver when configured with formatext/format, where
'ext' is a new file extensions to use instead of zip.  The component
element looks as follows:

component
  roleorg.codehaus.plexus.archiver.Archiver/role
  role-hintext/role-hint
  
implementationorg.codehaus.plexus.archiver.zip.ZipArchiver/implementation
  instantiation-strategyper-lookup/instantiation-strategy
/component

I can get this to work if I compile my own copy of the assembly
plugin, updating it's plexus/components.xml to include the
definitions, but the documentation seems to hint at a better way.

I've just started trying to include the definition through
containerDescriptorHandler / as follows:

containerDescriptorHandler
  handlerNameext/handlerName
  configuration
filePattern./components.xml/filePattern
  /configuration
/containerDescriptorHandler

I'm not sure if this is the right approach, but it gives me this gives
me the following error:

Assembly is incorrectly configured: null

Assembly: null is not configured correctly: Cannot find
ContainerDescriptorHandler with hint: ext

I searched for examples, but can't find anything that clearly
describes what I'm trying to do.  Any pointers or ideas on how to
fix/do this would be greatly appreciated.

Regards, Graham.

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



Re: Read properties from pom.xml from Java

2010-02-04 Thread Martin Höller
Hi!

Am Freitag, 5. Februar 2010 08:41:02 schrieb Søren Krogh Neigaard:
 I have this in my settings.xml

 settings
   profiles
 profile
   activation
 activeByDefaulttrue/activeByDefault
   /activation
   properties
 database.driveroracle.jdbc.driver.OracleDriver/database.driver
 database.urljdbc:oracle:thin:@myhome:1521:orcl/database.url
 database.usernamefoo/database.username
 database.passwordbar/database.password
   /properties
 /profile
   /profiles
 /settings

 And I have tried with these in my pom.xml:

 properties
   db.driveroracle.jdbc.OracleDriver/db.driver
   db.url${database.url}/db.url
   db.username${database.username}/db.username
   db.password${database.password}/db.password
 /properties

 And this:

 properties
   database.driveroracle.jdbc.OracleDriver/database.driver
   database.urldummy/database.url
   database.usernamedummy/database.username
   database.passworddummy/database.password
 /properties

 I still get null with System.getProperty

Sorry, I missed one important point: you have to export your properties to 
become system properties. Do this by configuring the surefire plugin as 
described here:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html

I just double checked it, this way it works.

hth,
- martin


signature.asc
Description: This is a digitally signed message part.