RE: Read properties from pom.xml from Java

2010-02-05 Thread bernd . adamowicz
According to Maven's documentation here 
http://maven.apache.org/pom.html#Properties, this should work (I didn't 
try it):

settings.xml:


  

  
true
  
  
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@myhome:1521:orcl

pom.xml:


  oracle.jdbc.OracleDriver
  ${settings.database.url}

I don't know if the profile comes into play in this case or if the whole 
path is needed like 'settings.profiles.profile'. Just try it.

Bernd


Søren Krogh Neigaard  wrote on 
05.02.2010 08:47:04:

> [image removed] 
> 
> RE: Read properties from pom.xml from Java
> 
> Søren Krogh Neigaard 
> 
> to:
> 
> Maven Users List
> 
> 05.02.2010 08:47
> 
> Please respond to "Maven Users List"
> 
> 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


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: maven release plugin and subversion externals

2010-02-05 Thread @work


Karl Heinz Marbaise wrote:
> 
> ...
> first: Have you defined scm section in your root pom ?
> 

Yes, each module and the parent has its own scm section. 
If we remove the  section from the parent we can 
release the modules and the parent in single steps.


Karl Heinz Marbaise wrote:
> 
>> 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 ?
> ...
> 

we are referencing the trunk of the modules without a revision

http://svn/repo/module1/trunk  module1
http://svn/repo/module2/trunk  module2


Yours Rüdiger




-- 
View this message in context: 
http://n2.nabble.com/maven-release-plugin-and-subversion-externals-tp4514253p4518752.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



Maven translation (i18n) plugin

2010-02-05 Thread Henri Gomez
Hi to all,

I'm looking for a maven translator (i18n) plugin which could be able
to create localized properties files from a master properties file and
a SQL backend containing the translation.
These files are for RCP applications but it should be able to works
with any properties files under src/main/resources

Did there is such plugin or may be a known plugin where I could add
(contribute) this SQL support ?
I does that years ago for ant tasks.

Regards

-
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-05 Thread Søren Krogh Neigaard
Im getting grey hairs :)

I tried with this in my pom.xml:


  org.apache.maven.plugins
  maven-surefire-plugin
  2.5
  

  oracle.jdbc.OracleDriver
  ${database.url}
  ${database.username}
  ${database.password}

  


And this:


  org.apache.maven.plugins
  maven-surefire-plugin
  2.5
  

  oracle.jdbc.OracleDriver
  ${settings.database.url}
  ${settings.database.username}
  ${settings.database.password}

  


I also tried with this:


  oracle.jdbc.OracleDriver
  ${settings.database.url}
...

