Why I can run plugin:goal in command line even though plugin was only defined under pluginManagement?

2018-02-23 Thread Sigmond Hola
I defined a specific plugin under  , but
not under  , but I can still run goals of this plugin with  mvn
plugin:goal.

As far as I understand is only used to configuring the
plugin information, but not actually import them, right? then how can I use
the goals of this plugin  in the command line?

Thanks for reply.

Bests.
--Sig


Re: [Maven Dependency Plugin] Inheriting transitive dependencies whilst defining an artifact output directory

2018-02-23 Thread Lewis John McGibbney
Hi Jörg,
This is excellent and worked a treat. Thank you so much, for future reference, 
once the dependencies are declared with a , here is the correct plugin 
configuration solution

  
  
org.apache.maven.plugins
maven-dependency-plugin

  
copy
prepare-package

  copy-dependencies


  provided
  ${output.directory}

  

  

Really clean and very useful.
Thank you 
Lewis

On 2018/02/23 23:05:42, Jörg Schaible  wrote: 
> Hi,
> 
> if you use the copy goal, you don't have to add them to your list of 
> dependencies. Personally I would use the 
> copy-dependencies goal and copy only the ones with scope provided (i.e. you 
> don't have to specify each one 
> again).
> 
> Cheers,
> Jörg
> 
> 
> Am Fri, 23 Feb 2018 09:58:09 -0800 schrieb lewis john mcgibbney:
> 
> > I should also say, that the workaround is to list each and every
> > transitive dependency in the dependency declaration with scope
> > 'provided', such that they are NOT on the normal runtime classpath but
> > ARE correctly copied into the target directory defined within the
> > maven-dependency-plugin configuration as shown above.
> > The only issue with this workaround is that it is extremely messy,
> > bloats my POM and is difficult to maintain as I have now introduced
> > around 50 or so additional dependencies which all have versions, etc.
> > Thanks again for any hints.
> > Lewis
> > 
> > On Fri, Feb 23, 2018 at 9:55 AM, lewis john mcgibbney
> >  wrote:
> > 
> >> Hello users@,
> >> I am looking to dynamically load JAR's during a program execution based
> >> upon a users input and therefore using the maven-dependency-plugin to
> >> do this.
> >> Specifically, the plugin configuration looks as follows
> >>
> >>   
> >> org.apache.maven.plugins
> >> maven-dependency-plugin
> >> 
> >>   
> >> copy prepare-package
> >> 
> >>   copy
> >> 
> >> 
> >>   
> >> 
> >>   org.apache.any23.plugins
> >>   apache-any23-openie
> >>   ${project.version}
> >>   ${output.directory}
> >> 
> >> ...
> >> This works fine, however I have an issue with regards to these specific
> >> JARs being present on the classpath during the build and runtime
> >> depending on the  I assign to them within the dependency
> >> definition.
> >> If I mark the scope as 'runtime', the dependencies are added to the
> >> normal classpath which I do not want, as the purpose here is dynamic
> >> classloading via user input.
> >> On the other hand, if I define the dependency scope as 'provided' then
> >> no transitive dependencies are acquired hence I encounter
> >> java.lang.NoClassDefFoundError as although the primary dependency is
> >> present, it's own dependencies are not.
> >>
> >> Does anyone have a way to get around this. Ideally I am looking for a
> >> solution to define a specific location I was dependencies (and the
> >> transitive dependencies) to reside such that I can load them
> >> dynamically at runtime.
> >> Thank you kindly in advance,
> >> Lewis
> >>
> >> --
> >> http://home.apache.org/~lewismc/
> >> http://people.apache.org/keys/committer/lewismc
> >>
> 
> 
> 
> -
> 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: New JDK 9 module chasing tool (was: Getting a list of "to be modularized" dependencies in topological order?)

2018-02-23 Thread Paul King
Looks good.

A small bit of feedback.  I tried using it on a project (Groovy) with
an "all" artifact that has no jar - just references other jars. Even
when I specified "pom" it tried to look for the jar
artifact. Despite the error stacktrace it continued and still seemed
to produce the correct result. I don't know whether it's possible to
reduce such noise.

Cheers, Paul.


