Re: Missing goal eclipse:m2eclipse in version 2.8 of the Maven Eclipse plugin

2010-12-17 Thread Barrie Treloar
On Thu, Dec 16, 2010 at 9:39 PM, Stefan Eder  wrote:
>  Hi,
>
> since quite a while I am using Maven and Eclipse together with the Eclipse
> plugin for Maven and the Maven plugin for Eclipse. And it is just great.
>
> But in the version 2.8 of the Eclipse plugin for Maven I am (hardly) missing
> the goal m2eclipse.
>
> How can I tell the version 2.8 of the Eclipse plugin to create .classpath
> files that refer to MAVEN2_CLASSPATH_CONTAINER and to add Maven nature and
> build command to the .project files without touching the corresponding poms?

You don't, you use m2eclipse directly.
If you are using m2eclipse, you *CAN NOT* use maven-eclipse-plugin,
hence it being removed in 2.8

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



Re: Maven 3 reports wrong version

2010-12-17 Thread Guo Du
On Fri, Dec 17, 2010 at 2:22 PM, Andre M  wrote:
> being run is indeed maven3.0.1bin\mvn.bat.
Do you have M2_HOME in environment pointed to old version?

-Guo

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



Re: How to resolve 'LATEST'

2010-12-17 Thread Asmann, Roland
Currently I am not using this, but I want the enforcer to check which 
version 'LATEST' is and tell the user he should update to that version!


On 17-12-10 17:04, Brian Fox wrote:
> Don't use RELEASE or LATEST.
>
> On Fri, Dec 17, 2010 at 7:43 AM, Asmann, Roland
>  wrote:
>  > Hi all,
>  >
>  > I'm writing an enforcer-rule, that should check if my parent is the
>  > LATEST version. How can I get the actual version for 'LATEST'?
>  >
>  > Thanks!
>  >
>  > --
>  > Roland Asmann
>  > Senior Software Engineer
>  >
>  > adesso Austria GmbH
>  > Floridotower 26. Stock  T +43 1 2198790-27
>  > Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
>  > A-1210 Wien M +43 664 88657566
>  >E roland.asm...@adesso.at
>  >W www.adesso.at
>  >
>  > -
>  > >>> business. people. technology. <<<
>  > -
>  >
>  > -
>  > 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
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
 >>> business. people. technology. <<<
-

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



maven-svn-revision-number-plugin Date Property

2010-12-17 Thread Maria Carolina Ramirez
Hi,

 

Well I have a question of the use of maven-svn-revision-number-plugin.  I need 
to have in an output file the information of the svn.

 

So, now I have this information in my file.

 

repository = ${prefix.repository}

path = ${prefix.path}

revision = ${prefix.revision}

mixedRevisions = ${prefix.mixedRevisions}

committedRevision = ${prefix.committedRevision}

 

I was wondering if I could have the Last Changed Date because is important for 
the developers of my company to have this information. For example something 
like that:

 

LastChangedDate: 2010-12-15 11:18:54 -0500 (Wed, 15 Dec 2010) à Specifies the 
last date of a changed 

 

 I was looking in the maven documentation but I couldn't find information about 
this property so I don't know if it is not specified or it is not exists

 

If someone knows I appreciate your help.

 

Thanks in advance,

 

Carolina Ramirez.



Re: How to resolve 'LATEST'

2010-12-17 Thread Brian Fox
Don't use RELEASE or LATEST.

On Fri, Dec 17, 2010 at 7:43 AM, Asmann, Roland  wrote:
> Hi all,
>
> I'm writing an enforcer-rule, that should check if my parent is the
> LATEST version. How can I get the actual version for 'LATEST'?
>
> Thanks!
>
> --
> Roland Asmann
> Senior Software Engineer
>
> adesso Austria GmbH
> Floridotower 26. Stock              T +43 1 2198790-27
> Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
> A-1210 Wien                         M +43 664 88657566
>                                    E roland.asm...@adesso.at
>                                    W www.adesso.at
>
> -
>             >>> business. people. technology. <<<
> -
>
> -
> 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 package a JAR file in an EAR file so that this can be accessed by all other modules (ex: EJB, WAR, etc)

2010-12-17 Thread Wayne Fay
> I do not know if the error is because I lack some configuration setting or
> else because Geronimo does not realise that the ehb module needs the
> persistence module and therefore one should be deplpoyed before the other.

The manual way to fix this: unpack the EAR that Maven produced, and
unpack the WAR and JAR inside. Tweak the files and repack until you
get something Geronimo will consume. Then go back and figure out what
configuration you might need to change inside your Maven poms to make
it work.

Or, the simpler process is to just run the j2ee verifier tool from
Glassfish against your EAR file and see what it complains about. If
you construct a proper/valid EAR file as far as the verifier is
concerned, then Geronimo should deploy it -- if it doesn't, then you
can complain to the Geronimo folks.

Wayne

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



Re: POM inheritance breaks build

2010-12-17 Thread cowwoc


cowwoc wrote:
> 
> 
> Jörg Schaible-3 wrote:
>> 
>> The point is that it is platform dependent - the platform your developer
>> is 
>> using. A profile should not be used to define dependencies - at least if 
>> those should be transitively inherited. It simply does not work in the
>> way 
>> most people assume. It is not inherited anyway, therefore you have to
>> define 
>> it already twice (in A and B). This does not scale also.
>> 
>> What you might try is to define a swt pom (or package type pom) for all 
>> platforms like:
>> 
>> ...
>>   com.eclipse
>>   swt-generic
>>   3.6.1
>>   pom
>> 
>>   
>> 
>>   win32
>>   
>> com.eclipse
>> swt
>> 3.6.1
>> win32-x86
>>   
>> 
>> ...
>>   
>> 
>> and refer that everywhere you need it as provided:
>> 
>> ..
>> 
>>   com.eclipse
>>   swt-generic
>>   3.6.1
>>   pom
>>   provided
>> 
>> ..
>> 
>> Your developers may actually set their default in the settings.xml:
>> 
>>   
>> win32
>> ...
>>   
>>   
>> 
>>   win32
>> 
>> ...
>>   
>> 
>> The provided scope prevents that a special one is taken and you have to 
>> select the appropriate one(s) when packaging your app e.g. with the
>> assembly 
>> plugin.
>> 
> 
> Hi Jörg,
> 
> I followed your instructions but I don't understand how:
> 
>   
> win32
> ...
>   
>   
> 
>   win32
> 
> ...
>   
> 
> leads to the inclusion of the Windows-specific SWT library. It doesn't
> seem to activate the "win32" profile in the SWT project. Any ideas?
> 
> Gili
> 

