dev@glassfish.java.net

Re: How to configure Maven build.id property?

From: Peter Pilgrim <peter.pilgrim_at_gmail.com>
Date: Tue, 19 Mar 2013 10:48:07 +0000

Hi

Let's try a different tack, shall we.

In the project, namely Glassfish main trunk, there are a couple of POM
files, namely:

glassfish-main\appserver\pom.xml
glassfish-main\nucleus\pom.xml

In these POM files, there is a Maven property setting called build.id

<properties>
   ...
  <build.id>${user.name}-private</build.id>
  ...
</properties>


Now if I go the folder of the root project

% cd glassfish-main

and then execute the following command, assume I have a clean project:

% mvn install -DskipTests=true -Dbuild.id=b80-foo

Eventually the entire GlassFish project get builds, the dependencies
generated are *-4.0-SNAPSHOT, which is fine. I am ok with that. How
does 4.0-SNAPSHOT then become *-4.0-b81? I believe that this is
decided by executing the maven deploy, which I do with:

% mvn deploy -DskipTests=true -Dbuild.id=b80-foo

Applying this system property -Dbuild.id=b80-foo at the command line
does *NOT* override the Maven properties in the sub multi-module. I
see no evidence of this. The question, therefore, why does it not
override, and ergo, how does it configured then.

As you read my blog entry http://www.xenonique.co.uk/blog/?p=1088, we
can see that I have hacked the necessary POM files in order to deploy
my own private Artifactory repository and not Maven Central. Who cares
what the target repository it is, anyway? This is supposed to be
OpenSource. I just trying to get GlassFish Embedded so that I can
write this JavaEE 7 book and not have to be dependent on promoted
builds being released.

==////==

-- 
Peter Pilgrim,