On Sat, Feb 24, 2018 at 2:27 AM, Mark Raynsford
 wrote:
> I've published a plugin here:
>
> https://github.com/io7m/modulechaser
>
> It produces a standalone XHTML report detailing the modularization
> status of the transitive dependencies of any project you point it at.
> The status table is presented in reverse-topological order; start
> bugging maintainers at the top first and work downwards. :)
>
> A report produced for:
>
>   https://github.com/io7m/universe
>
> ... Looks like this:
>
>   https://ataxia.io7m.com/2018/02/23/modules.xhtml
>
> The project has had minimal testing, so there are likely to be issues.
> It more or less delegates all of the actual work to the various Maven
> dependency analysis code. Please let me know if it chokes on anything
> you'd consider to be reasonable.
>
> I'm still waiting to be able to push this to Central - I've run into
> what appears to be a compatibility issue with the version of libgpg used
> on Maven Central. I've filed a ticket with Sonatype and am just waiting
> for them to upgrade their infrastructure. Until that happens, you'll
> have to clone and "mvn install" this yourself. Sorry!
>
> --
> Mark Raynsford | http://www.io7m.com
>

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



Re: [Maven Dependency Plugin] Inheriting transitive dependencies whilst defining an artifact output directory

2018-02-23 Thread Jörg Schaible
Hi,

if you use the copy goal, you don't have to add them to your list of 
dependencies. Personally I would use the 
copy-dependencies goal and copy only the ones with scope provided (i.e. you 
don't have to specify each one 
again).

Cheers,
Jörg


Am Fri, 23 Feb 2018 09:58:09 -0800 schrieb lewis john mcgibbney:

> I should also say, that the workaround is to list each and every
> transitive dependency in the dependency declaration with scope
> 'provided', such that they are NOT on the normal runtime classpath but
> ARE correctly copied into the target directory defined within the
> maven-dependency-plugin configuration as shown above.
> The only issue with this workaround is that it is extremely messy,
> bloats my POM and is difficult to maintain as I have now introduced
> around 50 or so additional dependencies which all have versions, etc.
> Thanks again for any hints.
> Lewis
> 
> On Fri, Feb 23, 2018 at 9:55 AM, lewis john mcgibbney
>  wrote:
> 
>> Hello users@,
>> I am looking to dynamically load JAR's during a program execution based
>> upon a users input and therefore using the maven-dependency-plugin to
>> do this.
>> Specifically, the plugin configuration looks as follows
>>
>>   
>> org.apache.maven.plugins
>> maven-dependency-plugin
>> 
>>   
>> copy prepare-package
>> 
>>   copy
>> 
>> 
>>   
>> 
>>   org.apache.any23.plugins
>>   apache-any23-openie
>>   ${project.version}
>>   ${output.directory}
>> 
>> ...
>> This works fine, however I have an issue with regards to these specific
>> JARs being present on the classpath during the build and runtime
>> depending on the  I assign to them within the dependency
>> definition.
>> If I mark the scope as 'runtime', the dependencies are added to the
>> normal classpath which I do not want, as the purpose here is dynamic
>> classloading via user input.
>> On the other hand, if I define the dependency scope as 'provided' then
>> no transitive dependencies are acquired hence I encounter
>> java.lang.NoClassDefFoundError as although the primary dependency is
>> present, it's own dependencies are not.
>>
>> Does anyone have a way to get around this. Ideally I am looking for a
>> solution to define a specific location I was dependencies (and the
>> transitive dependencies) to reside such that I can load them
>> dynamically at runtime.
>> Thank you kindly in advance,
>> Lewis
>>
>> --
>> http://home.apache.org/~lewismc/
>> http://people.apache.org/keys/committer/lewismc
>>



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



Re: [Maven Dependency Plugin] Inheriting transitive dependencies whilst defining an artifact output directory

2018-02-23 Thread lewis john mcgibbney
I should also say, that the workaround is to list each and every transitive
dependency in the dependency declaration with scope 'provided', such that
they are NOT on the normal runtime classpath but ARE correctly copied into
the target directory defined within the maven-dependency-plugin
configuration as shown above.
The only issue with this workaround is that it is extremely messy, bloats
my POM and is difficult to maintain as I have now introduced around 50 or
so additional dependencies which all have versions, etc.
Thanks again for any hints.
Lewis

