[ANN] maven deptools plugin 1.1 released

2010-11-02 Thread Morten Kjetland


Version 1.1 of maven deptools plugin now supports maven 3 and the "maven
enforcer plugin"




maven deptools plugin "...gives build error if maven resolves transient
dependencies in such a way that the none-newest version is chosen."

This plugin has turned out to be very useful in the company I work for.

The plugin can be found here: http://github.com/mbknor/deptools


>From the README:



Maven deptools plugin - Supports Maven 3

* Now also as an enforcer-plugin rule *
  (See description at the bottom of this README)


---
Maven 2 and Maven 3 plugin which gives build error if maven resolves
transient dependencies
in such a way that the none-newest version is chosen.

At work we have all kinds of different dependencies problems related
to transient
dependencies.

Transient dependencies has many downsides, but in my opinion, the
alternative is worse.

This plugin makes it possible to have the build process fail if not the newest
version of a referred dependency is selected by mavens dependency resolving.

It is possible to include/exclude which artifacts should be included
in the check.

This will make it possible for us to check dependency resolving for all
inhouse APIs and projects..

The plugin is written in Scala


For example-maven-project showing the problem and the pluging, have a
look here:http://github.com/mbknor/deptools/tree/master/test/

---

If you find a bug or have a feature request, report them
here:http://github.com/mbknor/deptools/issues

---


The plugin can be found in this repository:



mbk_mvn_repo
mbk_mvn_repo
http://github.com/mbknor/mbk_mvn_repo/raw/master/



(PS: the repository does not work from Nexus(http://nexus.sonatype.org/))

---

To run the plugin from the command line:

mvn deptools.plugin:maven-deptools-plugin:version-checker

To include/exclude dependencies use one/both of these settings:
-DexcludePattern=
-DincludePattern=

---

If you want to automatically include the deptools plugin
in your build, so it can fail your build if it finds an error,
you can do it like this:




deptools.plugin
maven-deptools-plugin



compile

version-checker









mbk_mvn_repo
mbk_mvn_repo
http://github.com/mbknor/mbk_mvn_repo/raw/master/




--

The plugin can also be used as a maven-enforcer-plugin rule.

For example-maven-projects showing the problem and the plugin as
enforcer-rule, have a look
here:http://github.com/mbknor/deptools/tree/master/test/enforcer-tests/

This is done like like this:


org.apache.maven.plugins
maven-enforcer-plugin


deptools.plugin
enforcer-rule
1.1






2.0.6


com.kjetland:.+
.*commons-logging.*








To invoke the deptools-plugin as an enforcer plugin, execute this on
the command-line:

mvn package enforcer:enforce


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: Is there a way to disable transitive dependencies?

2010-05-18 Thread Morten Kjetland
Hi,

If you decide to include the transient dependencies, a plugin called
deptools can help you detect when wrong dependency-versions are chosen.

You can have a look at it here:
http://github.com/mbknor/deptools

Regards,
Morten

On Tue, May 18, 2010 at 2:42 PM, AVSUNIL  wrote:

>
> Hi,
>
> I have project A which produces artifact as war. Project A has dependency
> on
> project B and it is mentioned in the pom of Project A. Now the build of
> Project A is acting indifferently in 2 environments
>
> a) When I am building from my local/development envionment, it builds the
> war with only the dependencies mentioned in its pom
>
> b) When I build from my test environment, it builds the war with
> dependecies
> mentioned in pom as well as dependecies of dependecies. This is undesirable
> as war will become very big as well as unwanted versions might cree through
>
> How do I get the behaviour of my dev env in test env also? How do I make
> sure dependecies of dependencies does not come inot my war?
> > I am only using pom and and not the assembly descriptor.
> > Both environment have the same build script which checksout the latest
> > from SVN and then does
> mvn clean
> mvn compile
> mvn package
>
> Thanks
> Sunil
>
> --
> View this message in context:
> http://old.nabble.com/Is-there-a-way-to-disable-transitive-dependencies--tp28595375p28595375.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: Dependency Management +