Al of my attempts gives me null :(

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 09:00
To: Maven Users List
Subject: Re: Read properties from pom.xml from Java

Hi!

Am Freitag, 5. Februar 2010 08:41:02 schrieb Søren Krogh Neigaard:
> I have this in my settings.xml
>
> 
>   
> 
>   
> true
>   
>   
> oracle.jdbc.driver.OracleDriver
> jdbc:oracle:thin:@myhome:1521:orcl
> foo
> bar
>   
> 
>   
> 
>
> And I have tried with these in my pom.xml:
>
> 
>   oracle.jdbc.OracleDriver
>   ${database.url}
>   ${database.username}
>   ${database.password}
> 
>
> And this:
>
> 
>   oracle.jdbc.OracleDriver
>   dummy
>   dummy
>   dummy
> 
>
> 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

-
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-05 Thread Stephen Connolly
On 5 February 2010 06:45, Søren Krogh Neigaard <
soeren.krogh.neiga...@systematic.com> wrote:

> Thank you all for your answers
>
> I tried adding the following to my pom.xml
>
> 
>  oracle.jdbc.OracleDriver
>  ${database.url}
>  ${database.username}
>  ${database.password}
> 
>
> And tried reading with System.getProperty("database.username"), but it gave
> me null.
>
>
Are you doing this from within a JUnit test launched by either
maven-surefire-plugin or maven-failsafe-plugin?

If so then the reason you cannot read the properties is because surefire is
cleaning up the system properties in order to encourage keeping your code
decoupled from maven... (which actually is a good thing... good build tools
should not lock you in, and should encourage you to do things in a way where
you are not locked into your build tool... that way you will continue to use
that build tool because it is the best, and not because you are locked in)

There are really two ways to solve your problem...

1. Read the connection details from a file on the classpath, e.g. in your
unit test you would do something like:

public class MyTest {

...

private final Properties properties = new Properties();

@Before
public void setUp() throws IOException {
properties.load(getClass().getResourceAsStream("/test.properties"));
...
}

   ...

}

you then enabling filtering on the properties file which you put in
src/test/resources, e.g. for the above example you would put your properties
in ${basedir}/src/test/resources/test.properties

For most of my projects, I get fed up enabling filtering on specific files,
so I just have this in our corporate root pom:



false

${basedir}/src/main/resources/verbatim


true

${basedir}/src/main/resources/filtered




false

${basedir}/src/test/resources/verbatim


true

${basedir}/src/test/resources/filtered



And I would but test.properties in ${basedir}/src/test/resources/filtered

2. Read the connection details from the System properties... this requires
telling Surefire/Failsafe to set the system properties, see
http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html

HTH

-Stephen

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  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 sm

Re: Maven translation (i18n) plugin

2010-02-05 Thread mkleint
there is http://mojo.codehaus.org/l10n-maven-plugin/ but it doesn't 
exactly do what you describe


Milos

Henri Gomez wrote:

Hi to all,

I'm looking for a maven translator (i18n) plugin which could be able
to create localized properties files from a master properties file and
a SQL backend containing the translation.
These files are for RCP applications but it should be able to works
with any properties files under src/main/resources

Did there is such plugin or may be a known plugin where I could add
(contribute) this SQL support ?
I does that years ago for ant tasks.

Regards

-
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-05 Thread Martin Höller
Am Freitag, 5. Februar 2010 09:50:04 schrieb Søren Krogh Neigaard:
> Im getting grey hairs :)
>
> I tried with this in my pom.xml:
>
> 
>   org.apache.maven.plugins
>   maven-surefire-plugin
>   2.5
>   
> 
>   oracle.jdbc.OracleDriver
>   ${database.url}
>   ${database.username}
>   ${database.password}
> 
>   
> 

That's almost exactly how I do it. The differences are:
- I'm still using surefire 2.4.2
- Due to the older version I use the (now) deprecated method of defining
  system properties in surefire ( instead of
  )

How and where are you trying to access the properties? In some JUnit test 
which is executed by the maven surefire plugin via 
System.getProperty("db.url")? That definitely works for me.

However, Stephen's comments about locking you to maven this way sounds 
reasonable. His approach is probably the better one. But I don't know yet how 
these properties could be used in pom.xml for plugin configuration. Do they 
get imported by maven somehow?

hth,
- martin


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


Re: Maven translation (i18n) plugin

2010-02-05 Thread Henri Gomez
Thanks Milos.

It's a good starting point

2010/2/5 mkleint :
> there is http://mojo.codehaus.org/l10n-maven-plugin/ but it doesn't exactly
> do what you describe
>
> Milos
>
> Henri Gomez wrote:
>>
>> Hi to all,
>>
>> I'm looking for a maven translator (i18n) plugin which could be able
>> to create localized properties files from a master properties file and
>> a SQL backend containing the translation.
>> These files are for RCP applications but it should be able to works
>> with any properties files under src/main/resources
>>
>> Did there is such plugin or may be a known plugin where I could add
>> (contribute) this SQL support ?
>> I does that years ago for ant tasks.
>>
>> Regards
>>
>> -
>> 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: Maven translation (i18n) plugin

2010-02-05 Thread Henri Gomez
This one seems interesting :

http://lutinutil.labs.libre-entreprise.org/maven-i18n-plugin/index.html

Someone use it allready ?

2010/2/5 Henri Gomez :
> Thanks Milos.
>
> It's a good starting point
>
> 2010/2/5 mkleint :
>> there is http://mojo.codehaus.org/l10n-maven-plugin/ but it doesn't exactly
>> do what you describe
>>
>> Milos
>>
>> Henri Gomez wrote:
>>>
>>> Hi to all,
>>>
>>> I'm looking for a maven translator (i18n) plugin which could be able
>>> to create localized properties files from a master properties file and
>>> a SQL backend containing the translation.
>>> These files are for RCP applications but it should be able to works
>>> with any properties files under src/main/resources
>>>
>>> Did there is such plugin or may be a known plugin where I could add
>>> (contribute) this SQL support ?
>>> I does that years ago for ant tasks.
>>>
>>> Regards
>>>
>>> -
>>> 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: maven release plugin and subversion externals

