You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jochen Wiedmann <jo...@gmail.com> on 2016/05/31 06:32:10 UTC

Dynamic Dependency

Hi,

in the rat-maven-plugin we currently have a hard cored dependency from
the plugin to the rat core with the same version number. In other
words, if one would like to use a different version of the rat core,
one needs to use a different version of the plugin.

This has got an important disadvantage: We can't release the core
alone. Instead, a Rat release
consists of a bunch of jar files, making the release process slow,
burdensome, and generally something that we hesitate to do. (As
opposed to "Release early, release often".)

Now, I am well aware that I can use a different version of the Rat
core by declaring it in the plugins extension list, bt my feeling says
that this is not as it ought to be. I'd rather declare a version
number in the plugins configuration (the default being hard coded into
the plugin), and load that version dynamically.

Now my questions:

Is that possible right now?
If so: How?
If not: There are quite a number of other plugins with the same
construction, which could benefit
from such a possibility. (To name but a few: cobertura-maven-plugin,
antlr-maven-plugin, jaxb-maven-plugin, and so on.) Would you welcome
some work in that direction? Would someone offer being a Mentor if I
worked on that?

Thanks,

Jochen


-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Dynamic Dependency

Posted by Lennart Jörelid <le...@gmail.com>.
Hello all,

The jaxb2-maven-plugin declares the JAXB libraries as dependencies within
the plugin, and
hence permits the user to override the JAXB libraries at runtime.

Note, however, that system-scoped dependencies (such as tools.jar) will
need some special treatment
as the plugin needs to augment its runtime classpath to add them.

2016-05-31 12:58 GMT+02:00 Jochen Wiedmann <jo...@gmail.com>:

> On Tue, May 31, 2016 at 8:45 AM, Bhowmik, Bindul
> <bi...@gmail.com> wrote:
>
> >
> > I have never used the Rat plugin, but the Maven Checkstyle plugin
> > supports something like this, by declaring checkstyle as a dependency
> > of the plugin[1], which can be overridden at runtime in the end user
> > pom configuration[2].
>
> Thanks for the hint, I will check that out.
>
> Jochen
>
>
>
> --
> The next time you hear: "Don't reinvent the wheel!"
>
>
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>


-- 

--
+==============================+
| Bästa hälsningar,
| [sw. "Best regards"]
|
| Lennart Jörelid
| EAI Architect & Integrator
|
| jGuru Europe AB
| Mölnlycke - Kista
|
| Email: lj@jguru.se
| URL:   www.jguru.se
| Phone
| (skype):    jgurueurope
| (intl):     +46 708 507 603
| (domestic): 0708 - 507 603
+==============================+

Re: Dynamic Dependency

Posted by Manfred Moser <ma...@simpligility.com>.
This approach works for every plugin... 

Jochen Wiedmann wrote on 2016-05-31 03:58:

> On Tue, May 31, 2016 at 8:45 AM, Bhowmik, Bindul
> <bi...@gmail.com> wrote:
> 
>>
>> I have never used the Rat plugin, but the Maven Checkstyle plugin
>> supports something like this, by declaring checkstyle as a dependency
>> of the plugin[1], which can be overridden at runtime in the end user
>> pom configuration[2].
> 
> Thanks for the hint, I will check that out.
> 
> Jochen
> 
> 
> 
> -- 
> The next time you hear: "Don't reinvent the wheel!"
> 
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Dynamic Dependency

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Tue, May 31, 2016 at 8:45 AM, Bhowmik, Bindul
<bi...@gmail.com> wrote:

>
> I have never used the Rat plugin, but the Maven Checkstyle plugin
> supports something like this, by declaring checkstyle as a dependency
> of the plugin[1], which can be overridden at runtime in the end user
> pom configuration[2].

Thanks for the hint, I will check that out.

Jochen



-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Dynamic Dependency

Posted by "Bhowmik, Bindul" <bi...@gmail.com>.
Jochen,

On Tue, May 31, 2016 at 12:32 AM, Jochen Wiedmann
<jo...@gmail.com> wrote:
> Hi,
>
> in the rat-maven-plugin we currently have a hard cored dependency from
> the plugin to the rat core with the same version number. In other
> words, if one would like to use a different version of the rat core,
> one needs to use a different version of the plugin.
>
> This has got an important disadvantage: We can't release the core
> alone. Instead, a Rat release
> consists of a bunch of jar files, making the release process slow,
> burdensome, and generally something that we hesitate to do. (As
> opposed to "Release early, release often".)
>
> Now, I am well aware that I can use a different version of the Rat
> core by declaring it in the plugins extension list, bt my feeling says
> that this is not as it ought to be. I'd rather declare a version
> number in the plugins configuration (the default being hard coded into
> the plugin), and load that version dynamically.
>
> Now my questions:
>
> Is that possible right now?
> If so: How?

I have never used the Rat plugin, but the Maven Checkstyle plugin
supports something like this, by declaring checkstyle as a dependency
of the plugin[1], which can be overridden at runtime in the end user
pom configuration[2].

> If not: There are quite a number of other plugins with the same
> construction, which could benefit
> from such a possibility. (To name but a few: cobertura-maven-plugin,
> antlr-maven-plugin, jaxb-maven-plugin, and so on.) Would you welcome
> some work in that direction? Would someone offer being a Mentor if I
> worked on that?
>
> Thanks,
>
> Jochen
>
>
> --
> The next time you hear: "Don't reinvent the wheel!"
>
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Regards,
Bindul

[1] http://svn.apache.org/repos/asf/maven/plugins/trunk/pom.xml
[2] https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org