Plugin dependency resolution from plugin pom?

2015-03-23 Thread Gary Kennedy
I'm trying to patch a third-party plugin at the moment as a temporary 
workaround for a problem. (I don't want to get into details because it's not 
important)

So I currently have a 'patch project' that depends on the plugin, uses the 
maven-dependency-plugin to unpack the dependant plugin (without the replacement 
files), contains the replacement files, does some replacer magic on the 
extracted plugin.xml to fixup the version/etc, and then package it all.

This all works fine, in that the new project jar is a good content copy of the 
old plugin with all the changes needed.

However, when using the new plugin, several dependency errors occur. (i.e., the 
dependencies of the old plugin are not pulled in).

This confused me for a while because the maven plugin.xml file correctly lists 
all the dependencies. After a bit more playing around I worked out that this is 
because the plugin dependency resolution comes from the plugins pom.xml and NOT 
the plugin.xml file.

So my main question for the group is: How/Can I, at build time, add the 
dependency (and properties, if possible) section from the old plugin pom into 
my new plugin's artefact pom? (So not the project pom itself, but the one 
written to the maven repository)

And because I'm curious, does anyone know,
   a) why the plugin.xml contains the dependencies if they are not used?
or b) why the pom.xml is used instead of the plugin.xml to resolve 
dependencies? (I suspect aether + coding simplicity for this one)

Cheers,
Gary


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



Re: java import package and maven dependencies

2015-03-23 Thread Lin Ma
Thanks Markus,

Do you know on IntelliJ, how to see Maven update Classpath and settings in
IntelliJ how Classpath by Maven is prioritized among other Jars/paths on
Classpath?

regards,
Lin

On Mon, Mar 23, 2015 at 2:07 AM, Markus Karg  wrote:

> With "at runtime" I mean "when Eclipse is performing the 'organize import'
> functionality" or its various variants.
>
> -Ursprüngliche Nachricht-
> Von: Lin Ma [mailto:lin...@gmail.com]
> Gesendet: Montag, 23. März 2015 08:59
> An: Maven Users List
> Betreff: Re: java import package and maven dependencies
>
> Thanks Markus,
>
> For "at runtime", I think you do not mean when running the Java
> application, but when we add a new dependency in pom.xml, Maven will
> download the dependency and add the JAR into Classpath which Eclipse will
> recognize? -- so that the import package statements could be recognized and
> resolved in IDE?
>
> regards,
> Lin
>
> On Mon, Mar 23, 2015 at 12:29 AM, Markus Karg  wrote:
>
> > Lin,
> >
> > there is no magic involved. Maven produces a Class Path at runtime
> > made up from the declared dependencies in the effective POM (i. e.
> > your explicit POM and any explicit and implicit parent POMs, and any
> > implied POMs due to dependencies). Eclipse uses that Class Path as
> > part of the one it constructs on its own, you even can tell Eclipse
> > the rank where to put the Maven Classpath relatively to siblings.
> > Eclipse just checks all Classes in the Classpath for name equality,
> > picks the sole match automatically, or provides a list of possible
> matches for the user to pick from. That's all.
> > Pretty simple and straightforward, and everything but magic.
> >
> > Regards
> > -Markus
> >
> > -Ursprüngliche Nachricht-
> > Von: Lin Ma [mailto:lin...@gmail.com]
> > Gesendet: Montag, 23. März 2015 06:24
> > An: Maven Users List
> > Betreff: java import package and maven dependencies
> >
> > Hi Maven masters,
> >
> > It is magic when we add dependencies in Maven pom.xml, IDE like
> > IntelliJ could resolve it for java import package statement at the
> > beginning of each .java file.
> >
> > Want to learn a bit more how Maven or IDE will use dependencies in
> > Maven pom.xml file to resolve import package in .java file
> > automatically? Does it on the backend download and put the jar in
> > dependencies in class path, and treat it the same as manually add an
> external jar file?
> >
> > Any good articles are appreciated.
> >
> > thanks in advance,
> > Lin
> >
>


Re: Errors performing release to Nexus

2015-03-23 Thread Karl Heinz Marbaise

Hi,

On 3/23/15 6:22 PM, David Hoffer wrote:

