Re: mojo help

2010-05-24 Thread Lachlan Deck
On 25/05/2010, at 4:11 PM, Stephen Connolly wrote:

> Dan Tran is pretty darn familiar with mojo development (#2 on
> http://www.ohloh.net/p/mojo/contributors)

Apologies Dan :) I just wasn't getting it.

> You should start by copying wagon:download and tweak that from there

I'm still wondering why various @parameters weren't being initialised - but 
thanks. I'll start from there.

with regards,
--

Lachlan Deck


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



Re: mojo help

2010-05-24 Thread Jörg Schaible
Lachlan Deck wrote:

> I'm not sure I understand your question? My dependencies already contains
> wagon-maven-plugin

which is a very bad idea unless you intend to run in Maven 3 only. Due to 
classloader constraints in M2 you should never use a different plugin as 
dependency.

- Jörg


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



Re: mojo help

2010-05-24 Thread Stephen Connolly
Dan Tran is pretty darn familiar with mojo development (#2 on
http://www.ohloh.net/p/mojo/contributors)

You should start by copying wagon:download and tweak that from there

-Stephen

On 25 May 2010 05:40, Lachlan Deck  wrote:

> Anyone more familiar with mojo development able to answer?
>
> Or am I on the wrong list?
>
> On 25/05/2010, at 2:00 PM, Dan Tran wrote:
>
> > I would suggest you cut and paste wagon:download code then
>
> That doesn't help answer my questions below.
>
> On Mon, May 24, 2010 at 6:54 PM, Lachlan Deck 
> wrote:
> > Hi there,
> >
> > I'm trying to get a very simple utility working which downloads a zip
> file for subsequent use.
> >
> > I can successfully do this via an execution in the pom[1] but can't seem
> to get it working programatically (which I need to be able to run the mojo
> independently).
> >
> > In order to create a stand alone utility that could run outside a project
> (mvn some.groupId:project-id:downloadzip ...) I seem to be missing
> something. i.e., when I've got the mojo with @requiresProject false  the
> 'settings' and 'wagonManager' in AbstractMojo aren't initialised.
> >
> > Thus when I call createWagon(serverId, url) I get a NullPointerException:
> > org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon
> instance for scp://foo.bar.net/
> >at
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
> ><...>
> > Caused by: java.lang.NullPointerException
> >at
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
> >at
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
> >at
> org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
> >at
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
> >... 21 more
> >
> > Essentially, how do I utilise the scp wagon programatically?
> > - if the mojo is running outside a project, how do @component annotated
> fields (like Settings or WagonManager) get populated?
> > etc
> >
> > Thanks!
> >
> > with regards,
> > --
> >
> > Lachlan Deck
> >
> > [1]
> > 
> >...
> >
> >
> >org.apache.maven.wagon
> >wagon-ssh
> >1.0-beta-6
> >
> >
> >
> >...
> >
> >org.codehaus.mojo
> >wagon-maven-download
> >1.0-beta-3
> >
> >
> >foo
> >verify
> >
> >download
> >
> >
> >bar
> >scp://bar.foo.net/
> 
> >
>  /some/dir/
> >
>  myzip.zip
> >/tmp
> >
> >
> >
> >
> >
> > 
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Why is maven trying to download installed jars?

2010-05-24 Thread Anders Hammar
Please remember that this generated minimal pom just holds the required GAV
info. There is no info about dependencies, which makes it...well, minimal.
Maven will then not be able to help you with transitive deps and dependency
management.

So, you should always create a correct pom (including dependency info) IMO.

/Anders

On Mon, May 24, 2010 at 23:13, Wayne Fay  wrote:

> > So is this flag (generatePom) not default because of a bug or should I
> just
> > add it every time I add file to the repository?
>
> It is the default in sufficiently recent versions of the install
> plugin. To be safe, just add the -D flag when you install artifacts
> locally.
>
> Wayne
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: mojo help

2010-05-24 Thread Lachlan Deck
Anyone more familiar with mojo development able to answer?

Or am I on the wrong list?

On 25/05/2010, at 2:00 PM, Dan Tran wrote:

> I would suggest you cut and paste wagon:download code then

That doesn't help answer my questions below.

On Mon, May 24, 2010 at 6:54 PM, Lachlan Deck  wrote:
> Hi there,
> 
> I'm trying to get a very simple utility working which downloads a zip file 
> for subsequent use.
> 
> I can successfully do this via an execution in the pom[1] but can't seem to 
> get it working programatically (which I need to be able to run the mojo 
> independently).
> 
> In order to create a stand alone utility that could run outside a project 
> (mvn some.groupId:project-id:downloadzip ...) I seem to be missing something. 
> i.e., when I've got the mojo with @requiresProject false  the 'settings' and 
> 'wagonManager' in AbstractMojo aren't initialised.
> 
> Thus when I call createWagon(serverId, url) I get a NullPointerException:
> org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon 
> instance for scp://foo.bar.net/
>at 
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
><...>
> Caused by: java.lang.NullPointerException
>at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
>at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
>at 
> org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
>at 
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
>... 21 more
> 
> Essentially, how do I utilise the scp wagon programatically?
> - if the mojo is running outside a project, how do @component annotated 
> fields (like Settings or WagonManager) get populated?
> etc
> 
> Thanks!
> 
> with regards,
> --
> 
> Lachlan Deck
> 
> [1]
> 
>...
>
>
>org.apache.maven.wagon
>wagon-ssh
>1.0-beta-6
>
>
>
>...
>
>org.codehaus.mojo
>wagon-maven-download
>1.0-beta-3
>
>
>foo
>verify
>
>download
>
>
>bar
>scp://bar.foo.net/
>/some/dir/
>myzip.zip
>/tmp
>
>
>
>
>
> 


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



Re: mojo help

2010-05-24 Thread Dan Tran
I would suggest you cut and paste wagon:download code then

-Dan

On Mon, May 24, 2010 at 8:55 PM, Lachlan Deck  wrote:
> On 25/05/2010, at 1:46 PM, Dan Tran wrote:
>
>> ah sorry,
>>
>> from wagon-maven-plugin, wagon:download can run outside of maven project
>
> Yep - but I don't need that. To reiterate: I'm creating my own mojo which 
> will do something similar to start with but will do other things as well ... 
> so my question remains: how can this be done programatically? i.e., in 'java' 
> not via the pom.xml?
>
>>
>> -Dan
>>
>> On Mon, May 24, 2010 at 8:28 PM, Lachlan Deck  wrote:
>>> I'm not sure I understand your question? My dependencies already contains 
>>> wagon-maven-plugin but what java classes are you particularly referring to 
>>> in order to make this work programatically (rather than via a pom 
>>> execution)?
>>>
>>> i.e., to be clearer: I'm writing a mojo, or trying to, that can execute 
>>> with @requiresProject false etc
>>>
>>> On 25/05/2010, at 12:46 PM, Dan Tran wrote:
>>>
 is there any reason, you are not using wagon-maven-plugin at MOJO?

 -Dan

 On Mon, May 24, 2010 at 6:54 PM, Lachlan Deck  
 wrote:
> Hi there,
>
> I'm trying to get a very simple utility working which downloads a zip 
> file for subsequent use.
>
> I can successfully do this via an execution in the pom[1] but can't seem 
> to get it working programatically (which I need to be able to run the 
> mojo independently).
>
> In order to create a stand alone utility that could run outside a project 
> (mvn some.groupId:project-id:downloadzip ...) I seem to be missing 
> something. i.e., when I've got the mojo with @requiresProject false  the 
> 'settings' and 'wagonManager' in AbstractMojo aren't initialised.
>
> Thus when I call createWagon(serverId, url) I get a NullPointerException:
> org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon 
> instance for scp://foo.bar.net/
>        at 
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
>        <...>
> Caused by: java.lang.NullPointerException
>        at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
>        at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
>        at 
> org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
>        at 
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
>        ... 21 more
>
> Essentially, how do I utilise the scp wagon programatically?
> - if the mojo is running outside a project, how do @component annotated 
> fields (like Settings or WagonManager) get populated?
> etc
>
> Thanks!
>
> with regards,
> --
>
> Lachlan Deck
>
> [1]
> 
>        ...
>        
>                
>                        org.apache.maven.wagon
>                        wagon-ssh
>                        1.0-beta-6
>                
>        
>        
>                ...
>                
>                        org.codehaus.mojo
>                        wagon-maven-download
>                        1.0-beta-3
>                        
>                                
>                                        foo
>                                        verify
>                                        
>                                                download
>                                        
>                                        
>                                                bar
>                                                
> scp://bar.foo.net/
>                                                
> /some/dir/
>                                                
> myzip.zip
>                                                /tmp
>                                        
>                                
>                        
>                
>        
> 
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>
>>>
>>> with regards,
>>> --
>>>
>>> Lachlan Deck
>>>
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>
> with regards,
> --
>
> Lachlan Deck
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

-

Re: mojo help

2010-05-24 Thread Lachlan Deck
On 25/05/2010, at 1:46 PM, Dan Tran wrote:

> ah sorry,
> 
> from wagon-maven-plugin, wagon:download can run outside of maven project

Yep - but I don't need that. To reiterate: I'm creating my own mojo which will 
do something similar to start with but will do other things as well ... so my 
question remains: how can this be done programatically? i.e., in 'java' not via 
the pom.xml?

> 
> -Dan
> 
> On Mon, May 24, 2010 at 8:28 PM, Lachlan Deck  wrote:
>> I'm not sure I understand your question? My dependencies already contains 
>> wagon-maven-plugin but what java classes are you particularly referring to 
>> in order to make this work programatically (rather than via a pom execution)?
>> 
>> i.e., to be clearer: I'm writing a mojo, or trying to, that can execute with 
>> @requiresProject false etc
>> 
>> On 25/05/2010, at 12:46 PM, Dan Tran wrote:
>> 
>>> is there any reason, you are not using wagon-maven-plugin at MOJO?
>>> 
>>> -Dan
>>> 
>>> On Mon, May 24, 2010 at 6:54 PM, Lachlan Deck  
>>> wrote:
 Hi there,
 
 I'm trying to get a very simple utility working which downloads a zip file 
 for subsequent use.
 
 I can successfully do this via an execution in the pom[1] but can't seem 
 to get it working programatically (which I need to be able to run the mojo 
 independently).
 
 In order to create a stand alone utility that could run outside a project 
 (mvn some.groupId:project-id:downloadzip ...) I seem to be missing 
 something. i.e., when I've got the mojo with @requiresProject false  the 
 'settings' and 'wagonManager' in AbstractMojo aren't initialised.
 
 Thus when I call createWagon(serverId, url) I get a NullPointerException:
 org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon 
 instance for scp://foo.bar.net/
at 
 org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
<...>
 Caused by: java.lang.NullPointerException
at 
 org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
at 
 org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
at 
 org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
at 
 org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
... 21 more
 
 Essentially, how do I utilise the scp wagon programatically?
 - if the mojo is running outside a project, how do @component annotated 
 fields (like Settings or WagonManager) get populated?
 etc
 
 Thanks!
 
 with regards,
 --
 
 Lachlan Deck
 
 [1]
 
...


org.apache.maven.wagon
wagon-ssh
1.0-beta-6



...

org.codehaus.mojo
wagon-maven-download
1.0-beta-3


foo
verify

download


bar

 scp://bar.foo.net/

 /some/dir/

 myzip.zip
/tmp





 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 
 
>> 
>> with regards,
>> --
>> 
>> Lachlan Deck
>> 
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>> 
>> 

with regards,
--

Lachlan Deck




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



Re: mojo help

2010-05-24 Thread Dan Tran
ah sorry,

from wagon-maven-plugin, wagon:download can run outside of maven project

-Dan

On Mon, May 24, 2010 at 8:28 PM, Lachlan Deck  wrote:
> I'm not sure I understand your question? My dependencies already contains 
> wagon-maven-plugin but what java classes are you particularly referring to in 
> order to make this work programatically (rather than via a pom execution)?
>
> i.e., to be clearer: I'm writing a mojo, or trying to, that can execute with 
> @requiresProject false etc
>
> On 25/05/2010, at 12:46 PM, Dan Tran wrote:
>
>> is there any reason, you are not using wagon-maven-plugin at MOJO?
>>
>> -Dan
>>
>> On Mon, May 24, 2010 at 6:54 PM, Lachlan Deck  wrote:
>>> Hi there,
>>>
>>> I'm trying to get a very simple utility working which downloads a zip file 
>>> for subsequent use.
>>>
>>> I can successfully do this via an execution in the pom[1] but can't seem to 
>>> get it working programatically (which I need to be able to run the mojo 
>>> independently).
>>>
>>> In order to create a stand alone utility that could run outside a project 
>>> (mvn some.groupId:project-id:downloadzip ...) I seem to be missing 
>>> something. i.e., when I've got the mojo with @requiresProject false  the 
>>> 'settings' and 'wagonManager' in AbstractMojo aren't initialised.
>>>
>>> Thus when I call createWagon(serverId, url) I get a NullPointerException:
>>> org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon 
>>> instance for scp://foo.bar.net/
>>>        at 
>>> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
>>>        <...>
>>> Caused by: java.lang.NullPointerException
>>>        at 
>>> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
>>>        at 
>>> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
>>>        at 
>>> org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
>>>        at 
>>> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
>>>        ... 21 more
>>>
>>> Essentially, how do I utilise the scp wagon programatically?
>>> - if the mojo is running outside a project, how do @component annotated 
>>> fields (like Settings or WagonManager) get populated?
>>> etc
>>>
>>> Thanks!
>>>
>>> with regards,
>>> --
>>>
>>> Lachlan Deck
>>>
>>> [1]
>>> 
>>>        ...
>>>        
>>>                
>>>                        org.apache.maven.wagon
>>>                        wagon-ssh
>>>                        1.0-beta-6
>>>                
>>>        
>>>        
>>>                ...
>>>                
>>>                        org.codehaus.mojo
>>>                        wagon-maven-download
>>>                        1.0-beta-3
>>>                        
>>>                                
>>>                                        foo
>>>                                        verify
>>>                                        
>>>                                                download
>>>                                        
>>>                                        
>>>                                                bar
>>>                                                scp://bar.foo.net/
>>>                                                /some/dir/
>>>                                                
>>> myzip.zip
>>>                                                /tmp
>>>                                        
>>>                                
>>>                        
>>>                
>>>        
>>> 
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>
> with regards,
> --
>
> Lachlan Deck
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: mojo help

2010-05-24 Thread Lachlan Deck
I'm not sure I understand your question? My dependencies already contains 
wagon-maven-plugin but what java classes are you particularly referring to in 
order to make this work programatically (rather than via a pom execution)?

i.e., to be clearer: I'm writing a mojo, or trying to, that can execute with 
@requiresProject false etc

On 25/05/2010, at 12:46 PM, Dan Tran wrote:

> is there any reason, you are not using wagon-maven-plugin at MOJO?
> 
> -Dan
> 
> On Mon, May 24, 2010 at 6:54 PM, Lachlan Deck  wrote:
>> Hi there,
>> 
>> I'm trying to get a very simple utility working which downloads a zip file 
>> for subsequent use.
>> 
>> I can successfully do this via an execution in the pom[1] but can't seem to 
>> get it working programatically (which I need to be able to run the mojo 
>> independently).
>> 
>> In order to create a stand alone utility that could run outside a project 
>> (mvn some.groupId:project-id:downloadzip ...) I seem to be missing 
>> something. i.e., when I've got the mojo with @requiresProject false  the 
>> 'settings' and 'wagonManager' in AbstractMojo aren't initialised.
>> 
>> Thus when I call createWagon(serverId, url) I get a NullPointerException:
>> org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon 
>> instance for scp://foo.bar.net/
>>at 
>> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
>><...>
>> Caused by: java.lang.NullPointerException
>>at 
>> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
>>at 
>> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
>>at 
>> org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
>>at 
>> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
>>... 21 more
>> 
>> Essentially, how do I utilise the scp wagon programatically?
>> - if the mojo is running outside a project, how do @component annotated 
>> fields (like Settings or WagonManager) get populated?
>> etc
>> 
>> Thanks!
>> 
>> with regards,
>> --
>> 
>> Lachlan Deck
>> 
>> [1]
>> 
>>...
>>
>>
>>org.apache.maven.wagon
>>wagon-ssh
>>1.0-beta-6
>>
>>
>>
>>...
>>
>>org.codehaus.mojo
>>wagon-maven-download
>>1.0-beta-3
>>
>>
>>foo
>>verify
>>
>>download
>>
>>
>>bar
>>scp://bar.foo.net/
>>/some/dir/
>>myzip.zip
>>/tmp
>>
>>
>>
>>
>>
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>> 
>> 

with regards,
--

Lachlan Deck




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



Re: mojo help

2010-05-24 Thread Dan Tran
is there any reason, you are not using wagon-maven-plugin at MOJO?

-Dan

On Mon, May 24, 2010 at 6:54 PM, Lachlan Deck  wrote:
> Hi there,
>
> I'm trying to get a very simple utility working which downloads a zip file 
> for subsequent use.
>
> I can successfully do this via an execution in the pom[1] but can't seem to 
> get it working programatically (which I need to be able to run the mojo 
> independently).
>
> In order to create a stand alone utility that could run outside a project 
> (mvn some.groupId:project-id:downloadzip ...) I seem to be missing something. 
> i.e., when I've got the mojo with @requiresProject false  the 'settings' and 
> 'wagonManager' in AbstractMojo aren't initialised.
>
> Thus when I call createWagon(serverId, url) I get a NullPointerException:
> org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon 
> instance for scp://foo.bar.net/
>        at 
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
>        <...>
> Caused by: java.lang.NullPointerException
>        at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
>        at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
>        at 
> org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
>        at 
> org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
>        ... 21 more
>
> Essentially, how do I utilise the scp wagon programatically?
> - if the mojo is running outside a project, how do @component annotated 
> fields (like Settings or WagonManager) get populated?
> etc
>
> Thanks!
>
> with regards,
> --
>
> Lachlan Deck
>
> [1]
> 
>        ...
>        
>                
>                        org.apache.maven.wagon
>                        wagon-ssh
>                        1.0-beta-6
>                
>        
>        
>                ...
>                
>                        org.codehaus.mojo
>                        wagon-maven-download
>                        1.0-beta-3
>                        
>                                
>                                        foo
>                                        verify
>                                        
>                                                download
>                                        
>                                        
>                                                bar
>                                                scp://bar.foo.net/
>                                                /some/dir/
>                                                myzip.zip
>                                                /tmp
>                                        
>                                
>                        
>                
>        
> 
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


mojo help

2010-05-24 Thread Lachlan Deck
Hi there,

I'm trying to get a very simple utility working which downloads a zip file for 
subsequent use.

I can successfully do this via an execution in the pom[1] but can't seem to get 
it working programatically (which I need to be able to run the mojo 
independently).

In order to create a stand alone utility that could run outside a project (mvn 
some.groupId:project-id:downloadzip ...) I seem to be missing something. i.e., 
when I've got the mojo with @requiresProject false  the 'settings' and 
'wagonManager' in AbstractMojo aren't initialised. 

Thus when I call createWagon(serverId, url) I get a NullPointerException:
org.apache.maven.plugin.MojoExecutionException: Unable to create a Wagon 
instance for scp://foo.bar.net/
at 
org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:83)
<...>
Caused by: java.lang.NullPointerException
at 
org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:143)
at 
org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:128)
at 
org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(AbstractWagonMojo:53)
at 
org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo:79)
... 21 more