2010-04-27 Thread Morten Kjetland
We use a plugin called deptools to automatically fail the build if a
maven chooses a dependency that is older than the version some other
dependency requires it to be..

Have a look at it here:
http://github.com/mbknor/deptools

-Morten


On Mon, Apr 26, 2010 at 6:12 PM, Nick Stolwijk  wrote:
> To enforce that all plugins are versioned use the enforcer plugin [1]
> with the rule requirePluginVersions [2].
>
> For the dependencymanagement enforcement take a look at the Maven
> Dependency Plugin [3] with the goals analyze-only [4] and
> anaylyze-dep-mgt [5].
>
> [1] http://maven.apache.org/plugins/maven-enforcer-plugin/
> [2] http://maven.apache.org/enforcer/enforcer-rules/requirePluginVersions.html
> [3] http://maven.apache.org/plugins/maven-dependency-plugin/
> [4] 
> http://maven.apache.org/plugins/maven-dependency-plugin/analyze-only-mojo.html
> [5] 
> http://maven.apache.org/plugins/maven-dependency-plugin/analyze-dep-mgt-mojo.html
>
> Hth,
>
> Nick Stolwijk
> ~Java Developer~
>
> IPROFS BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> http://www.iprofs.nl
>
>
>
> On Mon, Apr 26, 2010 at 5:59 PM, solo1970
>  wrote:
>>
>> Hello,
>>
>> For my project, I need to identify plugins/dependencies that don't have
>> explicit versions specified (i.e. that would use the latest version)
>>
>> Also, I would need a plugin to fail my build if the aggregated modules don't
>> use the same version of inter-project dependencies. (would check for project
>> dependency inconsistency)
>>
>> Any ideas?
>>
>> Sonia
>> --
>> View this message in context: 
>> http://old.nabble.com/Dependency-Management-%2B-tp28366761p28366761.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
>>
>>
>
> -
> 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



[ANN] maven deptools plugin 1.0-RC4-SNAPSHOT released

2010-04-20 Thread Morten Kjetland
Hi all,

I've created a maven plugin that "...gives build error if maven
resolves transient dependencies
in such a way that the none-newest version is chosen."

This plugin has turned out to be very useful in the company I work for.

I would appreciate any feedback about the plugin.

The plugin can be found here: http://github.com/mbknor/deptools


>From README:
Maven deptools plugin

---
Maven 2 plugin which gives build error if maven resolves transient dependencies
in such a way that the none-newest version is chosen.

At work we have all kinds of different dependencies problems related
to transient
dependencies.

Transient dependencies has many downsides, but in my opinion, the
alternative is worse.

This plugin makes it possible to have the build process fail if not the newest
version of a referred dependency is selected by mavens dependency resolving.

It is possible to include/exclude which artifacts should be included
in the check.

This will make it possible for us to check dependency resolving for all
inhouse api�s and projects..

The plugin is written in Scala

---

If you find a bug or have a feature request, report them here:
http://github.com/mbknor/deptools/issues

---


The plugin can be found in this repository:



mbk_mvn_repo
mbk_mvn_repo
http://github.com/mbknor/mbk_mvn_repo/raw/master/;



(PS: the repository does not work from Nexus(http://nexus.sonatype.org/))

---

To run the plugin from the command line:

mvn deptools.plugin:maven-deptools-plugin:version-checker

To include/exclude dependencies use one/both of these settings:
-DexcludePattern=
-DincludePattern=

---

If you want to automatically include the deptools plugin
in your build, so it can fail your build if it finds an error,
you can do it like this:




deptools.plugin
maven-deptools-plugin



compile

version-checker









mbk_mvn_repo
mbk_mvn_repo
http://github.com/mbknor/mbk_mvn_repo/raw/master/;





-Morten

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