On Fri, Feb 23, 2018 at 9:55 AM, lewis john mcgibbney 
wrote:

> Hello users@,
> I am looking to dynamically load JAR's during a program execution based
> upon a users input and therefore using the maven-dependency-plugin to do
> this.
> Specifically, the plugin configuration looks as follows
>
>   
> org.apache.maven.plugins
> maven-dependency-plugin
> 
>   
> copy
> prepare-package
> 
>   copy
> 
> 
>   
> 
>   org.apache.any23.plugins
>   apache-any23-openie
>   ${project.version}
>   ${output.directory}
> 
> ...
> This works fine, however I have an issue with regards to these specific
> JARs being present on the classpath during the build and runtime depending
> on the  I assign to them within the dependency definition.
> If I mark the scope as 'runtime', the dependencies are added to the normal
> classpath which I do not want, as the purpose here is dynamic classloading
> via user input.
> On the other hand, if I define the dependency scope as 'provided' then no
> transitive dependencies are acquired hence I encounter
> java.lang.NoClassDefFoundError as although the primary dependency is
> present, it's own dependencies are not.
>
> Does anyone have a way to get around this. Ideally I am looking for a
> solution to define a specific location I was dependencies (and the
> transitive dependencies) to reside such that I can load them dynamically at
> runtime.
> Thank you kindly in advance,
> Lewis
>
> --
> http://home.apache.org/~lewismc/
> http://people.apache.org/keys/committer/lewismc
>



-- 
http://home.apache.org/~lewismc/
http://people.apache.org/keys/committer/lewismc


[Maven Dependency Plugin] Inheriting transitive dependencies whilst defining an artifact output directory

2018-02-23 Thread lewis john mcgibbney
Hello users@,
I am looking to dynamically load JAR's during a program execution based
upon a users input and therefore using the maven-dependency-plugin to do
this.
Specifically, the plugin configuration looks as follows

  
org.apache.maven.plugins
maven-dependency-plugin

  
copy
prepare-package

  copy


  

  org.apache.any23.plugins
  apache-any23-openie
  ${project.version}
  ${output.directory}

...
This works fine, however I have an issue with regards to these specific
JARs being present on the classpath during the build and runtime depending
on the  I assign to them within the dependency definition.
If I mark the scope as 'runtime', the dependencies are added to the normal
classpath which I do not want, as the purpose here is dynamic classloading
via user input.
On the other hand, if I define the dependency scope as 'provided' then no
transitive dependencies are acquired hence I encounter
java.lang.NoClassDefFoundError as although the primary dependency is
present, it's own dependencies are not.

Does anyone have a way to get around this. Ideally I am looking for a
solution to define a specific location I was dependencies (and the
transitive dependencies) to reside such that I can load them dynamically at
runtime.
Thank you kindly in advance,
Lewis

-- 
http://home.apache.org/~lewismc/
http://people.apache.org/keys/committer/lewismc


New JDK 9 module chasing tool (was: Getting a list of "to be modularized" dependencies in topological order?)

2018-02-23 Thread Mark Raynsford
I've published a plugin here:

https://github.com/io7m/modulechaser

It produces a standalone XHTML report detailing the modularization
status of the transitive dependencies of any project you point it at.
The status table is presented in reverse-topological order; start
bugging maintainers at the top first and work downwards. :)

A report produced for:

  https://github.com/io7m/universe

... Looks like this:

  https://ataxia.io7m.com/2018/02/23/modules.xhtml

The project has had minimal testing, so there are likely to be issues.
It more or less delegates all of the actual work to the various Maven
dependency analysis code. Please let me know if it chokes on anything
you'd consider to be reasonable.

I'm still waiting to be able to push this to Central - I've run into
what appears to be a compatibility issue with the version of libgpg used
on Maven Central. I've filed a ticket with Sonatype and am just waiting
for them to upgrade their infrastructure. Until that happens, you'll
have to clone and "mvn install" this yourself. Sorry!

-- 
Mark Raynsford | http://www.io7m.com



pgpltlP_VR_C6.pgp
Description: OpenPGP digital signature