Essentially, how do I utilise the scp wagon programatically?
- if the mojo is running outside a project, how do @component annotated fields 
(like Settings or WagonManager) get populated?
etc

Thanks!

with regards,
--

Lachlan Deck

[1] 

...


org.apache.maven.wagon
wagon-ssh
1.0-beta-6



...

org.codehaus.mojo
wagon-maven-download
1.0-beta-3


foo
verify

download


bar
scp://bar.foo.net/
/some/dir/
myzip.zip
/tmp








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



Help with Multi Module JavaDocs

2010-05-24 Thread Andrew Hughes
Hi All,

I am having trouble with javadoc's on my multi module projects. Creation of
the javadoc's takes forever... when I run 'clean install site' I see the
following 'javadoc has not be previously called' log's for every module...

[INFO] 
[INFO] Building module-d
[INFO] 
truncated other reports output...
[INFO] Generating "JavaDocs" report.
[WARNING] Source files encoding has not been set, using platform
encoding Cp1252, i.e. build is platform dependent!
[ERROR] Error fetching link:
http://java.sun.com/javase/6/docs/api/package-list. Ignored it.
[INFO] The goal
'org.apache.maven.plugins:maven-javadoc-plugin:2.6.1:javadoc' has not
be previously called for the project:
'com.acme.project:module-a:jar:0.0.1-SNAPSHOT'. Trying to invoke it...
[INFO] The goal
'org.apache.maven.plugins:maven-javadoc-plugin:2.6.1:javadoc' has not
be previously called for the project:
'com.acme.project:module-b:jar:0.0.1-SNAPSHOT'. Trying to invoke it...
[INFO] The goal
'org.apache.maven.plugins:maven-javadoc-plugin:2.6.1:javadoc' has not
be previously called for the project:
'com.acme.project:module-c:jar:0.0.1-SNAPSHOT'. Trying to invoke it...
[INFO] The goal
'org.apache.maven.plugins:maven-javadoc-plugin:2.6.1:javadoc' has not
be previously called for the project:
'com.acme.project:module-d:jar:0.0.1-SNAPSHOT'. Trying to invoke it...
[INFO] The goal
'org.apache.maven.plugins:maven-javadoc-plugin:2.6.1:javadoc' has not
be previously called for the project:
'com.acme.project:module-e:jar:0.0.1-SNAPSHOT'. Trying to invoke it...
[INFO] The goal
'org.apache.maven.plugins:maven-javadoc-plugin:2.6.1:javadoc' has not
be previously called for the project:
'com.acme.project:module-f:jar:0.0.1-SNAPSHOT'. Trying to invoke it...