I should clarify: I can see how  causes the SWT project to
build correctly (generating a Windows JAR file). What I can't see is how to
get that JAR file to show up as a dependency in the project that depends on
SWT.

One final complication: is there a way for me to define ${swt.classifier} in
the SWT project and have it  show in the child project? My first use-case is
to include SWT as a normal dependency. My second use-case is to use
maven-unpack-plugin to download and unpack the JAR file. To do the latter, I
need the classifier name in the child project.

Thanks,
Gili
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/POM-inheritance-breaks-build-tp3263869p3309568.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: Shade plugin dependency

2010-12-17 Thread Jörg Schaible
Hi Paul,

Paul Mendelson wrote:

> I get an error when I build using shade plugin 1.4 that it is having
> trouble resolving a dependency on org.apache.commons:commons-io:1.3.2.

GroupId is wrong:
http://mvnrepository.com/artifact/commons-io/commons-io

> The cause of the problem is my maven repo that doesn't have a good copy of
> that jar file.
> 
> My questions for the forum are.
> 
> 1.  Can I configure my plugin to substitute a newer version?
> 2.  Will the next shade go to a newer version?

At least it should use the proper groupId.

- Jörg



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



Re: POM inheritance breaks build

2010-12-17 Thread cowwoc


Jörg Schaible-3 wrote:
> 
> The point is that it is platform dependent - the platform your developer
> is 
> using. A profile should not be used to define dependencies - at least if 
> those should be transitively inherited. It simply does not work in the way 
> most people assume. It is not inherited anyway, therefore you have to
> define 
> it already twice (in A and B). This does not scale also.
> 
> What you might try is to define a swt pom (or package type pom) for all 
> platforms like:
> 
> ...
>   com.eclipse
>   swt-generic
>   3.6.1
>   pom
> 
>   
> 
>   win32
>   
> com.eclipse
> swt
> 3.6.1
> win32-x86
>   
> 
> ...
>   
> 
> and refer that everywhere you need it as provided:
> 
> ..
> 
>   com.eclipse
>   swt-generic
>   3.6.1
>   pom
>   provided
> 
> ..
> 
> Your developers may actually set their default in the settings.xml:
> 
>   
> win32
> ...
>   
>   
> 
>   win32
> 
> ...
>   
> 
> The provided scope prevents that a special one is taken and you have to 
> select the appropriate one(s) when packaging your app e.g. with the
> assembly 
> plugin.
> 

Hi Jörg,

I followed your instructions but I don't understand how:

  
win32
...
  
  

  win32

...
  

leads to the inclusion of the Windows-specific SWT library. It doesn't seem
to activate the "win32" profile in the SWT project. Any ideas?

Gili
-- 
View this message in context: 
http://maven.40175.n5.nabble.com/POM-inheritance-breaks-build-tp3263869p3309523.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: Maven 3 reports wrong version

2010-12-17 Thread Benjamin Bentmann

Andre M wrote:


I just upgraded to Maven3 from Maven2 today, and when I run "mvn.bat
-version", this is what I see:
[...]
 at
org.apache.maven.cli.MavenCli.buildSettings(MavenCli.java:402)

 at org.apache.maven.cli.MavenCli.main(MavenCli.java:202)

 at org.apache.maven.cli.MavenCli.main(MavenCli.java:100)

 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)

 at java.lang.reflect.Method.invoke(Unknown Source)

 at
org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)

 at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)

 at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

 at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)


This stack trace mentions classes which are exclusive to Maven 3.x or 
Maven 2.x, respectively. So you don't appear to be running a clean Maven 
3 distribution (unpacked Maven 3 on top of Maven 2?). Nuking your 
current Maven installation and re-downloading the distro might help.



Benjamin

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



Re: Maven 3 reports wrong version