Yes it keeps failing...we have tried it several times.  Is there
something in Nexus we need to delete?


Usually Nexus is configured to regret deployment of the same release 
more than oncewhich makes sense...but you might need to change this...



Kind regards
Karl Heinz Marbaise


-Dave

On Mon, Mar 23, 2015 at 11:14 AM, Karl Heinz Marbaise mailto:khmarba...@gmx.de>> wrote:

Hi have you tried to release several times...with the same version ?

cause 400 code looks like this

Kind regards
Karl Heinz Marbaise

On 3/23/15 6:01 PM, David Hoffer wrote:

We are trying to perform an internal release of the quartz
project after we
made a few changes.  However when we perform the Maven release
we get the
following error.  We aren't sure if this is a Nexus 'bug' or if
there is
something in the quartz build that would cause this.

Any ideas?

*[org.quartz-scheduler:quartz-__parent] Failed to execute goal
org.apache.maven.plugins:__maven-deploy-plugin:2.8.2:__deploy
(default-deploy)
on project quartz-parent: Failed to retrieve remote metadata
org.quartz-scheduler:quartz-__parent/maven-metadata.xml: Could
not transfer
metadata org.quartz-scheduler:quartz-__parent/maven-metadata.xml
from/to
nexus

(dav:https://maven.issinc.com/__nexus/service/local/staging/__deploy/maven2

>):
Failed to transfer file:

https://maven.issinc.com/__nexus/service/local/staging/__deploy/maven2/org/quartz-__scheduler/quartz-parent/maven-__metadata.xml



>.
Return code is: 400*


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



Re: Errors performing release to Nexus

2015-03-23 Thread Tamas Cservenak
Check nexus logs and staging profile configuration. 
Staging responding 400 Bad Request may mean nexus not finding/not having 
profiles to match deploy attempt for example.

-- 
Thanks,
~t~

On 23 Mar 2015 at 18:22:43, David Hoffer (dhoff...@gmail.com) wrote:

Yes it keeps failing...we have tried it several times. Is there something  
in Nexus we need to delete?  

-Dave  

On Mon, Mar 23, 2015 at 11:14 AM, Karl Heinz Marbaise   
wrote:  

> Hi have you tried to release several times...with the same version ?  
>  
> cause 400 code looks like this  
>  
> Kind regards  
> Karl Heinz Marbaise  
>  
> On 3/23/15 6:01 PM, David Hoffer wrote:  
>  
>> We are trying to perform an internal release of the quartz project after  
>> we  
>> made a few changes. However when we perform the Maven release we get the  
>> following error. We aren't sure if this is a Nexus 'bug' or if there is  
>> something in the quartz build that would cause this.  
>>  
>> Any ideas?  
>>  
>> *[org.quartz-scheduler:quartz-parent] Failed to execute goal  
>> org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy  
>> (default-deploy)  
>> on project quartz-parent: Failed to retrieve remote metadata  
>> org.quartz-scheduler:quartz-parent/maven-metadata.xml: Could not transfer  
>> metadata org.quartz-scheduler:quartz-parent/maven-metadata.xml from/to  
>> nexus  
>> (dav:https://maven.issinc.com/nexus/service/local/staging/deploy/maven2  
>> ):  
>> Failed to transfer file:  
>> https://maven.issinc.com/nexus/service/local/staging/  
>> deploy/maven2/org/quartz-scheduler/quartz-parent/maven-metadata.xml  
>> > deploy/maven2/org/quartz-scheduler/quartz-parent/maven-metadata.xml>.  
>> Return code is: 400*  
>>  
>>  
> -  
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org  
> For additional commands, e-mail: users-h...@maven.apache.org  
>  
>  


Re: Errors performing release to Nexus

2015-03-23 Thread David Hoffer
Yes it keeps failing...we have tried it several times.  Is there something
in Nexus we need to delete?

-Dave

On Mon, Mar 23, 2015 at 11:14 AM, Karl Heinz Marbaise 
wrote:

> Hi have you tried to release several times...with the same version ?
>
> cause 400 code looks like this
>
> Kind regards
> Karl Heinz Marbaise
>
> On 3/23/15 6:01 PM, David Hoffer wrote:
>
>> We are trying to perform an internal release of the quartz project after
>> we
>> made a few changes.  However when we perform the Maven release we get the
>> following error.  We aren't sure if this is a Nexus 'bug' or if there is
>> something in the quartz build that would cause this.
>>
>> Any ideas?
>>
>> *[org.quartz-scheduler:quartz-parent] Failed to execute goal
>> org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy
>> (default-deploy)
>> on project quartz-parent: Failed to retrieve remote metadata
>> org.quartz-scheduler:quartz-parent/maven-metadata.xml: Could not transfer
>> metadata org.quartz-scheduler:quartz-parent/maven-metadata.xml from/to
>> nexus
>> (dav:https://maven.issinc.com/nexus/service/local/staging/deploy/maven2
>> ):
>> Failed to transfer file:
>> https://maven.issinc.com/nexus/service/local/staging/
>> deploy/maven2/org/quartz-scheduler/quartz-parent/maven-metadata.xml
>> > deploy/maven2/org/quartz-scheduler/quartz-parent/maven-metadata.xml>.
>> Return code is: 400*
>>
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Errors performing release to Nexus

2015-03-23 Thread Karl Heinz Marbaise

Hi have you tried to release several times...with the same version ?

cause 400 code looks like this

Kind regards
Karl Heinz Marbaise

On 3/23/15 6:01 PM, David Hoffer wrote:

We are trying to perform an internal release of the quartz project after we
made a few changes.  However when we perform the Maven release we get the
following error.  We aren't sure if this is a Nexus 'bug' or if there is
something in the quartz build that would cause this.

Any ideas?

*[org.quartz-scheduler:quartz-parent] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy)
on project quartz-parent: Failed to retrieve remote metadata
org.quartz-scheduler:quartz-parent/maven-metadata.xml: Could not transfer
metadata org.quartz-scheduler:quartz-parent/maven-metadata.xml from/to
nexus
(dav:https://maven.issinc.com/nexus/service/local/staging/deploy/maven2
):
Failed to transfer file:
https://maven.issinc.com/nexus/service/local/staging/deploy/maven2/org/quartz-scheduler/quartz-parent/maven-metadata.xml
.
Return code is: 400*



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



Errors performing release to Nexus

2015-03-23 Thread David Hoffer
We are trying to perform an internal release of the quartz project after we
made a few changes.  However when we perform the Maven release we get the
following error.  We aren't sure if this is a Nexus 'bug' or if there is
something in the quartz build that would cause this.

Any ideas?

*[org.quartz-scheduler:quartz-parent] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy)
on project quartz-parent: Failed to retrieve remote metadata
org.quartz-scheduler:quartz-parent/maven-metadata.xml: Could not transfer
metadata org.quartz-scheduler:quartz-parent/maven-metadata.xml from/to
nexus
(dav:https://maven.issinc.com/nexus/service/local/staging/deploy/maven2
):
Failed to transfer file:
https://maven.issinc.com/nexus/service/local/staging/deploy/maven2/org/quartz-scheduler/quartz-parent/maven-metadata.xml
.
Return code is: 400*

-Dave


AW: java import package and maven dependencies

2015-03-23 Thread Markus Karg
With "at runtime" I mean "when Eclipse is performing the 'organize import' 
functionality" or its various variants.

-Ursprüngliche Nachricht-
Von: Lin Ma [mailto:lin...@gmail.com] 
Gesendet: Montag, 23. März 2015 08:59
An: Maven Users List
Betreff: Re: java import package and maven dependencies

Thanks Markus,

For "at runtime", I think you do not mean when running the Java application, 
but when we add a new dependency in pom.xml, Maven will download the dependency 
and add the JAR into Classpath which Eclipse will recognize? -- so that the 
import package statements could be recognized and resolved in IDE?

regards,
Lin

On Mon, Mar 23, 2015 at 12:29 AM, Markus Karg  wrote:

> Lin,
>
> there is no magic involved. Maven produces a Class Path at runtime 
> made up from the declared dependencies in the effective POM (i. e. 
> your explicit POM and any explicit and implicit parent POMs, and any 
> implied POMs due to dependencies). Eclipse uses that Class Path as 
> part of the one it constructs on its own, you even can tell Eclipse 
> the rank where to put the Maven Classpath relatively to siblings. 
> Eclipse just checks all Classes in the Classpath for name equality, 
> picks the sole match automatically, or provides a list of possible matches 
> for the user to pick from. That's all.
> Pretty simple and straightforward, and everything but magic.
>
> Regards
> -Markus
>
> -Ursprüngliche Nachricht-
> Von: Lin Ma [mailto:lin...@gmail.com]
> Gesendet: Montag, 23. März 2015 06:24
> An: Maven Users List
> Betreff: java import package and maven dependencies
>
> Hi Maven masters,
>
> It is magic when we add dependencies in Maven pom.xml, IDE like 
> IntelliJ could resolve it for java import package statement at the 
> beginning of each .java file.
>
> Want to learn a bit more how Maven or IDE will use dependencies in 
> Maven pom.xml file to resolve import package in .java file 
> automatically? Does it on the backend download and put the jar in 
> dependencies in class path, and treat it the same as manually add an external 
> jar file?
>
> Any good articles are appreciated.
>
> thanks in advance,
> Lin
>


Re: java import package and maven dependencies

2015-03-23 Thread Lin Ma
Thanks Markus,

For "at runtime", I think you do not mean when running the Java
application, but when we add a new dependency in pom.xml, Maven will
download the dependency and add the JAR into Classpath which Eclipse will
recognize? -- so that the import package statements could be recognized and
resolved in IDE?

regards,
Lin

On Mon, Mar 23, 2015 at 12:29 AM, Markus Karg  wrote:

> Lin,
>
> there is no magic involved. Maven produces a Class Path at runtime made up
> from the declared dependencies in the effective POM (i. e. your explicit
> POM and any explicit and implicit parent POMs, and any implied POMs due to
> dependencies). Eclipse uses that Class Path as part of the one it
> constructs on its own, you even can tell Eclipse the rank where to put the
> Maven Classpath relatively to siblings. Eclipse just checks all Classes in
> the Classpath for name equality, picks the sole match automatically, or
> provides a list of possible matches for the user to pick from. That's all.
> Pretty simple and straightforward, and everything but magic.
>
> Regards
> -Markus
>
> -Ursprüngliche Nachricht-
> Von: Lin Ma [mailto:lin...@gmail.com]
> Gesendet: Montag, 23. März 2015 06:24
> An: Maven Users List
> Betreff: java import package and maven dependencies
>
> Hi Maven masters,
>
> It is magic when we add dependencies in Maven pom.xml, IDE like IntelliJ
> could resolve it for java import package statement at the beginning of each
> .java file.
>
> Want to learn a bit more how Maven or IDE will use dependencies in Maven
> pom.xml file to resolve import package in .java file automatically? Does it
> on the backend download and put the jar in dependencies in class path, and
> treat it the same as manually add an external jar file?
>
> Any good articles are appreciated.
>
> thanks in advance,
> Lin
>


AW: java import package and maven dependencies

2015-03-23 Thread Markus Karg
Lin,

there is no magic involved. Maven produces a Class Path at runtime made up from 
the declared dependencies in the effective POM (i. e. your explicit POM and any 
explicit and implicit parent POMs, and any implied POMs due to dependencies). 
Eclipse uses that Class Path as part of the one it constructs on its own, you 
even can tell Eclipse the rank where to put the Maven Classpath relatively to 
siblings. Eclipse just checks all Classes in the Classpath for name equality, 
picks the sole match automatically, or provides a list of possible matches for 
the user to pick from. That's all. Pretty simple and straightforward, and 
everything but magic.

Regards
-Markus

-Ursprüngliche Nachricht-
Von: Lin Ma [mailto:lin...@gmail.com] 
Gesendet: Montag, 23. März 2015 06:24
An: Maven Users List
Betreff: java import package and maven dependencies

Hi Maven masters,

It is magic when we add dependencies in Maven pom.xml, IDE like IntelliJ could 
resolve it for java import package statement at the beginning of each .java 
file.

Want to learn a bit more how Maven or IDE will use dependencies in Maven 
pom.xml file to resolve import package in .java file automatically? Does it on 
the backend download and put the jar in dependencies in class path, and treat 
it the same as manually add an external jar file?

Any good articles are appreciated.

thanks in advance,
Lin