If I have 6 modules [a..f] as above, then javadoc is run 6x6=36 times
in total. Build times are oh so slow when building the site...

My parent pom config with maven 2.2.1 and javadoc v2.5 is as follows...




maven-javadoc-plugin

${maven.compiler.source}
512m

true
gr.spinellis.umlgraph.doclet.UmlGraphDoc

gr.spinellis

UmlGraph
4.6
 
 





Any idea what I am doing wrong here?

CHEERS :)


Re: Unit tests depending on manifest

2010-05-24 Thread Justin Edelson
On 5/24/10 5:54 PM, Ernst de Haan wrote:
>> better off using maven-failsafe-plugin for that
> 
> 
> How do I know for sure "verify" is using my JAR?
You could inspect the classloader. Something like:
   URLClassLoader ucl = (URLClassLoader) getClass().getClassLoader();
   System.out.println(Arrays.asList(ucl.getURLs()));




> 
> I tried the failsafe plugin, but it still /appears/ to be using the classes, 
> not the JAR, even from my new LibraryIT.java integration test. It does 
> execute, but the test fails.
> 
> Here's my POM for the "base" module:
> http://github.com/znerd/logdoc/blob/master/base/pom.xml
> 
> And here's the one for the "base-test" module:
> http://github.com/znerd/logdoc/blob/master/base-test/pom.xml
> 
> Can I debug the "failsafe" plugin?
Do you want to debug the plugin or the test? If the former, use
mvnDebug. If the latter, invoke Maven with -Dmaven.failsafe.debug=true

