maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <>
Subject Using Maven Invoker
Date Fri, 23 Aug 2013 03:37:49 GMT
Maybe I'm just not thinking the Maven way . . .

My ultimate goal is to create a web form driven application that allows 
some slight customization of another web application delivered as a WAR 
file. The bulk of that application consists of a WAR overlay, and the 
user ends up creating two files to add to that overlay.

I can do this by hand, and all works as expected.

In order to start out with this, I thought I would write a small program 
to create an artifact and then build it.

I'm using maven invoker and that seems to do what I need, except I'm 
unable to do two things.

1. read profiles
InvocationRequest request = new DefaultInvocationRequest();
List<String> profiles = request.getProfiles(); // profiles is null

I have some profiles in ~.m2/settings.xml, and one is set active since 
it controls all my proxy settings.

2. Specify directories

I would like to specify the directory where archetype:generate is run, 
and I would like to specify where the target gets placed. I would 
happily settle for the first, since I know that the resulting WAR file 
will be in target.

I'm running this against Maven 3.1 with JDK 1.7.0_25 on Windows at the 
moment. The target system will be running Linux, but it's Maven so that 
shouldn't matter.

I've tried (rather naively) to set the basedir property by loading a 
Properties object into the request, but that seemed to have no effect.

I was hoping to set the build directory in a profile, but I don't seem 
to be reading profiles.

Input (including don't do this admonitions) happily taken.

. . . . just my two cents.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message