2010-02-05 Thread Karl Heinz Marbaise

Hi,

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


If you do an mvn release:perform ...aren't you asked for the release 
version etc. during the process ?


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



RE: Read properties from pom.xml from Java

2010-02-05 Thread Søren Krogh Neigaard
Well it seems that I use 2.4.3, so I have changed it to the now deprecated way 
also. It still gives me null values... :(

I think my problem is elsewhere now, I do not think maven gets activated when I 
run my junit tests. I will look into this issue now.

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 11:01
To: Maven Users List
Subject: Re: Read properties from pom.xml from Java

Am Freitag, 5. Februar 2010 09:50:04 schrieb Søren Krogh Neigaard:
> Im getting grey hairs :)
>
> I tried with this in my pom.xml:
>
> 
>   org.apache.maven.plugins
>   maven-surefire-plugin
>   2.5
>   
> 
>   oracle.jdbc.OracleDriver
>   ${database.url}
>   ${database.username}
>   ${database.password}
> 
>   
> 

That's almost exactly how I do it. The differences are:
- I'm still using surefire 2.4.2
- Due to the older version I use the (now) deprecated method of defining
  system properties in surefire ( instead of
  )

How and where are you trying to access the properties? In some JUnit test which 
is executed by the maven surefire plugin via System.getProperty("db.url")? That 
definitely works for me.

However, Stephen's comments about locking you to maven this way sounds 
reasonable. His approach is probably the better one. But I don't know yet how 
these properties could be used in pom.xml for plugin configuration. Do they get 
imported by maven somehow?


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-05 Thread Stephen Connolly
On 5 February 2010 10:01, Martin Höller  wrote:

> Am Freitag, 5. Februar 2010 09:50:04 schrieb Søren Krogh Neigaard:
> > Im getting grey hairs :)
> >
> > I tried with this in my pom.xml:
> >
> > 
> >   org.apache.maven.plugins
> >   maven-surefire-plugin
> >   2.5
> >   
> > 
> >   oracle.jdbc.OracleDriver
> >   ${database.url}
> >   ${database.username}
> >   ${database.password}
> > 
> >   
> > 
>
> That's almost exactly how I do it. The differences are:
> - I'm still using surefire 2.4.2
> - Due to the older version I use the (now) deprecated method of defining
>  system properties in surefire ( instead of
>  )
>
> How and where are you trying to access the properties? In some JUnit test
> which is executed by the maven surefire plugin via
> System.getProperty("db.url")? That definitely works for me.
>
> However, Stephen's comments about locking you to maven this way sounds
> reasonable. His approach is probably the better one. But I don't know yet
> how
> these properties could be used in pom.xml for plugin configuration. Do they
> get imported by maven somehow?
>

My way would have test.properties with the following contents:

db.driver=oracle.jdbc.OracleDriver
db.url=${database.url}
db.username=${database.username}
db.password=${database.password}

By having the test resource filtered, the properties from the pom/settings
will be substituted into the resource when it is copied to
target/test-classes by maven-resources-plugin

If you decide to move away from maven, all you have to do is modify how the
test.properties file gets copied...

and the bonus is that you can debug the property substitution as you can
look at target/test-classes/test.properties to verify that it is being
substituted correctly.


>
> hth,
> - martin
>


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

2010-02-05 Thread Ognjen Blagojevic

It is already in JIRA [1], but the bug is still unresolved.

Apparently, Maven 2.2.0 handles HTTP 301 alright, but I didn't try it. 
Other versions, including 2.2.1, don't handle that well.


The bug priority is minor. Maybe it should be higher since it breaks 
recently created local repositories.


Regards,
Ognjen

[1] http://jira.codehaus.org/browse/MNG-4428


Johannes Schneider wrote:
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



301 Moved Permanently

Moved Permanently
The document has moved href="http://download.java.net/maven/1/com.sun.jdmk/poms/jmxtools-1.2.1.pom";>here. 



Apache Server at maven-repository.dev.java.net Port 
443




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





-
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-05 Thread Karl Heinz Marbaise

Hi,


we are referencing the trunk of the modules without a revision