HTH,
Justin

> 
> 
> Ernst
> -
> 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: Unit tests depending on manifest

2010-05-24 Thread Stephen Connolly
failsafe is surefire just bound to theintegration-test phase.

changing surefire to be bound to the integration-test phase can cause subtle
issues as you use more plugins.

we should be able to convince failsafe to use the jars if they are
available... can you file an enhancement request in JIRA?

-Stephen

On 24 May 2010 22:54, Ernst de Haan  wrote:

> > better off using maven-failsafe-plugin for that
>
>
> How do I know for sure "verify" is using my JAR?
>
> I tried the failsafe plugin, but it still /appears/ to be using the
> classes, not the JAR, even from my new LibraryIT.java integration test. It
> does execute, but the test fails.
>
> Here's my POM for the "base" module:
> http://github.com/znerd/logdoc/blob/master/base/pom.xml
>
> And here's the one for the "base-test" module:
> http://github.com/znerd/logdoc/blob/master/base-test/pom.xml
>
> Can I debug the "failsafe" plugin?
>
>
> Ernst
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
> better off using maven-failsafe-plugin for that


How do I know for sure "verify" is using my JAR?

I tried the failsafe plugin, but it still /appears/ to be using the classes, 
not the JAR, even from my new LibraryIT.java integration test. It does execute, 
but the test fails.

Here's my POM for the "base" module:
http://github.com/znerd/logdoc/blob/master/base/pom.xml

And here's the one for the "base-test" module:
http://github.com/znerd/logdoc/blob/master/base-test/pom.xml

Can I debug the "failsafe" plugin?


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



Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
> better off using maven-failsafe-plugin for that

Stephen, thanks for the pointer. Will give that a try.

I was getting nowhere (yet) with all sorts of variants of the snippet Kristian 
sent. An alternative route is welcomed :)

/me struggles on...

Cheers,


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



Re: Why is maven trying to download installed jars?

2010-05-24 Thread Wayne Fay
> So is this flag (generatePom) not default because of a bug or should I just
> add it every time I add file to the repository?

It is the default in sufficiently recent versions of the install
plugin. To be safe, just add the -D flag when you install artifacts
locally.

Wayne

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



Re: Unit tests depending on manifest

2010-05-24 Thread Stephen Connolly
better off using maven-failsafe-plugin for that

On 24 May 2010 20:00, kristian  wrote:

> run your tests after the package phase, i.e.
>
>  
>org.apache.maven.plugins
>maven-surefire-plugin
>2.5
>
>  
>integration-test
>
>  test
>
>
>
>  ${basedir}/src/test2/java
>
>  
>
>  
>
> I have not tested it but it should work
>
> regards,
> Kristian
>
> On Mon, May 24, 2010 at 11:23 PM, Ernst de Haan 
> wrote:
> >> Instead of running that test in this module's build, add another
> >> module alongside it that depends on this artifact, and run this test
> >> there. It will bring in the jar which, as you said, has the manifest
> >> in it. You will need a parent pom as well over both modules, and
> >> always build your project from the parent.
> >
> > Another question: How do I make the test-module use the *JAR* instead of
> just the classes?
> >
> > Here's what I have done:
> > - create a separate "base-test" module with a separate POM that depends
> on the "base" module
> > - move all unit tests to the "base-test" module
> > - run "mvn clean" and then "mvn test"
> >
> > What happens is:
> > - the classes get compiled for the "base" module (but no JAR is
> generated)
> > - the unit tests in "base-test" are executed, using the classes (not the
> JAR)
> > - the tests (obviously) fail
> >
> > So I try forcing the JAR to be created, using "mvn install", which works.
> But still the unit tests fail, because they appear to use the classes
> instead of the JAR...
> >
> > Any hints to this next piece of the puzzle?
> >
> >
> > Ernst
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>
>
>
> --
> Kristian Meier + Saumya Sharma + Sanuka Meier
> Vadakkethu House,
> Edayanmula West PO - 689532,
> Pathanamthitta District, Kerala, INDIA
>
> tel: +91 468 2319577
>
> protect your privacy while searching the net: www.ixquick.com
>
> _=_
>   q(-_-)p
>'_) (_`
>/__/  \
> _(<_   / )_
>  (__\_\_|_/__)
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Why is maven trying to download installed jars?

