aether

java.lang.ClassNotFoundException: org.sonatype.aether.version.InvalidVersionSpecificationException

核能气质少年 提交于 2019-11-29 11:22:29
问题 I am using the maven indexer to fetch the maven index from the maven central repository. Since I updated from org.sonatype.aether to org.eclipse.aether and from maven 3.0.5 to maven 3.1.0 I am getting this Exception. Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.version.InvalidVersionSpecificationException at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass

How can you find the latest version of a maven artifact from Java using aether?

て烟熏妆下的殇ゞ 提交于 2019-11-27 02:11:28
Their documentation is really slim and I was unable to figure it out. I found a partial answer here , but it doesn't have all the code. How can you find the latest version of a maven artifact from Java using aether? The Aether Team maintains a demo page with such an example: FindNewestVersion . Simplified a bit, this is what it comes down to. Add to your POM the Aether dependencies: <dependencies> <dependency> <groupId>org.eclipse.aether</groupId> <artifactId>aether-impl</artifactId> <version>${aetherVersion}</version> </dependency> <dependency> <groupId>org.eclipse.aether</groupId>

How can you find the latest version of a maven artifact from Java using aether?

梦想的初衷 提交于 2019-11-26 17:29:13
问题 Their documentation is really slim and I was unable to figure it out. I found a partial answer here, but it doesn't have all the code. How can you find the latest version of a maven artifact from Java using aether? 回答1: The Aether Team maintains a demo page with such an example: FindNewestVersion. Simplified a bit, this is what it comes down to. Add to your POM the Aether dependencies: <dependencies> <dependency> <groupId>org.eclipse.aether</groupId> <artifactId>aether-impl</artifactId>

How to get access to Maven&#39;s dependency hierarchy within a plugin

北城余情 提交于 2019-11-26 09:36:22
问题 In my plugin I need to process the dependency hierarchy and get information (groupId, artifactId, version etc) about each dependency and if it was excluded. What is the best way to do this? 回答1: The dependency plugin has the tree goal that does most of this work. It processes a MavenProject using the DependencyTreeBuilder , this returns a DependencyNode with hierarchical information about the resolved dependencies (and their transitive dependencies). You can copy much of the code directly