Maven check for updated dependencies in repository

The Maven Versions plugin and it’s display-dependency-updates mojo are what you’re looking for: mvn versions:display-dependency-updates Here is what the output looks like: [INFO] ———————————————————————— [INFO] Building Build Helper Maven Plugin [INFO] task-segment: [versions:display-dependency-updates] [INFO] ———————————————————————— [INFO] [versions:display-dependency-updates] [INFO] [INFO] The following dependency updates are available: [INFO] org.apache.maven:maven-artifact …………………… 2.0 -> 2.0.9 [INFO] org.apache.maven:maven-plugin-api …………………. 2.0 … Read more

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

Your debug output indicates that Clean is the first thing that it’s trying to run, so I’m guessing it’s failing to download any plugins from central. First off, see if you can download the plugin jar directly in a web browser: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar If that works then your web browser has connectivity to central but maven … Read more

How does maven sort version numbers?

Since version 3.0, Maven uses a consistent system to compare version numbers for both individual versions and version ranges. The system now makes a lot of sense, once you’ve understood a few gotchas. All comparisons are now done by ComparableVersion, which says: mixing of ‘-‘ (dash) and ‘.‘ (dot) separators, transition between characters and digits … Read more

Run a single Maven plugin execution?

As noted in How to execute maven plugin execution directly from command line?, this functionality has been implemented as MNG-5768, and is available in Maven 3.3.1. The change will: extend direct plugin invocation syntax to allow optional @execution-id parameter, e.g., org.apache.maven.plugins:maven-remote-resources-plugin:1.0:process@executionId. So, as long as you give your execution an id: mvn sql:execute@specific-execution-id uses the … Read more

How do I add a project as a dependency of another project?

Assuming the MyEjbProject is not another Maven Project you own or want to build with maven, you could use system dependencies to link to the existing jar file of the project like so <project> … <dependencies> <dependency> <groupId>yourgroup</groupId> <artifactId>myejbproject</artifactId> <version>2.0</version> <scope>system</scope> <systemPath>path/to/myejbproject.jar</systemPath> </dependency> </dependencies> … </project> That said it is usually the better (and preferred … Read more

Maven install error: Dependency could not be resolved

Could not transfer artifact org.apache.maven.plugins:maven-dependency-plugin:pom:2.8 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org It seems like your maven cannot access remote central repository. Check if you have an established internet connection. Check if you can access default maven repo http://repo.maven.apache.org/maven2 in your browser. Check if you have correct configuration in <repositories> and <proxies> in your your … Read more

Is Maven ready for JDK9?

Here is the answer from one Maven PMC member (me): No, it is not. Robert Scholte is working on it. Jigsaw and other stuff introduced a lot of changes. There is no official timeframe where full compat (Maven + official plugins) will be given. The issue you see is actually not Maven but Plexus Archiver. … Read more