2010-05-24 Thread D D
Thank you Wendy! It worked like a charm.

So is this flag (generatePom) not default because of a bug or should I just
add it every time I add file to the repository?

Dave

On Mon, May 24, 2010 at 3:23 PM, Wendy Smoak  wrote:

> Try re-installing them with -DgeneratePom=true (which should really be
> the default...)
>


Re: Why is maven trying to download installed jars?

2010-05-24 Thread Wendy Smoak
On Mon, May 24, 2010 at 4:18 PM, D D  wrote:
> Could someone help me on this annoying issue? I added several jars that do
> not exist in any known Maven repositories. Now every time I run maven is
> attempts to load them from repo1.
>
> Example message is:
> Unable to find resource 'com.xxx.yyy:aaa:pom:vvv' in repository central (
 ^^^
It's not trying to download the jars, it's trying to download the poms.

Try re-installing them with -DgeneratePom=true (which should really be
the default...)

-- 
Wendy

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



Why is maven trying to download installed jars?

2010-05-24 Thread D D
Hello,

Could someone help me on this annoying issue? I added several jars that do
not exist in any known Maven repositories. Now every time I run maven is
attempts to load them from repo1.

Example message is:
Unable to find resource 'com.xxx.yyy:aaa:pom:vvv' in repository central (
http://repo1.maven.org/maven2)

How do I stop it from looking up those jars? I will have somewhere in the
vicinity of 20-30 jars like that referenced by 50+ projects.

Thanks,
Dave


Re: Best Practices Question: Teams working on different modules / SCM, etc

2010-05-24 Thread Morten Kjetland
Hi,

The situation you describe look very similar to ours.
We use the maven release plugin.

but we had problems with versions:

warA has dep to jarB version 1 which has dep to jarC version1
warA  has also dep to JarD version 1 which has dep to jarC version 2.

when warA is build, only version 1 of jarC is included.
This causes JarD to fail runtime.

To solve this, I created a plugin called deptools (
http://github.com/mbknor/deptools) which would fail the building og warA
telling you that jarC version 2 was needed but not included.

maybe this plugin, can help you too.

-Morten

On Sun, May 23, 2010 at 3:36 AM, Wayne Fay  wrote:

> > new jarB snapshot which causes things to break. How is that kind of thing
> > best avoided (other than forcing down locked version numbers?)
>
> COMMUNICATION is the key. As a general practice, don't check in things
> that will break other people's stuff -- and if you must, do it in a
> branch, then let people know it is coming so they can plan to fix
> their stuff. If you are agreeing on interfaces (contracts) and
> building code that utilizes the interfaces, things should generally
> just work so long as you don't need to break those contracts.
>
> Continuous integration helps catch a lot of this, too.
>
> Wayne
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Unit tests depending on manifest

2010-05-24 Thread kristian
run your tests after the package phase, i.e.

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

  
integration-test

  test


  
${basedir}/src/test2/java

  

  

I have not tested it but it should work

regards,
Kristian

On Mon, May 24, 2010 at 11:23 PM, Ernst de Haan  wrote:
>> Instead of running that test in this module's build, add another
>> module alongside it that depends on this artifact, and run this test
>> there. It will bring in the jar which, as you said, has the manifest
>> in it. You will need a parent pom as well over both modules, and
>> always build your project from the parent.
>
> Another question: How do I make the test-module use the *JAR* instead of just 
> the classes?
>
> Here's what I have done:
> - create a separate "base-test" module with a separate POM that depends on 
> the "base" module
> - move all unit tests to the "base-test" module
> - run "mvn clean" and then "mvn test"
>
> What happens is:
> - the classes get compiled for the "base" module (but no JAR is generated)
> - the unit tests in "base-test" are executed, using the classes (not the JAR)
> - the tests (obviously) fail
>
> So I try forcing the JAR to be created, using "mvn install", which works. But 
> still the unit tests fail, because they appear to use the classes instead of 
> the JAR...
>
> Any hints to this next piece of the puzzle?
>
>
> Ernst
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

 _=_
   q(-_-)p
'_) (_`
/__/  \
 _(<_   / )_
  (__\_\_|_/__)

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



Re: Sharing a version among different modules

2010-05-24 Thread Ernst de Haan
>> How do I share one version number across multiple module (subprojects)?
>> 
>> Any suggestions for reducing the number of locations (preferably to 1) ?
> 
> There's also the versions-maven-plugin...

Cheers, Wayne, the more options the better. I'll look at that as well.

Regards,


Ernst
-- trying to look at it the positive side of having to wade through more 
documentation ;-)
-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Sharing a version among different modules

2010-05-24 Thread Wayne Fay
> How do I share one version number across multiple module (subprojects)?
>
> Any suggestions for reducing the number of locations (preferably to 1) ?

There's also the versions-maven-plugin...

Wayne

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



Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
> Instead of running that test in this module's build, add another
> module alongside it that depends on this artifact, and run this test
> there. It will bring in the jar which, as you said, has the manifest
> in it. You will need a parent pom as well over both modules, and
> always build your project from the parent.

Another question: How do I make the test-module use the *JAR* instead of just 
the classes?

Here's what I have done:
- create a separate "base-test" module with a separate POM that depends on the 
"base" module
- move all unit tests to the "base-test" module
- run "mvn clean" and then "mvn test"

What happens is:
- the classes get compiled for the "base" module (but no JAR is generated)
- the unit tests in "base-test" are executed, using the classes (not the JAR)
- the tests (obviously) fail

So I try forcing the JAR to be created, using "mvn install", which works. But 
still the unit tests fail, because they appear to use the classes instead of 
the JAR...

Any hints to this next piece of the puzzle?


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



Re: Sharing a version among different modules

2010-05-24 Thread Ernst de Haan
> But if you are using release plugin 
> http://maven.apache.org/plugins/maven-release-plugin/ for releasing versions, 
> same version numbers in poms are updating automatically. There is no need to 
> have only one.
> 
> See 
> http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#autoVersionSubmodules

Martin, thanks a lot! This looks very promising.

/me goes off to do some more investigation and try things out...

Cheers,


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



Re: Sharing a version among different modules

2010-05-24 Thread Ernst de Haan
>> - in the parent pom.xml, to denote the project version
> you need this
> 
>> - in each module, to denote the module version
> just leave out the version and it will inherit it from the parent pom
> 
>> - in each module's reference to the parent
> you need this
> 
>> - in each module's reference to a sibling
>
>  ${project.parent.groupId}
>  sibling-one
>  ${project.parent.version}
>

Thanks a lot Kristian, this indeed improves the situation a *lot*. Instead of 
10 references for 3 modules, I am now able to reduce it to:

1 + (1 per module)

However, I'll continue my quest to further reduction of replication, as my 
ultimate goal is still to have the version number in one place. Perhaps 
XInclude or so will do the trick.

Thanks heaps!


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



Re: Sharing a version among different modules

2010-05-24 Thread Martin Schayna

You can use {$parent.version} variable in modules poms.

But if you are using release plugin 
http://maven.apache.org/plugins/maven-release-plugin/ for releasing 
versions, same version numbers in poms are updating automatically. There 
is no need to have only one.


See 
http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#autoVersionSubmodules


Martin

On 24.5.2010 19:18, Ernst de Haan wrote:

How do I share one version number across multiple module (subprojects)?

I have one parent pom.xml referencing 3 modules and -believe it or not- I've 
got the version number in 10 different locations:
- in the parent pom.xml, to denote the project version
- in each module, to denote the module version
- in each module's reference to the parent
- in each module's reference to a sibling

Any suggestions for reducing the number of locations (preferably to 1) ?


   




Re: Unit tests depending on manifest

2010-05-24 Thread Justin Edelson
On 5/24/10 1:04 PM, Ernst de Haan wrote:
> Wayne,
> 
> 
>>> How can I make sure the manifest file gets generated before the unit tests 
>>> are executed?
>>>
>>> - the unit tests attempt to validate that Java code, but the manifest file 
>>> is not generated, it's only part of the JAR
>>
>> Instead of running that test in this module's build, add another
>> module alongside it that depends on this artifact, and run this test
>> there. It will bring in the jar which, as you said, has the manifest
>> in it. You will need a parent pom as well over both modules, and
>> always build your project from the parent.
> 
> Brilliant! Thank you for he advice, this is indeed what I will do, I'll add 
> another module.
> 
> Note that I'm new to Maven, I typically use Ant (and an occasional shell 
> script). Although this approach seems the most logical, given the fixed model 
> Maven enforces, it does give the impression that it makes me go against the 
> basic principle Maven appears to herald, which is that one (sub-)project is a 
> contained entity, self-sufficient, including all resources required to build 
> and test the main codebase.
> 
> What I find in (a few days) practice, is that I need to add an extra module 
> in multiple cases:
> - to test code that depends on the manifest
> - to test plugin code, since that needs to be compiled before the plugin can 
> be accessed by Maven

As an alternative to creating a separate module, you may be able to use
the integration-test phase. This happens after your project is packaged,
but before it is installed.

Justin

> 
> /me ponders
> 
> But hey, thanks for giving me an easy way out that is very acceptable (at the 
> least).
> 
> Cheers,
> 
> 
> Ernst
> -
> 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: Sharing a version among different modules

2010-05-24 Thread kristian
that is how do it (http://github.com/mkristian/jruby-maven-plugins/)

On Mon, May 24, 2010 at 10:48 PM, Ernst de Haan  wrote:
> How do I share one version number across multiple module (subprojects)?
>
> I have one parent pom.xml referencing 3 modules and -believe it or not- I've 
> got the version number in 10 different locations:
> - in the parent pom.xml, to denote the project version

you need this

> - in each module, to denote the module version

just leave out the version and it will inherit it from the parent pom

> - in each module's reference to the parent

you need this

> - in each module's reference to a sibling
>

  ${project.parent.groupId}
  sibling-one
  ${project.parent.version}



regards Kristian


> Any suggestions for reducing the number of locations (preferably to 1) ?
>
> PS. To see the project and the POMs, see http://github.com/znerd/logdoc
>
> Cheers,
>
>
> Ernst
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>



-- 
Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA

tel: +91 468 2319577

protect your privacy while searching the net: www.ixquick.com

 _=_
   q(-_-)p
'_) (_`
/__/  \
 _(<_   / )_
  (__\_\_|_/__)

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



RE: POM is invalid...

2010-05-24 Thread Martin Gainty

download the pom for 'org.jfxtras:jfxtras-common:pom:0.7-SNAPSHOT

 

build it

mvn -e -X compile


package it 

mvn -e -X package

 

install the pom to local repository
mvn -e -X install:install-file -Dpackaging=pom

install the jar to local repository

mvn -e -X install:install-file -Dpackaging=jar

 

deploy it

mvn -e -X deploy:deploy-file


Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> Date: Mon, 24 May 2010 19:11:49 +0200
> From: maili...@cedarsoft.com
> To: users@maven.apache.org
> Subject: POM is invalid...
> 
> Hi,
> 
> at the moment I try to mavenize JFXtras.
> Unfortunately I run into a major problem: When I add a dependency to one
> of my projects, I get that message:
> 
> > [WARNING] POM for
> 'org.jfxtras:jfxtras-common:pom:0.7-SNAPSHOT:compile' is invalid.
> 
> (Full log at http://pastebin.com/tguzrAgN)
> 
> 
> And of course the transitive dependencies are missing as a result of this.
> But I can't figure out, what is wrong with that pom. It is a very simple
> and straight forward one.
> 
> 
> I started to comment out everything and found out that the parent pom
> seems to be the problem...
> I have added some dependencies with scope "system" to the parent. Those
> have properties within their paths. When using Maven 3 it complains
> about that. Maven2 does not. Might that be the problem?
> 
> 
> So I have absolutly no clue what the problem might be. What can be the
> next steps to find the problem?
> Any hints are welcome...
> 
> 
> 
> Thanks,
> 
> Johannes
> 
> 
> -- 
> Johannes Schneider - blog.cedarsoft.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

Re: POM is invalid...

2010-05-24 Thread Wayne Fay
>> [DEBUG] For dependency Dependency {groupId=javafx, artifactId=javafxc,
> version=1.3.0, type=jar}: system-scoped dependency must specify an
> absolute path systemPath.

Don't use system scope and thus don't use systemPath.

Use mvn:install install-file to put the jar where it belongs in the
local Maven repo cache, and use a proper "compile" (or whatever)
dependency scope.

Wayne

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



Sharing a version among different modules

2010-05-24 Thread Ernst de Haan
How do I share one version number across multiple module (subprojects)?

I have one parent pom.xml referencing 3 modules and -believe it or not- I've 
got the version number in 10 different locations:
- in the parent pom.xml, to denote the project version
- in each module, to denote the module version
- in each module's reference to the parent
- in each module's reference to a sibling

Any suggestions for reducing the number of locations (preferably to 1) ?

PS. To see the project and the POMs, see http://github.com/znerd/logdoc

Cheers,


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



Re: POM is invalid...

2010-05-24 Thread Johannes Schneider
Aaaah sorry guys.
Have been working too long today.

The log shows the problem (directly at my eyes, don't know why I didn't
see that):

> [DEBUG] For dependency Dependency {groupId=javafx, artifactId=javafxc,
version=1.3.0, type=jar}: system-scoped dependency must specify an
absolute path systemPath.

Okay, well. But I have to use some environment vars like javafx.home or
java.home... Is there any tutorial/sample that shows that?



Thanks,

Johannes

On 05/24/2010 07:11 PM, Johannes Schneider wrote:
> Hi,
> 
> at the moment I try to mavenize JFXtras.
> Unfortunately I run into a major problem: When I add a dependency to one
> of my projects, I get that message:
> 
>> [WARNING] POM for
> 'org.jfxtras:jfxtras-common:pom:0.7-SNAPSHOT:compile' is invalid.
> 
> (Full log at http://pastebin.com/tguzrAgN)
> 
> 
> And of course the transitive dependencies are missing as a result of this.
> But I can't figure out, what is wrong with that pom. It is a very simple
> and straight forward one.
> 
> 
> I started to comment out everything and found out that the parent pom
> seems to be the problem...
> I have added some dependencies with scope "system" to the parent. Those
> have properties within their paths. When using Maven 3 it complains
> about that. Maven2 does not. Might that be the problem?
> 
> 
> So I have absolutly no clue what the problem might be. What can be the
> next steps to find the problem?
> Any hints are welcome...
> 
> 
> 
> Thanks,
> 
> Johannes
> 
> 

-- 
Johannes Schneider - blog.cedarsoft.com

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



POM is invalid...

2010-05-24 Thread Johannes Schneider
Hi,

at the moment I try to mavenize JFXtras.
Unfortunately I run into a major problem: When I add a dependency to one
of my projects, I get that message:

> [WARNING] POM for
'org.jfxtras:jfxtras-common:pom:0.7-SNAPSHOT:compile' is invalid.

(Full log at http://pastebin.com/tguzrAgN)


And of course the transitive dependencies are missing as a result of this.
But I can't figure out, what is wrong with that pom. It is a very simple
and straight forward one.


I started to comment out everything and found out that the parent pom
seems to be the problem...
I have added some dependencies with scope "system" to the parent. Those
have properties within their paths. When using Maven 3 it complains
about that. Maven2 does not. Might that be the problem?


So I have absolutly no clue what the problem might be. What can be the
next steps to find the problem?
Any hints are welcome...



Thanks,

Johannes


-- 
Johannes Schneider - blog.cedarsoft.com

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



Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
Wayne,


>> How can I make sure the manifest file gets generated before the unit tests 
>> are executed?
>> 
>> - the unit tests attempt to validate that Java code, but the manifest file 
>> is not generated, it's only part of the JAR
> 
> Instead of running that test in this module's build, add another
> module alongside it that depends on this artifact, and run this test
> there. It will bring in the jar which, as you said, has the manifest
> in it. You will need a parent pom as well over both modules, and
> always build your project from the parent.

Brilliant! Thank you for he advice, this is indeed what I will do, I'll add 
another module.

Note that I'm new to Maven, I typically use Ant (and an occasional shell 
script). Although this approach seems the most logical, given the fixed model 
Maven enforces, it does give the impression that it makes me go against the 
basic principle Maven appears to herald, which is that one (sub-)project is a 
contained entity, self-sufficient, including all resources required to build 
and test the main codebase.

What I find in (a few days) practice, is that I need to add an extra module in 
multiple cases:
- to test code that depends on the manifest
- to test plugin code, since that needs to be compiled before the plugin can be 
accessed by Maven

/me ponders

But hey, thanks for giving me an easy way out that is very acceptable (at the 
least).

Cheers,


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



Re: Unit tests depending on manifest

2010-05-24 Thread Wayne Fay
> How can I make sure the manifest file gets generated before the unit tests 
> are executed?
>
> - the unit tests attempt to validate that Java code, but the manifest file is 
> not generated, it's only part of the JAR

Instead of running that test in this module's build, add another
module alongside it that depends on this artifact, and run this test
there. It will bring in the jar which, as you said, has the manifest
in it. You will need a parent pom as well over both modules, and
always build your project from the parent.

Wayne

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



Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
How can I make sure the manifest file gets generated before the unit tests are 
executed?

My use case is:
- a Java code base, under src/main/java
- unit tests under src/test/java
- pom.xml specifies packaging "jar" - JUnit 4.8.1 is a dependency
- Java code uses a property from the manifest to determine meta data (library 
version)
- Maven automatically generates the correct manifest file
- the unit tests attempt to validate that Java code, but the manifest file is 
not generated, it's only part of the JAR

Any suggestions?

Note that I'm new to Maven, but I used shell scripts and Ant build files a lot.

FYI, here is the actual code and POM:
http://github.com/znerd/logdoc/blob/master/base/src/main/java/org/znerd/logdoc/Library.java
http://github.com/znerd/logdoc/blob/master/base/src/test/java/org/znerd/logdoc/LibraryTest.java
http://github.com/znerd/logdoc/blob/master/base/pom.xml

Cheers,


Ernst de Haan

Property resolution in server section of settings.xml file

2010-05-24 Thread sebb
I've been trying to use a property reference in the  section
of my settings.xml file to define the username.

But this does not seem to work, nor do property references in the
password field seem to work.

Yet clearly properties are supported in some parts of the  section:

http://maven.apache.org/settings.html#Servers includes:
${user.home}/.ssh/id_dsa

I thought that property references were resolved by the Maven core
before any plugins that use them got involved, but it looks like that
is not the case.

How do I find out which tags support references and which do not
(other than by trial and error)?

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



Re: Can't avoid Maven (embedded) 3.0-SNAPSHOT with m2eclipse

2010-05-24 Thread Baptiste MATHUS
Hi Andrew,

First, you should know there's a dedicated list for m2eclipse, which is a
separated project from Maven, designed to integrate Eclipse and Maven.

>From what I know, it's impossible. M2eclipse internally uses maven 3 (and
has always been doing so, long before maven3 first releases) for all
dependency resolution and so on. That is not configurable.

But you can configure M2eclipse to use external maven installation for
"command" launched through the Run As/Debug menus.

Having read your mail twice, I can't seem to find what your problem is.

Maven 3 is dedicated to be fully compatible with maven 2. So can you
describe what's the difference/problem you're encountering more precisely?
This would let us help you understand what's going on, or even file an issue
for maven3 before it's released as a final version (beta1 currently, after
several stages of alpha).

Thanks


2010/5/24 Andrew Hughes 

> *I have set Window -> Preferences -> Maven -> Installed to a external 2.2.1
> instance and have enabled this as the default maven instance. But,
> whatever "24/05/10 9:50:53 AM: Maven Builder: AUTO_BUILD" is - it still
> using the 3.0-SNAPSHOT embedded maven instance. It refuses to use the
> external maven (2.2.1) instance I have configured. I have deliberately set
> the enforcer to Maven 2.2.1 so that this doesn't happen (+1 for enforcer
> actually working, CHEERS).*
> *
> *
> http://m2eclipse.sonatype.org/m2eclipse-faq.html#17
>
> Why is it working from the command line but not in m2eclipse
>
> Because m2eclipse is using the embedded Maven
> runtime
> in
> Maven 3.0, you can see differences in the execution between m2eclipse and
> command line when Maven 2.1.x is used. We hope that such regressions and
> incompatibilities will be fixed in the future releases of Maven 3.0. Note
> that m2eclipse is always using embedded Maven runtime when running Maven
> builder, importing projects and updating project configuration, however you
> can configure m2eclipse to use external Maven installation when launching
> Maven using "Run as… / Maven XXX" actions.
>
>
> The above statement seems incorrect... I can't clearly can't configure
> m2eclipse to use an external maven instance for the AUTO_BUILD. In fact, I
> tried to uninstall the "Maven Embedded v3.0.0.200912160759" but Haahahaha
> it
> say's it's required by other plugins - indicating that m2eclipse really is
> dependent on 3.0-SNAPSHOT.
>
> I just want to use eclipse 2.2.1, how can I do this? Can I rollback to an
> old version of m2eclipse? Life is very painful for everyone on my dev team
> right now :'(
>
> Any help would be most appreciated, cheers.
> --AH
>



-- 
Baptiste  MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !


RE: javadoc throws NPE

2010-05-24 Thread Denis Kranjčec
After disabling generation of 'Use' pages, javadoc works fine for my
project. 

I removed '-use' from options file that mavan/javadoc plugin generated
and javadoc didn't throw NPE.
Setting 'use' to 'false' in maven-javadoc-plugin also works fine:

org.apache.maven.plugins
maven-javadoc-plugin

   false
   
 
http://java.sun.com/javase/6/docs/api/
   



Denis Kranjcec


-Original Message-
From: Denis Kranjčec [mailto:denis.kranj...@srce.hr] 
Sent: Friday, May 21, 2010 2:22 PM
To: Maven Users List
Subject: RE: javadoc throws NPE

Martin, thanks for reply.

I'm using default values:
outputDirectory: ${project.build.directory}/apidocs
reportOutputDirectory: ${project.reporting.outputDirectory}/apidocs


Maven/javadoc plugin generate javadoc.bat in target\site\apidocs:
"C:\Program Files\Java\jdk1.6.0_20\jre\..\bin\javadoc.exe" @options
@packages @argfile

When I run that javadoc.bat from prompt javadoc throws same exception:
...
Generating
C:/ci/svn/project/project-name/trunk/target/site/apidocs\mypackage/\pack
age-use.ht
ml...
java.lang.NullPointerException
at
com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(P
ackageUseWriter.java:180)
at
com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageList(
PackageUseWriter.java:124)
at
com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(P
ackageUseWriter.java:110)
at
com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUseFi
le(PackageUseWriter.java:99)
at
com.sun.tools.doclets.formats.html.PackageUseWriter.generate(PackageUseW
riter.java:78)
at
com.sun.tools.doclets.formats.html.ClassUseWriter.generate(ClassUseWrite
r.java:116)
at
com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoc
let.java:92)
at
com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(Ab
stractDoclet.java:122)
at
com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDocl
et.java:64)
at
com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)
at
com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
at
com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
at com.sun.tools.javadoc.Start.begin(Start.java:128)
at com.sun.tools.javadoc.Main.execute(Main.java:41)
at com.sun.tools.javadoc.Main.main(Main.java:31)