http://svn/repo/module1/trunk  module1
http://svn/repo/module2/trunk  module2



This brings me to the question:

Why not putting all modules in the folder structure

   Root
 +--- module1
 +--- module2

without using svn:externals ?

I don't see the needs for using externals if you are referencing the 
trunk of the modules...?


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



question about profile inheritance

2010-02-05 Thread Thomas Markus
hi,

i try to define profiles in a parent pom and activate these profiles in
a child pom. its a little bit confusion.

in child project part1

mvn help:active-profiles

shows
 - test1 (source: pom)
 - base (source: settings.xml)

but a

mvn

doesn't runs my plugin (no inheritance)

but a

mvn -P test1

(expected to be same)

executes the plugin

what i'm missing here? i try to define profiles for different project
configurations.

regards
Thomas



parent pom:


http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>

4.0.0
MavenTest
Main
pom
0.0.1-SNAPSHOT


part1



initialize




test1



org.apache.maven.plugins
maven-antrun-plugin


runtest1
initialize

run



















child pom:

http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>

4.0.0
MavenTest
part1


MavenTest
Main
0.0.1-SNAPSHOT
..




test1

true








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



Re: question about profile inheritance

2010-02-05 Thread Jörg Schaible
Thomas Markus wrote at Freitag, 5. Februar 2010 12:39:

> hi,
> 
> i try to define profiles in a parent pom and activate these profiles in
> a child pom. its a little bit confusion.
> 
> in child project part1
> 
> mvn help:active-profiles
> 
> shows
>  - test1 (source: pom)
>  - base (source: settings.xml)
> 
> but a
> 
> mvn
> 
> doesn't runs my plugin (no inheritance)
> 
> but a
> 
> mvn -P test1
> 
> (expected to be same)
> 
> executes the plugin
> 
> what i'm missing here? i try to define profiles for different project
> configurations.

[snip]

> parent pom:
> 
> 

[snip]

> 
> 
> test1
> 

[snip]

> 
> 
> 
> 
> 
> 
> 
> child pom:
> 

[snip]

> 
> 
> test1
> 
> true
> 
> 
> 

[snip]

Activation of a profile is either global if set by command line or activated 
in the settings.xml, otherwise the activation is only local to the *current* 
POM i.e. in your parent is not activated and the profile in your child POM 
does actually not add something to the build.

- Jörg



-
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-05 Thread @work


Karl Heinz Marbaise wrote:
> 
> ...
> If you do an mvn release:perform ...aren't you asked for the release
> version etc. during the process ? 
> ...
> 
I'm asked for the release version for all modules but only asked for the new
SNAPSHOT version for the parent module.



Karl Heinz Marbaise wrote:
> 
> ...
> Why not putting all modules in the folder structure
> 
> Root
>   +--- module1
>   +--- module2
> 
> without using svn:externals ?
> ...
> 
Thats a company policy. The modules are in different svn repositorys. 


Yours Rüdiger


-- 
View this message in context: 
http://n2.nabble.com/maven-release-plugin-and-subversion-externals-tp4514253p4519649.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: question about profile inheritance

2010-02-05 Thread Thomas Markus
i read this,

but the behaviour is not constistent. and how to define reusable
profiles for multiple projects?

thanks
Thomas


Am 05.02.2010 13:14, schrieb Jörg Schaible:
>
> [snip]
>
> Activation of a profile is either global if set by command line or activated 
> in the settings.xml, otherwise the activation is only local to the *current* 
> POM i.e. in your parent is not activated and the profile in your child POM 
> does actually not add something to the build.
>
> - Jörg
>
>
>
> -
> 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-05 Thread Haroon Rafique
On Yesterday at 1:26pm, PA=>Pankaj Agarwal  wrote:

PA> Here's the exact error.
PA> 
PA> [INFO] 
PA>  
PA> [ERROR] BUILD ERROR [INFO] 
PA>  
PA> [INFO] An Ant BuildException has occured: The following error occurred 
PA> while executing this line: build.xml:118: 
PA> com.bea.util.jam.internal.javadoc.JavadocClassloadingException: An 
PA> error has occurred while invoking javadoc to inspect your source

Here's my experience. I don't remember when I added this, but here is what 
I use as a dependency for the maven-antrun-plugin:


sun.jdk
tools
1.6
system
${java.home}/../lib/tools.jar


