Developers, Developers, Developers! Maksim Sorokin IT Blog

31Aug/100

Maven Release Plugin — Difference Between “preparationGoals” and “goals” in configuration

Maven Release Plugin lets you release your project easily. However, often during release you want to perform some additional goals. For example, copy the artifact to another server.

There are several ways to do that. Among those is possibility to define goals during Maven release by adding goals or preparationGoals in configuration.

What is the difference between those? When you specify goals, you take over the deployment phase. I mean if you want to run some maven task1 task2 and then still continue deploying your released artifact to the repository, you need to specify the following:

  <plugin>
    <artifactId>maven-release-plugin</artifactId>
    <version>2.0</version>
    <configuration>
      <goals>task1 task2 deploy</goals>
    </configuration>
  </plugin>

But if you want to do some additional task, it is better to use preparationGoals. Released artifact anyway will be deployed to the repository, so you don't need to specify deploy explicitly.
Moreover, preprationGoals are activated just before the commit.

Tagged as: , No Comments
1Jul/100

GlassFish 3.0.1 Released!

Actually, while I was messing around with other stuff, I didn't notice, that new GlassFish v3.0.1 was released! Finally, there is a possibility to migrate from nightly builds and use more stable version.