options file in same folder:
-classpath
'C:/ci/svn/XXX.jar'
-encoding
'Cp1250'
-protected
-sourcepath
'C:/ci/svn/project/project-name/trunk/src/main/java'
-author
-bottom
'Copyright © 2006-2010 http://www.example.com";>Example. All Rights Reserved.'
-charset
'UTF-8'
-d
'C:/ci/svn/project/project-name/trunk/target/site/apidocs'
-docencoding
'UTF-8'
-doctitle
'PROJECT_NAME PROJECT_VERSION-SNAPSHOT API'
-link
'http://java.sun.com/javase/6/docs/api'
-use
-version
-windowtitle
'PROJECT_NAME PROJECT_VERSION-SNAPSHOT API'


packages file in same folder:
mypackage
mypackage.management
mypackage.management.statistika


argfile file in same folder:
'C:/ci/svn/project/project-name/trunk/src/main/java/ABCMain.java'
'C:/ci/svn/project/project-name/trunk/src/main/java/XYZ.java'


Regards,
Denis

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Thursday, May 20, 2010 7:21 PM
To: users@maven.apache.org
Subject: RE: javadoc throws NPE


Denis-


http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html
can you provide us the configuration parameters for:

outputDirectory
reportOutputDirectory


thanks,
Martin--
__ 
Jogi és Bizalmassági kinyilatkoztatás

 
Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük,
hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.





 

