How do I add time-stamp information to Maven artifacts?

Maven versions 2.1.0-M1 or newer have built in special variable maven.build.timestamp. <build> <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName> </build> See Maven documentation for more details. For older Maven versions a look at maven-timestamp-plugin or buildnumber-maven-plugin. If you use maven-timestamp-plugin, you can use something like this to manipulate resulting artifact name. <build> <finalName>${project.artifactId}-${project.version}-${timestamp}</finalName> </build> And this configuration for buildnumber-maven-plugin should create … Read more

ant depends vs. antcall

The biggest difference is that Ant will ensure that dependencies declared via depends are called at most once. For example: <target name=”a” /> <target name=”b” depends=”a” /> <target name=”c” depends=”a” /> <target name=”d” depends=”b, c” /> If I call target d, b and c are called. However, a is only called once (even though both … Read more

Ant to Maven – multiple build targets

You could do this with profiles… If you really wanted to use two separate profiles and customize the JAR plugin to include and exclude patterns of class and package names, you could easily do this by putting something like this in your POM: <profiles> <profile> <id>everything</id> <build> <plugins> <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <classifier>everything</classifier> <includes> <include>**/*</include> </includes> … Read more

define ant property from environment with default value

An example from the Ant documentation of how to get an environment variable into a property: <property environment=”env”/> <echo message=”Number of Processors = ${env.NUMBER_OF_PROCESSORS}”/> <echo message=”ANT_HOME is set to = ${env.ANT_HOME}”/> In your case, you would use ${env.RELEASE_VER}. Then for the conditional part, the documentation here says that there are three possible attributes: Attribute Description … Read more

Maven or Ivy? Which one is better with a system already in production? And the other differences? [closed]

First of all, read the Ivy / Maven comparison from the Ivy website. The key information: First, the most important difference is that they aren’t at all the same kind of tools. Apache Maven is a software project management and comprehension tool, whereas Apache Ivy is only a dependency management tool, highly integrated with Apache … Read more