[ANN] maven deptools plugin 1.1 released
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: pluginRepositories pluginRepository idmbk_mvn_repo/id namembk_mvn_repo/name urlhttp://github.com/mbknor/mbk_mvn_repo/raw/master//url /pluginRepository /pluginRepositories (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=regular expression -DincludePattern=regular expression --- 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: build plugins plugin groupIddeptools.plugin/groupId artifactIdmaven-deptools-plugin/artifactId !-- Use these optional settings to include and/or include dependencies from the check: configuration includePattern a valid regular expression /includePattern excludePattern a valid regular expression /excludePattern /configuration The pattern is matched against the string groupId:artifactId for all dependencies in the dependency-path. Example: includePatterncom.kjetland:.*/includePattern The pattern above will only fail the build if an error is found on any dependency linked to from a an artifact with groupId equal to 'com.kjetland' -- executions execution phasecompile/phase goals goalversion-checker/goal /goals /execution /executions /plugin /plugins /build pluginRepositories pluginRepository idmbk_mvn_repo/id namembk_mvn_repo/name urlhttp://github.com/mbknor/mbk_mvn_repo/raw/master//url /pluginRepository /pluginRepositories -- 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: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-enforcer-plugin/artifactId dependencies dependency groupIddeptools.plugin/groupId artifactIdenforcer-rule/artifactId version1.1/version /dependency /dependencies configuration rules requireMavenVersion version2.0.6/version /requireMavenVersion myCustomRule implementation=deptools.plugin.enforcerrule.DeptoolsEnforcerRule includePatterncom.kjetland:.+/includePattern excludePattern.*commons-logging.*/excludePattern
Re: Best Practices Question: Teams working on different modules / SCM, etc
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 wayne...@gmail.com 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?
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 http://github.com/mbknor/deptoolsRegards, Morten On Tue, May 18, 2010 at 2:42 PM, AVSUNIL sunil...@infosys.com 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 +
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 nick.stolw...@gmail.com 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 sonia.lodoviche...@ericsson.com 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
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: pluginRepositories pluginRepository idmbk_mvn_repo/id namembk_mvn_repo/name urlhttp://github.com/mbknor/mbk_mvn_repo/raw/master/lt;/urlgt; /pluginRepository /pluginRepositories (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=regular expression -DincludePattern=regular expression --- 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: build plugins plugin groupIddeptools.plugin/groupId artifactIdmaven-deptools-plugin/artifactId !-- Use these optional settings to include and/or include dependencies from the check: configuration includePattern a valid regular expression /includePattern excludePattern a valid regular expression /excludePattern /configuration The pattern is matched against the string groupId:artifactId for all dependencies in the dependency-path. Example: includePatterncom.kjetland:.*/includePattern The pattern above will only fail the build if an error is found on any dependency linked to from a an artifact with groupId equal to 'com.kjetland' -- executions execution phasecompile/phase goals goalversion-checker/goal /goals /execution /executions /plugin /plugins /build pluginRepositories pluginRepository idmbk_mvn_repo/id namembk_mvn_repo/name urlhttp://github.com/mbknor/mbk_mvn_repo/raw/master/lt;/urlgt; /pluginRepository /pluginRepositories -Morten - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org