> Subject: javadoc throws NPE
> Date: Thu, 20 May 2010 18:10:57 +0200
> From: denis.kranj...@srce.hr
> To: users@maven.apache.org
> 
> I am trying to generate javadoc for a project but javadoc throws NPE
> without any information.
> 
> Maven output:
> Generating
>
C:/ci/svn/project/project-name/trunk/target/s

Re: Maven EAR + EJB ... jars with prefixed "lib/" except for EJB

2010-05-24 Thread zm


Stephen Coy-3 wrote:
> 
> On 21/05/2010, at 10:14 PM, Nicola Musatti wrote:
> 
>> Are you sure about this? I'm asking because this is not the behaviour I'm
>> seeing for a WAR deployed to Websphere 7.0.0.7. In order for the
>> containing EAR's jar's to be visible from the WAR I have to specify them
>> explicitly in the WAR's manifest.
> 
> 
> From "JavaTM Platform, Enterprise Edition (Java EE) Specification, v5"
> 
> EE.8.2.1  Bundled Libraries
> 
> 1. ...
> 
> 2. A .ear file may contain a directory that contains libraries packaged in
> JAR files. The library-directory element of the.earfile’s deployment
> descriptor contains the name of this directory. If a library-directory
> element isn’t specified, or if the .ear file does not contain a deployment
> descriptor, the directory named lib is used. An empty library-directory
> element may be used to specify that there is no library directory.
> All files in this directory (but not subdirectories) with a .jar extension
> must be made available to all components packaged in the EAR file,
> including application clients. These libraries may reference other
> libraries, either bundled with the application or installed separately,
> using any of the techniques described herein.
> 
> 3. A web application may include libraries in the WEB-INF/lib directory.
> See the Servlet specification for details. These libraries may reference
> other libraries, either bundled with the application or installed
> separately, using any of the techniques described herein.
> 
> The usual reason for this not working is using an old (J2EE 1.3 or 1.4)
> DTD/schema in the application.xml file.
> 
> Cheers,
> 
> Steve C
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 
> 
> 

Perfect, that was exactly what I was thinking, that the specification should
define this.

This eases the work of making a cross-application-server EAR archive. Also
not needing the manifest entries makes it more easy to maintain the pom
files for maven.

We have so much stuff to worry about, that these small definitions help
alot.

I'll definitely try it on JBoss, WebSphere and Geronimo to check it out

Thanks.


Note about posting: I post in nabble.com, this time I'll post using Internet
Explorer.
-- 
View this message in context: 
http://old.nabble.com/Maven-EAR-%2B-EJB-...-jars-with-prefixed-%22lib-%22-except-for-EJB-tp28618592p28655173.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 N00b - Someone sent me a POM file - What now?

2010-05-24 Thread Antonio Petrelli
2010/5/24 Martin Gainty :
>
> Antonio..the source can be in svn configured by scm node as seen here:

Dear MavenN00b
please disregard messages by Martin Gainty, he is a very well known
spammer/scammer.

Antonio

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