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

Maven dependencyManagement version ignored in transitive dependencies

There is a simple thing. A dependencyManagement does not declare a dependency which is really used it’s only defining versions etc. which can be used. If you define something like this it will not result in a change. <properties> <guava.version>18.0</guava.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${guava.version}</version> </dependency> </dependencies> </dependencyManagement> If you really like to … Read more

How exactly mvn -U works?

It is done only for the artifacts or dependencies referenced by your project. The last check timestamp is stored within local artifact metadata (in your local Maven repository), so Maven can apply different strategies how often to check for updates based on that. The default update interval for snapshots is “daily”. Also see updatePolicy for … Read more

Maven Settings for multiple repositories

you have to setup mirror <mirror> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://internal/nexus/content/repositories/thirdparty</url> </mirror> <mirror> <id>google</id> <mirrorOf>google</mirrorOf> <url>http://google-maven-repository.googlecode.com/svn/repository</url> </mirror> then add internal & external repo <profile> <id>nexus</id> <repositories> <repository> <id>central</id> <name>central</name> <url>http://internal/nexus/content/repositories/thirdparty</url> </repository> <repository> <id>google</id> <name>google</name> <url>http://google-maven-repository.googlecode.com/svn/repository</url> </repository> </repositories> </profile>

Maven archetype plugin doesn’t let .resources in archetype-resources through

The bug seems to be still present in the maven-archetype-plugin v3.0.1 . For those who do not want to downgrade the maven-resource-plugin. I managed to establish a more or less ugly workaround. First you rename the archetype-resources/.gitignore to __gitignore__ then inside the archetype-metadata.xml add <requiredProperties> <requiredProperty key=”gitignore”> <defaultValue>.gitignore</defaultValue> </requiredProperty> </requiredProperties> <fileSets> <fileSet> <directory></directory> <includes> <include>__gitignore__</include> … Read more

Declare Maven dependency as test runtime only

There is no scope that does exactly what you want here; test is the best available option. A test-runtime scope has been requested before (Re: Need for a test-runtime scope?) and the suggested workaround is exactly the ignoreNonCompile configuration you’ve already discovered. dependency:analyze already has some limitations (“some cases are not detected (constants, annotations with … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)