Do you know the hidden options that come with Maven2?
You should use the configurations.xml to pressure ALL maven develops running in your local machine also to make use of a in your area installed maven proxy. Saving yourself and also the network time.
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <profile> <id>localcacheproxies</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>localCacheProxy</id> <url>http://my-local-proxy.com/maven-proxy</url> </repository> </repositories> </profile> </profiles>
Observe that the namespace titles within this configurations.xml also provides a decent intellisense instead of other good examples published here. (create in your house directory .m2 folder on home windows, linux and mac and all sorts of os'es)
Have a look at dependency:evaluate too.
With maven-dependency-wordpress plugin you can resolve dependency conflicts and cyclic dependency problems.
Supplment your pom.xml:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> </plugin>
Then run mvn dependency:resolve or mvn dependency:build-classpath to check it.
Much more about the dependency wordpress plugin: http://maven.apache.org/plug ins/maven-dependency-wordpress plugin/howto.html
- project inheritance
- project aggregation
- set up:set up
- confirming (findbugs, checkstyle, clover, pmd, etc)
Sometimes you've got a file that must contain some value that may simply be discovered at build time. Perhaps you have a Java class that inspections to ascertain if the evaluation period expires, and also you define that period as "four weeks following this build was put together". You'll need a method to inject the present date, as well as other property, into the build.
Maven includes a awesome, hidden feature known as blocking (Documentation here). With blocking, you are able to request Maven to search for designs in a few source files and replace all of them with some value, and it is as simple to activate because this:
<build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> </build>
What else could you stick in to the filter? Any atmosphere variable, the majority of the values within the pom file, and knowledge concerning the java compiler. If you alter your version number in Maven, it's not necessary to go find your whatever.qualities file increase your version there, too. You can easily modify it in Maven and you are done.