Works for me, YMMV.

Hope that helps.
--
Haroon Rafique



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



2.0-beta-10 of release plugin

2010-02-05 Thread Todd Thiessen
It doesn't look like this version of the release plugin has been
released yet. It has the useRemoteTagging fix or the branch goal in it
which I am interested in. Could this plugin be released?

---
Todd Thiessen

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



release:branch keeps SCM section pointing to branch

2010-02-05 Thread Todd Thiessen
I found it a little odd that the branch goal of the release plugin does
not change the SCM section back to trunk after it has created the
branch.

Isn't this wrong or am I not fully understanding the work flow?

---
Todd Thiessen

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



Re: 2.0-beta-10 of release plugin

2010-02-05 Thread Stephen Connolly
it's being skipped and 2.0 is in the process of being released but there
are some issues which Benjamin may or may not have vetoed the release on...
as soon as Benjamin clarifies whether he was vetoing the release or not, the
release manager will be able to continue or re-roll the release of 2.0

On 5 February 2010 14:43, Todd Thiessen  wrote:

> It doesn't look like this version of the release plugin has been
> released yet. It has the useRemoteTagging fix or the branch goal in it
> which I am interested in. Could this plugin be released?
>
> ---
> Todd Thiessen
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Nexus and http://repository.codehaus.org KO

2010-02-05 Thread Brian Fox
It's currently proxying all the artifacts in the old one, so if you
use it, it will work. Yes, the plan is to migrate all the codehaus
projects to the new system.

On Wed, Feb 3, 2010 at 5:36 PM, Dan Tran  wrote:
> Hi Brian,
>
> 1. this one is not up to date, i dont see my syslog-maven-plugin snapshot 
> there
>
> 2. Do you see MOJO team going to move to nexus?
>
>
> Thanks
>
> -Dan
>
>
>
>
>
> On Wed, Feb 3, 2010 at 2:25 PM, Brian Fox  wrote:
>> But while we're at it: everyone should use
>> http://nexus.codehaus.org/snapshots/ instead of the old repo.
>>
>> On Wed, Feb 3, 2010 at 3:48 PM, Anders Hammar  wrote:
>>> Wrong mailing list.
>>>
>>> /Anders
>>>
>>> On Wed, Feb 3, 2010 at 21:45, Rémy  wrote:
>>>

 Hello,

 I defined a proxy repository in Nexus pointing on
 http://repository.codehaus.org. This one was unavailable this morning. To
 run the builds, I had to use the "block proxy" option in Nexus. In the
 settings.xml file I have referenced the enterprise repository. I thought to
 be independent from the outside with that configuration.

 Have I properly configured Nexus ?

 Thanks

 Remy
 --
 View this message in context:
 http://old.nabble.com/Nexus-and-http%3A--repository.codehaus.org-KO-tp27443142p27443142.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


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

2010-02-05 Thread Pankaj Agarwal
I have tried it as below but the error is same.

mvn -Djdk.home=/usr/jdk1.6.0_05 clean compile

Thanks,

Pankaj



-Original Message-
From: Stephen Connolly [mailto:stephen.alan.conno...@gmail.com] 
Sent: Thursday, February 04, 2010 2:49 PM
To: Maven Users List
Subject: Re: help needed with maven antrun plugin

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 
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
>
>

-
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-05 Thread Pankaj Agarwal
I tried it but the error is same.

Thanks,

Pankaj



-Original Message-
From: Haroon Rafique [mailto:haroon.rafi...@utoronto.ca] 
Sent: Friday, February 05, 2010 5:27 AM
To: Maven Users List
Subject: RE: help needed with maven antrun plugin

On Yesterday at 1:26pm, PA=>Pankaj Agarwal 
wrote:

PA> Here's the exact error.
PA> 
PA> [INFO] 
PA>


PA> [ERROR] BUILD ERROR [INFO] 
PA>


PA> [INFO] An Ant BuildException has occured: The following error
occurred 
PA> while executing this line: build.xml:118: 
PA> com.bea.util.jam.internal.javadoc.JavadocClassloadingException: An 
PA> error has occurred while invoking javadoc to inspect your source

Here's my experience. I don't remember when I added this, but here is
what 
I use as a dependency for the maven-antrun-plugin:


sun.jdk
tools
1.6
system
${java.home}/../lib/tools.jar


