I am in the process of porting all of our custom release tools to maven. I have 
written a maven-plugin that I intend to invoke directly from the CLI. Part of 
its dependencies are profiled (the Starteam SDK, to be exact), in order to 
adapt to what binary version the user has installed on its machine. This works 
fine at compile time and I can deploy the plugin without problem. The plugin is 
not referenced by any of our other projects, as it is meant to be used in a 
standalone fashion ("mvn -Dparam=value group:artifact:goal").

Unfortunately, the profiles dont seem to take effect at runtime in the case of 
a direct invocation, whether they are part of the <activeProfiles> in the 
settings.xml or specified through mvn -P "profile". The dependencies are not 
downloaded nor are they put on the classpath, which invariably results in a 
ClassNotFound exception. I've also tried to put the dependencies as static 
entries (non-profiled), with the version ID defined by a ${variable}, with the 
value defined in the profile, but this didn't work either. If the dependency is 
all static (no profiles used, bound to a specific version), it works without a 
hitch.

My first intention was to have a dependency on the DLL themselves, which I 
would have resided in our repository. But since Maven does not (yet?) support 
binary dependencies, this would have required the use of a 
DLL-in-JAR/dependency:unpack hack, which to faces a similar problem of not 
being able to run the "unpack" prior to the execution of the plugin in a direct 
invocation scenario. 

If anybody can think of way to make this work (either the profiled or DLL 
dependency), I'd be interested to hear it! 

Francis Lalonde
Services de trésorerie CGI
514-228-8800 poste 2795


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to