2010-12-17 Thread Andre M
Hm, this is still a mystery. I've run ./mvn.bat, and I get the same version
reported (2.2.1)
I downloaded a python script that simulates "which" (
http://nedbatchelder.com/code/utilities/wh_py.html) and the maven that is
being run is indeed maven3.0.1bin\mvn.bat.

Should I clear my local .m2 repository? Could some settings be persisted in
there somehow?

On Thu, Dec 16, 2010 at 9:58 PM, Wayne Fay  wrote:

> > I just upgraded to Maven3 from Maven2 today, and when I run "mvn.bat
> > -version", this is what I see:
>
> If you were on a Unix platform, I'd tell you to run "which mvn" to be
> sure that you're running the binary/batch file you believe you're
> executing... but you're on Windows.
>
> Perhaps use Sysinternals Process Monitor to be certain that you're
> actually running Maven3. I think you must not be, and there's another
> Maven2 install lurking on your drive/path somewhere.
>
> Wayne
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Shade plugin dependency

2010-12-17 Thread Paul Mendelson
I get an error when I build using shade plugin 1.4 that it is having trouble
resolving a dependency on org.apache.commons:commons-io:1.3.2.

The cause of the problem is my maven repo that doesn't have a good copy of
that jar file.

My questions for the forum are.

1.  Can I configure my plugin to substitute a newer version?
2.  Will the next shade go to a newer version?


Re: Chicken-and-egg problem: plugin dependencies as modules

2010-12-17 Thread Andreas Sewe

Hi Stephen,


The organizational pom can prescribe the use of the most recently
released ruleset.

The next version of the ruleset would "technically" be checked against
the previous version, but as rulesets are not java code the check will
not be applied on that artifact.


True.

But its a little bit tricky to get this setup off the ground in the 
first place:


1. Release version 1.0 of organizational POM
   (without m-pmd-p)
2. Release version 1.0 of ruleset
   (inheriting from organizational POM, version 1.0)
3. Release version 2.0 of organizational POM
   (with m-pmd-p and ruleset, version 1.0)

And the ruleset is doomed to perpetually lag behind one version of the 
organizational POM.


I think I like the two-parents solution better: the organizational POM 
is restricted to (plugin|dependency)Management, with the other parent 
binding plugins for real.


Best wishes,

Andreas

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



How to resolve 'LATEST'

2010-12-17 Thread Asmann, Roland
Hi all,

I'm writing an enforcer-rule, that should check if my parent is the 
LATEST version. How can I get the actual version for 'LATEST'?

Thanks!

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
 >>> business. people. technology. <<<
-

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



AW: AW: Dependency on pom-project not resolved in reactor on multi-module build

2010-12-17 Thread Hauschel Fred Robert
So I can't see a difference to my test, expecting 
${project.version}
I've used 
${parent.version}
Can't imagine, that that is a difference, but who knows!

Fredy

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

parent
mygroup
1.0-SNAPSHOT

B
jar


${project.groupId}
A
${project.version}
pom





-Ursprüngliche Nachricht-
Von: Florian Rampp [mailto:florian.ra...@jambit.com] 
Gesendet: Freitag, 17. Dezember 2010 13:31
An: Maven Users List
Betreff: AW: AW: Dependency on pom-project not resolved in reactor on 
multi-module build

Yes, I have. See my first mail for the content of A/pom.xml and B/pom.xml

Florian


-- 

Florian Rampp, Software Architect
Phone: +49.89.45 23 47-64


-Ursprüngliche Nachricht-
Von: Hauschel Fred Robert [mailto:fredrobert.hausc...@cirquent.de] 
Gesendet: Freitag, 17. Dezember 2010 13:12
An: Maven Users List
Betreff: AW: AW: Dependency on pom-project not resolved in reactor on 
multi-module build

Hello Florian,
have you defined the pom ??



 mygroup
 A
 ${parent.version}
 pom


Fredy

-Ursprüngliche Nachricht-
Von: Florian Rampp [mailto:florian.ra...@jambit.com] 
Gesendet: Freitag, 17. Dezember 2010 12:42
An: users@maven.apache.org
Betreff: Re: AW: Dependency on pom-project not resolved in reactor on 
multi-module build

Hello Freddy,

Thanks for your quick reply. I should have mentioned that mvn installs solves 
the problem. So Maven resolves the dependency from the local repository. But 
this is just a workaround since I expect the dependency to be resolved from the 
reactor.

I think the order in which the modules are listed in the parent POM is not 
important. If I change the order this does not affect the behavior. Here is the 
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
mygroup
parent
1.0-SNAPSHOT
pom

A
B




The reactor build order is correct:
[INFO] Reactor build order: 
[INFO]   Unnamed - mygroup:parent:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:A:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:B:jar:1.0-SNAPSHOT


It seems to be a bug or at least unexpected behavior in Maven.


Thanks a lot,


Florian



P.S: If this mail does not appear as response on the first thread, I am sorry. 
My mistake.

-- 
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0  Fax:  +49.89.45 23 47-70  

http://www.jambit.comwhere innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139

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



AW: AW: Dependency on pom-project not resolved in reactor on multi-module build

2010-12-17 Thread Florian Rampp
Yes, I have. See my first mail for the content of A/pom.xml and B/pom.xml

Florian


-- 

Florian Rampp, Software Architect
Phone: +49.89.45 23 47-64


-Ursprüngliche Nachricht-
Von: Hauschel Fred Robert [mailto:fredrobert.hausc...@cirquent.de] 
Gesendet: Freitag, 17. Dezember 2010 13:12
An: Maven Users List
Betreff: AW: AW: Dependency on pom-project not resolved in reactor on 
multi-module build

Hello Florian,
have you defined the pom ??



 mygroup
 A
 ${parent.version}
 pom


Fredy

-Ursprüngliche Nachricht-
Von: Florian Rampp [mailto:florian.ra...@jambit.com] 
Gesendet: Freitag, 17. Dezember 2010 12:42
An: users@maven.apache.org
Betreff: Re: AW: Dependency on pom-project not resolved in reactor on 
multi-module build

Hello Freddy,

Thanks for your quick reply. I should have mentioned that mvn installs solves 
the problem. So Maven resolves the dependency from the local repository. But 
this is just a workaround since I expect the dependency to be resolved from the 
reactor.

I think the order in which the modules are listed in the parent POM is not 
important. If I change the order this does not affect the behavior. Here is the 
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
mygroup
parent
1.0-SNAPSHOT
pom

A
B




The reactor build order is correct:
[INFO] Reactor build order: 
[INFO]   Unnamed - mygroup:parent:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:A:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:B:jar:1.0-SNAPSHOT


It seems to be a bug or at least unexpected behavior in Maven.


Thanks a lot,


Florian



P.S: If this mail does not appear as response on the first thread, I am sorry. 
My mistake.

-- 
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0  Fax:  +49.89.45 23 47-70  

http://www.jambit.comwhere innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139

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



Re: Chicken-and-egg problem: plugin dependencies as modules

2010-12-17 Thread Stephen Connolly
The organizational pom can prescribe the use of the most recently
released ruleset.

The next version of the ruleset would "technically" be checked against
the previous version, but as rulesets are not java code the check will
not be applied on that artifact.

-Stephen

On 17 December 2010 11:55, Andreas Sewe
 wrote:
> Hi Wayne,
>
> thanks for the advice.
>
>>> What's the best way to resolve this kind of chicken-and-egg problem
>>> without introducing too many extra projects just to break the cycle? Any
>>
>> This is exactly what you have to do. The rulesets should be packaged
>> and versioned independent of the project. Ideally you'd have one
>> corporate ruleset and all your various projects would just use it.
>
> But the ruleset project should inherit from the organizational POM -- as all
> good projects in our organization do. Now, that would imply that the
> organizational POM cannot prescribe the use of the ruleset, as this would
> result in a cyclic dependency.
>
> What's the way out of this? Is something like the following considered best
> practice?
>
> organizational POM
> |
> +-- ruleset
> |
> +-- project parent (configures p-pmd-plugin with "ruleset" dependency)
>    |
>    +-...- any other project that should be subject to m-pmd-d checks.
>
> Best wishes,
>
> Andreas
>
> -
> 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



AW: AW: Dependency on pom-project not resolved in reactor on multi-module build

2010-12-17 Thread Hauschel Fred Robert
Hello Florian,
have you defined the pom ??



 mygroup
 A
 ${parent.version}
 pom


Fredy

-Ursprüngliche Nachricht-
Von: Florian Rampp [mailto:florian.ra...@jambit.com] 
Gesendet: Freitag, 17. Dezember 2010 12:42
An: users@maven.apache.org
Betreff: Re: AW: Dependency on pom-project not resolved in reactor on 
multi-module build

Hello Freddy,

Thanks for your quick reply. I should have mentioned that mvn installs solves 
the problem. So Maven resolves the dependency from the local repository. But 
this is just a workaround since I expect the dependency to be resolved from the 
reactor.

I think the order in which the modules are listed in the parent POM is not 
important. If I change the order this does not affect the behavior. Here is the 
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
mygroup
parent
1.0-SNAPSHOT
pom

A
B




The reactor build order is correct:
[INFO] Reactor build order: 
[INFO]   Unnamed - mygroup:parent:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:A:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:B:jar:1.0-SNAPSHOT


It seems to be a bug or at least unexpected behavior in Maven.


Thanks a lot,


Florian



P.S: If this mail does not appear as response on the first thread, I am sorry. 
My mistake.

-- 
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0  Fax:  +49.89.45 23 47-70  

http://www.jambit.comwhere innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139

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



Re: Chicken-and-egg problem: plugin dependencies as modules

2010-12-17 Thread Andreas Sewe

Hi Wayne,

thanks for the advice.


What's the best way to resolve this kind of chicken-and-egg problem
without introducing too many extra projects just to break the cycle? Any


This is exactly what you have to do. The rulesets should be packaged
and versioned independent of the project. Ideally you'd have one
corporate ruleset and all your various projects would just use it.


But the ruleset project should inherit from the organizational POM -- as 
all good projects in our organization do. Now, that would imply that the 
organizational POM cannot prescribe the use of the ruleset, as this 
would result in a cyclic dependency.


What's the way out of this? Is something like the following considered 
best practice?


organizational POM
|
+-- ruleset
|
+-- project parent (configures p-pmd-plugin with "ruleset" dependency)
|
+-...- any other project that should be subject to m-pmd-d checks.

Best wishes,

Andreas

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



Re: AW: Dependency on pom-project not resolved in reactor on multi-module build

2010-12-17 Thread Florian Rampp
Hello Freddy,

Thanks for your quick reply. I should have mentioned that mvn installs solves 
the problem. So Maven resolves the dependency from the local repository. But 
this is just a workaround since I expect the dependency to be resolved from the 
reactor.

I think the order in which the modules are listed in the parent POM is not 
important. If I change the order this does not affect the behavior. Here is the 
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
mygroup
parent
1.0-SNAPSHOT
pom

A
B




The reactor build order is correct:
[INFO] Reactor build order: 
[INFO]   Unnamed - mygroup:parent:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:A:pom:1.0-SNAPSHOT
[INFO]   Unnamed - mygroup:B:jar:1.0-SNAPSHOT


It seems to be a bug or at least unexpected behavior in Maven.


Thanks a lot,


Florian



P.S: If this mail does not appear as response on the first thread, I am sorry. 
My mistake.

-- 
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0  Fax:  +49.89.45 23 47-70  

http://www.jambit.comwhere innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139

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



Re: Handling native dependencies via classifier(s)

2010-12-17 Thread Peter Bridge
Thanks for that. 

re: jar.  Is there an advantage building a jar for natives rather than a
zip?

re: single jar natives. makes sense, and saves a lot of manual config in
eclipse to add each native path later (I often need to switch
versions).  Although I wonder how this will affect my final packaging
when I want to build platform specific targets.

re: source&java docs.  It sounds like an all or nothing approach, I was
trying to find a way to only get the sources and javadocs for a couple
of my dependencies.

re: launch config.  Does maven create these for you?

does anyone know if maven 3 is going to address the deficiency with
native lib handling?

Thanks in advance. Peter Bridge


On 2010-12-14 14:45, Niels B Nielsen wrote:
> Well, I can tell you how I deal with it..
>
> I have all editions of our native libraries bundled inside a single jar file, 
> I created.
> ./win32/libsomething.dll
> ./win64/libsomething.dll
> ./unix/x32/something.so
> etc
>
> and unpacks that into lib (similar to what you did).
> During test and execution we navigate the right structure and set 
> java.library.path.
>
> the eclipse plugin surely has some shortcomings, especially in the native 
> ares.
> When setting up for eclipse, I use 'mvn eclipse:eclipse -DdownloadSources 
> -DdownloadJavadocs', and then just reference the library in the launch 
> configuration (java.library.path).
>
> Hope that helps.
>
> P.S. I would never add a dependency on source and javadocs etc, as the main 
> resolve would transitively include these in the classpath.
>
> Niels B Nielsen | Lead Engineer
> J.P. Morgan | IBTech Global Rates Derivatives
>
>
>
> -Original Message-
> From: Peter Bridge [mailto:peter_bri...@hotmail.com] 
> Sent: 14 December 2010 12:45
> To: users@maven.apache.org
> Subject: Handling native dependencies via classifier(s)
>
> My project depends on a 3rd party library for OpenGL + Java called JOGL
> (http://jogamp.org/jogl/www/)
>
> The library is currently not maven-ized and I'm trying to find the best
> way to achieve that.  My progress is documented at:
> http://jogamp.762907.n3.nabble.com/maven2-artifacts-tp1935908p1935908.html
>
> To get started I'm just manually putting the JOGL jars into a local
> repository.  Currently this is 4 jar files and each jar has a dependency
> on a couple of native libs (.dll .jnilib .so etc) which I'm zipping and
> then unpacking again for my project with:
>
>
> 
> maven-dependency-plugin
> 
> 
> unpack-dependencies
> generate-sources
> 
> unpack-dependencies
> 
> 
>
> ${basedir}/lib
> zip
> 
> 
> 
> 
>
>
> For each Jar I have a block like this:
>
> 
> com.jogamp.jogl
> jogl-all
> ${jogl.version}
> 
> 
> com.jogamp.jogl
> jogl-natives
> ${jogl.version}
> osx-universal
> zip
> 
>
> Now this is going to get ugly quite fast, ie once I add all 5 supported
> native platforms.  It also feels wrong, although I'm very new to
> maven2.  Somehow I expected that there would be a way to tie the native
> dependencies together with the jar in a more elegant way, maybe
> something like:
>
> 
> com.jogamp.jogl
> jogl-all
> ${jogl.version}
> sources
> javadoc
> osx-universal
> windows
> linux
> ...
> 
>
> I considered some kind of wrapper pom for each jar, but it also feels
> like a work-around.  ie the jar can't be used without the natives, so
> somehow they should be configured as a single artifact/entity/dependency.
>
> The next issue I trip over with native handling, is eclipse:eclipse. 
> Looking at the sources, it seems to take account of classifiers for
> 'sources' and 'javadoc' but I don't see anything for handling of native
> directories.  ie the EclipseClasspathWriter and AbstractIdeSupportMojo
> would need to output something like this:
>
>  path="M2_REPO/com/jogamp/jogl/jogl-all/2.0.251/jogl-all-2.0.251.jar">
> 
>  name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"
> value="client/lib"/>
> 
> 
>
>
> Now I'm thinking I can't be the first person to trip over this, but
> google isn't giving much help.  So I'm wondering how other people are
> dealing with this?
>
> Or is it just that maven currently just isn't designed to work with
> native dependencies?
>
>
>
>
>
>   

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

AW: Maven and environment Properties - Feature or bug ??

2010-12-17 Thread Hauschel Fred Robert
Rtfm ;-)

Thanks!!!
Fredy


-Ursprüngliche Nachricht-
Von: Benjamin Bentmann [mailto:benjamin.bentm...@udo.edu] 
Gesendet: Freitag, 17. Dezember 2010 12:18
An: Maven Users List
Betreff: Re: Maven and environment Properties - Feature or bug ??

Hauschel Fred Robert wrote:

> Or did I have problems understanding the environment variables? Is there
> a case sensitivity in general ??

http://maven.apache.org/pom.html#Properties


Benjamin

-
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 and environment Properties - Feature or bug ??

2010-12-17 Thread Benjamin Bentmann

Hauschel Fred Robert wrote:


Or did I have problems understanding the environment variables? Is there
a case sensitivity in general ??


http://maven.apache.org/pom.html#Properties


Benjamin

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



Re: ant task runs twice

2010-12-17 Thread Mate Varga
Never mind, I've spend half day with this and it was my fault. :(
(
mvn -Drelease-version=43 -P release,-local clean test deploy
)

test / deploy both run tests.

On Fri, Dec 17, 2010 at 10:35 AM, Mate Varga  wrote:

> It also seems that this has nothing to do with whatever lifecycle is the
> task bound to. Even if the POM looks like below, it runs twice:
>
>   
> org.apache.maven.plugins
> maven-antrun-plugin
> 1.6
> 
>   
> generate-wireformats
> validate
> 
>   
> 
>   
> 
> 
>   run
> 
>   
> ...
>
> On Fri, Dec 17, 2010 at 10:25 AM, Mate Varga  wrote:
>
>> Hello,
>>
>> I've got an Ant task which is bound to 'generate-resources' phase. If I
>> try to deploy the project, the task gets executed twice (before and after
>> the tests).
>> Any ideas about how could I prevent that?
>>
>> # 'release' and 'local' are my own profiles.
>>
>> (~/)\>mvn -P release,-local clean deploy -DskipTests=true
>>
>> [INFO]
>> [INFO]
>> 
>> [INFO] Building xxx 43
>> [INFO]
>> 
>> [INFO]
>> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ cache ---
>>  [INFO] Deleting /xxx
>> [INFO]
>> [INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
>> [INFO] Executing tasks
>>
>> main:
>>  [echo] compile classpath: ${maven.compile.classpath}
>> [generator] Writing wireformat config file with classloader URLs: /xxx
>> [generator] Writing wireformat config file with relative file URLs: /xxx
>>
>> [INFO] Executed tasks
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
>> cache ---
>> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>> [INFO] Copying 3 resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cache
>> ---
>> [INFO] Compiling 100 source files to /xxx
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.4.3:testResources
>> (default-testResources) @ cache ---
>> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>> [INFO] Copying 2 resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
>> cache ---
>> [INFO] Compiling 20 source files to /xxx
>> [INFO]
>> [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ cache ---
>> [INFO] Tests are skipped.
>> [INFO]
>> [INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
>> [INFO] Executing tasks
>>
>>
>> Thanks,
>> Mate
>>
>
>


activating a profile by two environment variables/values

2010-12-17 Thread Hauschel Fred Robert
Hi,
I have four profiles
prodDeps, prodResources, devDeps, devResources.

If I set ENVIRONMENT=devContainer -> prodDeps and devResources should be 
activated
If I set ENVIRONMENT=prodContainer -> prodDeps and prodResources should be 
activated
If I set ENVIRONMENT=eclipse -> devDeps and devResources should be activated

So I need something like this:



env.ENVIRONMENT
prodContainer,devContainer



Is there any possibility to do something like this?
The activation and the property cardinality in the xsd is 0..1 ;-(

Thanks Fredy



Re: ant task runs twice

2010-12-17 Thread Mate Varga
It also seems that this has nothing to do with whatever lifecycle is the
task bound to. Even if the POM looks like below, it runs twice:

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

  
generate-wireformats
validate

  

  


  run

  
...

On Fri, Dec 17, 2010 at 10:25 AM, Mate Varga  wrote:

> Hello,
>
> I've got an Ant task which is bound to 'generate-resources' phase. If I try
> to deploy the project, the task gets executed twice (before and after the
> tests).
> Any ideas about how could I prevent that?
>
> # 'release' and 'local' are my own profiles.
>
> (~/)\>mvn -P release,-local clean deploy -DskipTests=true
>
> [INFO]
> [INFO]
> 
> [INFO] Building xxx 43
> [INFO]
> 
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ cache ---
>  [INFO] Deleting /xxx
> [INFO]
> [INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
> [INFO] Executing tasks
>
> main:
>  [echo] compile classpath: ${maven.compile.classpath}
> [generator] Writing wireformat config file with classloader URLs: /xxx
> [generator] Writing wireformat config file with relative file URLs: /xxx
>
> [INFO] Executed tasks
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
> cache ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cache
> ---
> [INFO] Compiling 100 source files to /xxx
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources
> (default-testResources) @ cache ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
> cache ---
> [INFO] Compiling 20 source files to /xxx
> [INFO]
> [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ cache ---
> [INFO] Tests are skipped.
> [INFO]
> [INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
> [INFO] Executing tasks
>
>
> Thanks,
> Mate
>


ant task runs twice

2010-12-17 Thread Mate Varga
Hello,

I've got an Ant task which is bound to 'generate-resources' phase. If I try
to deploy the project, the task gets executed twice (before and after the
tests).
Any ideas about how could I prevent that?

# 'release' and 'local' are my own profiles.

(~/)\>mvn -P release,-local clean deploy -DskipTests=true

[INFO]
[INFO]

[INFO] Building xxx 43
[INFO]

[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ cache ---
[INFO] Deleting /xxx
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
[INFO] Executing tasks

main:
 [echo] compile classpath: ${maven.compile.classpath}
[generator] Writing wireformat config file with classloader URLs: /xxx
[generator] Writing wireformat config file with relative file URLs: /xxx

[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
cache ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cache ---
[INFO] Compiling 100 source files to /xxx
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ cache ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
cache ---
[INFO] Compiling 20 source files to /xxx
[INFO]
[INFO] --- maven-surefire-plugin:2.5:test (default-test) @ cache ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
[INFO] Executing tasks


Thanks,
Mate


AW: Dependency on pom-project not resolved in reactor on multi-module build

2010-12-17 Thread Hauschel Fred Robert
How is the reactor solving the order of your modules? 
How is the order in your parent pom?

Fredy

-Ursprüngliche Nachricht-
Von: Florian Rampp [mailto:florian.ra...@jambit.com] 
Gesendet: Freitag, 17. Dezember 2010 10:51
An: users@maven.apache.org
Betreff: Dependency on pom-project not resolved in reactor on multi-module build

Hello,

I am having the following issue with artifact resolution in the Maven reactor. 
My project layout resembles the following:

--> Parent POM
--> POM A (packaging: pom)
--> POM B (packaging: jar)

"POM A" and "POM B" have "Parent POM" as parent. "Parent POM" has "POM A" and 
"POM B" as submodules. All projects inherit their version from the parent POM.

"POM B" has a dependency on "POM A", which has dependencies on several other 
artifacts and is used according to section "3.6.1. Grouping dependencies" in 
http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html.

When I execute "mvn package" on the parent POM, the build results in the 
following error:
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.

Missing:
--
1) mygroup:A:pom:1.0-SNAPSHOT
  Path to dependency: 
1) mygroup:B:jar:1.0-SNAPSHOT
2) mygroup:A:pom:1.0-SNAPSHOT



Debug output reveals the following error: 

[DEBUG] WARNING: A dependency of the current project (or of one the plugins 
used in its build) was found in the reactor, 
but had not been built at the time it was requested. It will be resolved from 
the repository instead.

Current Project: Unnamed - mygroup:B:jar:1.0-SNAPSHOT
Requested Dependency: mygroup:A:pom:1.0-SNAPSHOT

NOTE: You may need to run this build to the 'compile' lifecycle phase, or 
farther, in order to build the dependency artifact.




So I am wondering if this is a bug. Dependencies on POM projects in the reactor 
should not be handled different than dependencies on JAR-projects.

The content of POM file for project A is:

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

parent
mygroup
1.0-SNAPSHOT

A
pom



The content of POM file for project B is:

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

parent
mygroup
1.0-SNAPSHOT

B
jar


${project.groupId}
A
${project.version}
pom






Thanks a lot,

Florian

-- 

Florian Rampp, Software Architect
Phone: +49.89.45 23 47-64



-- 
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0  Fax:  +49.89.45 23 47-70  

http://www.jambit.comwhere innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139

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



AW: Dependency on pom-project not resolved in reactor on multi-module build

2010-12-17 Thread Hauschel Fred Robert
What happens, if you use "mvn install"?

Fredy


-Ursprüngliche Nachricht-
Von: Florian Rampp [mailto:florian.ra...@jambit.com] 
Gesendet: Freitag, 17. Dezember 2010 10:51
An: users@maven.apache.org
Betreff: Dependency on pom-project not resolved in reactor on multi-module build

Hello,

I am having the following issue with artifact resolution in the Maven reactor. 
My project layout resembles the following:

--> Parent POM
--> POM A (packaging: pom)
--> POM B (packaging: jar)

"POM A" and "POM B" have "Parent POM" as parent. "Parent POM" has "POM A" and 
"POM B" as submodules. All projects inherit their version from the parent POM.

"POM B" has a dependency on "POM A", which has dependencies on several other 
artifacts and is used according to section "3.6.1. Grouping dependencies" in 
http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html.

When I execute "mvn package" on the parent POM, the build results in the 
following error:
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.

Missing:
--
1) mygroup:A:pom:1.0-SNAPSHOT
  Path to dependency: 
1) mygroup:B:jar:1.0-SNAPSHOT
2) mygroup:A:pom:1.0-SNAPSHOT



Debug output reveals the following error: 

[DEBUG] WARNING: A dependency of the current project (or of one the plugins 
used in its build) was found in the reactor, 
but had not been built at the time it was requested. It will be resolved from 
the repository instead.

Current Project: Unnamed - mygroup:B:jar:1.0-SNAPSHOT
Requested Dependency: mygroup:A:pom:1.0-SNAPSHOT

NOTE: You may need to run this build to the 'compile' lifecycle phase, or 
farther, in order to build the dependency artifact.




So I am wondering if this is a bug. Dependencies on POM projects in the reactor 
should not be handled different than dependencies on JAR-projects.

The content of POM file for project A is:

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

parent
mygroup
1.0-SNAPSHOT

A
pom



The content of POM file for project B is:

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

parent
mygroup
1.0-SNAPSHOT

B
jar


${project.groupId}
A
${project.version}
pom






Thanks a lot,

Florian

-- 

Florian Rampp, Software Architect
Phone: +49.89.45 23 47-64



-- 
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0  Fax:  +49.89.45 23 47-70  

http://www.jambit.comwhere innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139

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



Maven and environment Properties - Feature or bug ??

2010-12-17 Thread Hauschel Fred Robert
In windows:

set test=dev and using  ${env.test} in the pom for example in 
myArtifact _${env.test}
Results in: Building myArtifact_${env.test} 00.01-SNAPSHOT

set TEST=dev and using  ${env.TEST} in the pom for example in 
myArtifact _${env.TEST}
Results in: Building myArtifact_dev 00.01-SNAPSHOT

How cool is that?
For me that was a very expensive Feature!
Or did I have problems understanding the environment variables? Is there
a case sensitivity in general ??

Fredy

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



Dependency on pom-project not resolved in reactor on multi-module build

2010-12-17 Thread Florian Rampp
Hello,

I am having the following issue with artifact resolution in the Maven reactor. 
My project layout resembles the following:

--> Parent POM
--> POM A (packaging: pom)
--> POM B (packaging: jar)

"POM A" and "POM B" have "Parent POM" as parent. "Parent POM" has "POM A" and 
"POM B" as submodules. All projects inherit their version from the parent POM.

"POM B" has a dependency on "POM A", which has dependencies on several other 
artifacts and is used according to section "3.6.1. Grouping dependencies" in 
http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html.

When I execute "mvn package" on the parent POM, the build results in the 
following error:
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.

Missing:
--
1) mygroup:A:pom:1.0-SNAPSHOT
  Path to dependency: 
1) mygroup:B:jar:1.0-SNAPSHOT
2) mygroup:A:pom:1.0-SNAPSHOT



Debug output reveals the following error: 

[DEBUG] WARNING: A dependency of the current project (or of one the plugins 
used in its build) was found in the reactor, 
but had not been built at the time it was requested. It will be resolved from 
the repository instead.

Current Project: Unnamed - mygroup:B:jar:1.0-SNAPSHOT
Requested Dependency: mygroup:A:pom:1.0-SNAPSHOT

NOTE: You may need to run this build to the 'compile' lifecycle phase, or 
farther, in order to build the dependency artifact.




So I am wondering if this is a bug. Dependencies on POM projects in the reactor 
should not be handled different than dependencies on JAR-projects.

The content of POM file for project A is:

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

parent
mygroup
1.0-SNAPSHOT

A
pom



The content of POM file for project B is:

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

parent
mygroup
1.0-SNAPSHOT

B
jar


${project.groupId}
A
${project.version}
pom






Thanks a lot,

Florian

-- 

Florian Rampp, Software Architect
Phone: +49.89.45 23 47-64



-- 
jambit Software Development & Management GmbH
Nymphenburger Straße 13-15, D-80335 München
Phone: +49.89.45 23 47-0  Fax:  +49.89.45 23 47-70  

http://www.jambit.comwhere innovation works

Geschäftsführer: Peter F. Fellinger, Markus Hartinger
Sitz: München; Registergericht: München, HRB 129139

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



Re: Maven in 5 minutes doesn't work

2010-12-17 Thread Anders Hammar
Google is your friend:
http://maven.apache.org/guides/mini/guide-proxies.html

/Anders

On Fri, Dec 17, 2010 at 09:52, biswamohan.padhy wrote:

>
> I have attached the settings.xml
>
> I was getting following error while I was creating a project before I
> downloaded the plugin jars manually.
> Downloading:
>
> http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.jar
>
> [WARNING] Failed to retrieve plugin descriptor for
> org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.mav
> en.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not
> be resolved: Could not transfer artifact org.apach
> e.maven.plugins:maven-install-plugin:jar:2.3.1 from/to central
> (http://repo1.maven.org/maven2): Error transferring file: Conn
> ection timed out: connect
>
> And getting the following error I downloaded the plugin jars manually.
>
> Downloading:
> http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
> Downloading:
> http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
> [WARNING] Could not transfer metadata
> org.apache.maven.plugins/maven-metadata.xml from/to central
> (http://repo1.maven.org/mav
> en2): Error transferring file: Connection timed out: connect
>
> We are using an automatic proxy configuration URL to connect to internet in
> my company.
> Can you please let me know how to configure the settings.xml for automatic
> proxy configuration URL.
> http://maven.40175.n5.nabble.com/file/n3309107/settings.xml settings.xml
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Maven-in-5-minutes-doesn-t-work-tp510820p3309107.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: Maven Ant Demo

2010-12-17 Thread Dennis Lundberg
Ahh, now I get it.

You are running Maven 3.

I hadn't tested Ant based plugins in Maven 3 until now, and apparently it
doesn't work as it did in Maven 2.

On Thu, Dec 16, 2010 at 6:28 PM,  wrote:

> I'm just learning Maven and trying this demo:
> http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html.
> I built the files as described. The install step works. The run step
> gets this error: Could not find goal 'hello' in plugin
> org.myproject.plugins:hello-plugin:2.0 among available goals.
>
>
>
> C:\tmp\maven-user\maven-script-ant>mvn install
>
> [INFO] Scanning for projects...
>
> [INFO]
>
> [INFO]
> 
>
> [INFO] Building Hello Plugin 1.0-SNAPSHOT
>
> [INFO]
> 
>
> [INFO]
>
> [INFO] --- maven-plugin-plugin:2.3:descriptor (default-descriptor) @
> hello-plugin ---
>
> [WARNING] Goal prefix is: hello; Maven currently expects it to be hello
>
> [INFO] Using 3 extractors.
>
> [INFO] Applying extractor for language: java
>
> [INFO] Extractor for language: java found 0 mojo descriptors.
>
> [INFO] Applying extractor for language: bsh
>
> [INFO] Extractor for language: bsh found 0 mojo descriptors.
>
> [INFO] Applying extractor for language: ant
>
> [INFO] Extractor for language: ant found 0 mojo descriptors.
>
> [INFO]
>
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
> hello-plugin ---
>
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
>
> [INFO] skip non existing resourceDirectory
> C:\tmp\maven-user\maven-script-ant\src\main\resources
>
> [INFO]
>
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @
> hello-plugin ---
>
> [INFO] No sources to compile
>
> [INFO]
>
> [INFO] --- maven-resources-plugin:2.4.3:testResources
> (default-testResources) @ hello-plugin ---
>
> [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
> resources, i.e. build is platform dependent!
>
> [INFO] skip non existing resourceDirectory
> C:\tmp\maven-user\maven-script-ant\src\test\resources
>
> [INFO]
>
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile)
> @ hello-plugin ---
>
> [INFO] No sources to compile
>
> [INFO]
>
> [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ hello-plugin
> ---
>
> [INFO] No tests to run.
>
> [INFO]
>
> [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ hello-plugin ---
>
> [INFO] Building jar:
> C:\tmp\maven-user\maven-script-ant\target\hello-plugin-1.0-SNAPSHOT.jar
>
> [INFO]
>
> [INFO] --- maven-plugin-plugin:2.3:addPluginArtifactMetadata
> (default-addPluginArtifactMetadata) @ hello-plugin ---
>
> [INFO]
>
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @
> hello-plugin ---
>
> [INFO] Installing
> C:\tmp\maven-user\maven-script-ant\target\hello-plugin-1.0-SNAPSHOT.jar
> to C:\Documents and Settings\oldmad\.m2\repository\org\mypro
>
> ject\plugins\hello-plugin\1.0-SNAPSHOT\hello-plugin-1.0-SNAPSHOT.jar
>
> [INFO] Installing C:\tmp\maven-user\maven-script-ant\pom.xml to
> C:\Documents and
> Settings\oldmad\.m2\repository\org\myproject\plugins\hello-plugin\1.0
>
> -SNAPSHOT\hello-plugin-1.0-SNAPSHOT.pom
>
> [INFO]
> 
>
> [INFO] BUILD SUCCESS
>
> [INFO]
> 
>
> [INFO] Total time: 9.860s
>
> [INFO] Finished at: Thu Dec 16 12:17:42 EST 2010
>
> [INFO] Final Memory: 4M/7M
>
> [INFO]
> 
>
>
>
> C:\tmp\maven-user\maven-script-ant>mvn
> org.myproject.plugins:hello-plugin:hello
>
> [INFO] Scanning for projects...
>
> [INFO]
> 
>
> [INFO] BUILD FAILURE
>
> [INFO]
> 
>
> [INFO] Total time: 0.250s
>
> [INFO] Finished at: Thu Dec 16 12:18:05 EST 2010
>
> [INFO] Final Memory: 1M/3M
>
> [INFO]
> 
>
> [ERROR] Could not find goal 'hello' in plugin
> org.myproject.plugins:hello-plugin:2.0 among available goals -> [Help 1]
>
> [ERROR]
>
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
>
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>
> [ERROR]
>
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
>
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException
>
> C:\tmp\maven-user\maven-script-ant>mvn help:describe -Dplugin=hello
>
>
>
> The help link is not helpful.
>
>
>
> If I ask the help system to describe the hello plugin, it says that it
> is there, but if I use the fully qualified name it goes back to the

Re: Maven in 5 minutes doesn't work

2010-12-17 Thread biswamohan.padhy

I have attached the settings.xml

I was getting following error while I was creating a project before I
downloaded the plugin jars manually.
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.jar

[WARNING] Failed to retrieve plugin descriptor for
org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.mav
en.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not
be resolved: Could not transfer artifact org.apach
e.maven.plugins:maven-install-plugin:jar:2.3.1 from/to central
(http://repo1.maven.org/maven2): Error transferring file: Conn
ection timed out: connect

And getting the following error I downloaded the plugin jars manually.

Downloading:
http://repo1.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[WARNING] Could not transfer metadata
org.apache.maven.plugins/maven-metadata.xml from/to central
(http://repo1.maven.org/mav
en2): Error transferring file: Connection timed out: connect

We are using an automatic proxy configuration URL to connect to internet in
my company.
Can you please let me know how to configure the settings.xml for automatic
proxy configuration URL.
http://maven.40175.n5.nabble.com/file/n3309107/settings.xml settings.xml 


-- 
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-in-5-minutes-doesn-t-work-tp510820p3309107.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