Using Maven to just download JARs
You can try this command: mvn dependency:resolve Or just invoke the “install” life cycle as follows: mvn install
You can try this command: mvn dependency:resolve Or just invoke the “install” life cycle as follows: mvn install
This error happens when the loaded class i.e. ClassMetadataReadingVisitor does not respect the contract of inherited abstract class or interface i.e. ClassVisitor. Looks like at load time different versions of the above classes are getting loaded in your case. Seems you have new spring-core jar and old spring-asm jar in your application. ClassMetadataReadingVisitor class is … Read more
A cleaner alternative of putting your config file into a subfolder of src/main/resources would be to enhance your classpath locations. This is extremely easy to do with Maven. For instance, place your property file in a new folder src/main/config, and add the following to your pom: <build> <resources> <resource> <directory>src/main/config</directory> </resource> </resources> </build> From now, … Read more
You can utilize the dependency management mechanism. If you create entries in the <dependencyManagement> section of your pom for spring-security-web and spring-web with the desired 3.1.0 version set the managed version of the artifact will override those specified in the transitive dependency tree. I’m not sure if that really saves you any code, but it … Read more
What’s new in Maven 3? Here is a little compilation of what you can find around the net. Backward compatibility – Maven 3 is backward compatible, that is extremely important (especially for those who experienced the Maven 1 to Maven 2 transition). Versionless parent elements – Maven 3 will remove the need to specify the … Read more
All pom files inherit from the maven super POM http://maven.apache.org/ref/3.0.4/maven-model-builder/super-pom.html which contains this entry: <repositories> <repository> <id>central</id> <name>Central Repository</name> <url>http://repo.maven.apache.org/maven2</url> <layout>default</layout> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> Try setting this in your pom (with <id>central</id>): <repositories> <repository> <id>central</id> <url>http://repo.dev.bloomberg.com/content/groups/public</url> <releases> <enabled>false</enabled> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://repo.dev.bloomberg.com/content/groups/public</url> <releases> <enabled>false</enabled> </releases> </pluginRepository> </pluginRepositories>
The issue may happen while fetching dependencies from a remote repository. In my case, the repository did not need any authentication and it has been resolved by removing the servers section in the settings.xml file: <servers> <server> <id>SomeRepo</id> <username>SomeUN</username> <password>SomePW</password> </server> </servers> ps: I guess your target is mvn clean install instead of maven install … Read more
They moved it (without documenting it as usual) to lib/maven-model-builder-3.0.3.jar:org/apache/maven/model/pom-4.0.0.xml
You have to skip <version> tag in child, but keep the <parent><version> … </parent> tag. http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance One factor to note is that these variables are processed after inheritance as outlined above. This means that if a parent project uses a variable, then its definition in the child, not the parent, will be the one eventually … Read more
The working solution is to specify the empty outputDirectory: <fileSets> <fileSet> <directory>${basedir}/src/main/resources</directory> <outputDirectory></outputDirectory> </fileSet> </fileSets>