Works for me, YMMV.

Hope that helps.
--
Haroon Rafique



-
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



Maven Archetype 1.0 to 2.0 variations question on CLI interactive prompt

2010-02-05 Thread Matthew McCullough
I spoke with Wendy on IRC today about fixing some archetypes, but
there were some more questions lingering.  I'm aiming to fix a few
things in the "core" apache archetypes...


I want to try to weave a freshened maven-archetype-j2ee-simple into
the new 'sample' directory of trunk's archetype plugin, but I'm a bit
puzzled looking at the code.

The motivator is that the 1.0 version of the
maven-archetype-j2ee-simple is the latest one in central, linked via
archetype-catalog.xml
(http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/resources/archetype-catalog.xml?view=markup),
but is broken because it is missing the required 'site' directory.
I'm seeing buzz about it
(http://stackoverflow.com/questions/1082012/maven-archetype-j2ee-simple-generates-a-failing-project)
that is making Maven look unmaintained (and I try to fix things, when
I can) like http://jira.codehaus.org/browse/ARCHETYPE-228 which was
created a year ago with no commiter responses.


I wasn't seeing the maven-archetype-j2ee-simple in the archetype
plugin trunk code.

Wendy pointed out it was in the 1.0 branch
(http://svn.apache.org/viewvc/maven/archetype/branches/archetype-1.0.x/maven-archetype-bundles/)
and NOT migrated to trunk (2.0-alpha-4,
http://svn.apache.org/viewvc/maven/archetype/trunk/)

Wendy noted: "It all changed with archetype 2.0 and I don't think all
the archetypes came back.  now they get generated from samples or
something."

Can anyone elaborate on the above statement?  Any docs/wiki/nabble
links on the rewrite and new way to use 'samples'?

When I use mvn archetype:generate (2.0-alpha-4) via the interactive
CLI menu, it appears to only use the old 1.0 archetypes in the
http://repo1.maven.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/
directory, and not the 'samples' that live in the trunk of the
archetype plugin code. Where do the new samples live in central and
how would I get archetype:generate to use one of those new ones in
'samples', like the 2.0-alpha-4 of quickstart
http://github.com/apache/maven-archetype/tree/trunk/archetype-samples/quickstart/
?


Thanks,
Matthew McCullough
matthewm AT ambientideas DOT com


--

Extra Commentary from the IRC chat:
Matthew: So it's in the branch, but not in trunk.  How would one fix
it?  Merge the existing version with fixes over to trunk?

Wendy: 1.0 of the archetype you mean?  no, trunk is a rewrite.  you
can patch the branch, but I doubt it will ever be released.
figure out how the archetypes work on trunk, and get the j2ee one added back
I think it's that 'sample' directory.  If you put a sample project
there, an archetype gets generated from it.  but you'd have to ask.

Matthew: The RELEASE that is pointed to by
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/resources/archetype-catalog.xml?view=markup
is the 1.0 release of the plugin
http://repo1.maven.org/maven2/org/apache/maven/archetypes/maven-archetype-j2ee-simple/1.0/

Matthew: I'd hate to have anyone take it out of the
archetype-catalog.xml so that it doesn't show on the CLI..., but given
it isn't currently part of the trunk codebase along with
archetype-catalog.xml...

Matthew: What's the process/timeline for requesting a release of the
archetype plugin?  I've recently had a bug-fix patch committed by
Brett (ARCHETYPE-272) and I'll get one in tonight to ARCHETYPE-Those
two will make archetype look a lot better to my class next week if we
could get a release cut.

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



Re: Problem with artifacts generated by custom plugins

2010-02-05 Thread kristian
I think you made the same mistake as I did (until last night):

>true

says that the artifact already includes all its dependencies and the
dependency resolution stops here (unless it is the root project).

so just put
false
and you will see all your transitive dependencies !!

with regards
Kristian


On Mon, Jan 11, 2010 at 9:39 AM, GALLAGHER, RON (ATTSI)  wrote:
> I've been using Maven for quite a number of years now and have, in the
> last year or so, started creating a number of plugins to support the
> needs of our local development organizations.  However, I'm having some
> trouble with dependency resolution when artifacts that are generated by
> my custom plugins are included in another project's dependency list.
>
> Maven version information...
>
> mvn -version
> Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
> Java version: 1.6.0_14
> Java home: C:\jdk1.6.0_14\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>
> Here's some background on the plugins I created...
>
> The first plugin I created is a "TPAR" plugin.  This plugin creates
> artifacts that are physically structured as JAR files.  I'm using the
> MavenArchiver/JarArchiver classes to create these JAR files.  However,
> in order to keep these artifacts separate from other 'real' jar files
> (the ones with java class files in them), I am using an artifact type of
> "tpar" for these artifacts. This first plugin works perfectly and is
> generating artifacts in exactly the format that I describe.  For
> reference purposes, here is the full contents of this plugin's
> META-INF/plexus/components.xml file:
>
> 
>  
>    
>      org.apache.maven.lifecycle.mapping.LifecycleMapping
>      tpar
>
> org.apache.maven.lifecycle.mapping.DefaultLifecycleMappi
> ng
>      
>        
>          
>            default
>            
>
> org.apache.maven.plugins:maven-tpar-plugin:tpar-resou
> rces
>
> org.apache.maven.plugins:maven-tpar-plugin:tpar
>
> org.apache.maven.plugins:maven-install-plugin:install
>
> org.apache.maven.plugins:maven-deploy-plugin:deploy
>            
>          
>        
>      
>    
>    
>      org.apache.maven.artifact.handler.ArtifactHandler
>      tpar
>
> org.apache.maven.artifact.handler.DefaultArtifactHandler
> 
>      
>        tpar
>        true
>        java
>        true
>        jar
>        jar
>      
>    
>  
> 
>
> The second plugin that I created is a "KIT" plugin.  This plugin creates
> a tar.gz file that contains everything required for the application to
> be deployed and launched.  This plugin is very similar to the assembly
> plugin, but different enough that I could not use the assembly plugin to
> generate exactly what I needed.  For this plugin, I am using Archiver
> instaances that are created by the ArchiverManager class to generate the
> tar.gz file.  Like the first plugin, this plugin works perfectly and
> generates exactly what I want.  The key behavior I am looking for from
> this project is its ability to include every directly or indirectly
> referenced JAR file in the tar.gz file that it generates.
>
> Now, some background on the projects that use these plugins...
>
> You only need two projects to create this situation.  The first project
> uses the TPAR plugin to generate a "TPAR" artifact.  The dependency list
> for this project contains a single jar file entry.  For illustration
> purposes, I'll use version 2.3 of the commons-lang component.  The
> second project uses the KIT plugin to generate a "KIT" artifact.  The
> dependency list for this second project contains a single entry that
> references the TPAR artifact that's generated by the first project.  A
> very simplified view of the dependency graph would look something like
> this:
>
> KIT Project "A" ---> TPAR Project "B" ---> commons-lang.jar
>
> Finally, here's the problem that I'm having...
>
> Running I run a build of just the TPAR project will generate a properly
> structured TPAR artifact which can be installed in my local repository.
> Running a build of just the KIT project will generate a properly
> structure KIT artifact which can also be installed in my local
> repository.  This kit contains both the TPAR artifact and the jar file
> that it references (i.e. commons-lang-2.3.jar)
>
> Running each of these builds in isolation works perfectly.  However,
> things don't work so well when I run them within a multi-module project.
> When I do that, Maven accurately resolves the inter-project references
> and builds the TPAR project before the KIT project.  The KIT that is
> generated contains the TPAR artifact that was generated by project "A".
> However, that KIT DOES NOT contain the commons-lang-2.3.jar file that is
> referenced by the TPAR project.  The KIT file only contains the TPAR
> artifact.
>
> In other words...
>
> * If I build the KIT project by itself, the generated KIT contains all
> dependencies in the full dependency graph.  

[shade plugin] included 'provided' dependencies

2010-02-05 Thread Simone Tripodi
Hi all guys,
I've been developing a multi-module project where one module is the
'commons' stuff and the other modules are dependent from the first
one; when producing artifacts, I want to include the 'commons'
dependency in the final jar, so I started using the shade plugin, and
declared the 'commons' dependency scope as 'provided', but sadly
noticed that dependencies which scope is 'provided' are not included
even if specified in the shade configuration.
Do you know if there is any other way/best practice that could help me, please?
Thanks in advance, best regards!
Simo

http://people.apache.org/~simonetripodi/

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