Can't pass -Denv=dev to scm:bootstrap goal

2008-06-17 Thread nicolas.duminil

Greetings,

In a POM, I'm displaying the value of the env variable:

project
.
  build

plugins
  ...
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-antrun-plugin/artifactId
executions
  execution
phaseverify/phase
configuration  
  tasks
echo message=env: ${env}/
  /tasks
/configuration
  /execution
/executions
  /plugin
  .
/plugins
  /build
  ...
/project

When running: mvn -Denv=dev, the displayed line is env: dev as expected.
But if I run it: mvn -Denv=dev scm:bootstrap -DconnectionUrl=...
-Dgoals=..., the display is env: ${env}. As if the -Denv=dev hasn't
given on the command line. Of course, I tried also: mvn scm:bootstrap
-Denv=dev -DconnectionUrl=... -Dgoals=... but the result is the same.

Please help !

Many thanks in advance.

Nicolas
-- 
View this message in context: 
http://www.nabble.com/Can%27t-pass-%22-Denv%3Ddev%22-to-scm%3Abootstrap-goal-tp17912903p17912903.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Redundant profile activation definition in settings.xml and pom

2008-06-16 Thread nicolas.duminil

Greetings,

In my settings.xml file I have the following:

profile
  idenv-dev/id
  activation
  .
  /activation
  .
/profile

In my POM, I have:

project
.
profile
  idenv-prod/id
  build
  ...
  /build
/profile
.
/project

The POM code between build and /build didn't get called and I didn't
understand why. However, running mvn help:active-profiles showed me that
the appropriated profiles was selected. In order to get it working, I needed
to add to the pom the activate.../activate section, already present in
settings.xml. Now my POM looks like this:

project
.
profile
  idenv-prod/id
  activate
 
 /activate
  build
  ...
  /build
/profile
.
/project

Which is a shame as the activate section apears twice: once in settings and
once in the POM. I don't know if that's by design, but it doesn't make much
sense to me, since maven is anyway very un-modular.

I'd be interested to know if I'm wrong or if this is the normal case and, in
this eventuality, why ?

Many thanks in advance,

Nicolas
-- 
View this message in context: 
http://www.nabble.com/Redundant-profile-activation-definition-in-settings.xml-and-pom-tp17863825p17863825.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Goal doesn't get called after having been moved from pom build to profile build

2008-06-13 Thread nicolas.duminil

Greetings,

I'm using maven 2.0.8 since a couple of weeks and I have a strange
behaviour. I have the following POM:

project

  build
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.0/version
executions
  execution
phaseinstall/phase
configuration
.
/configuration
goals
  goalexec/goal
/goals
  /execution
/executions
  /plugin
/plugins
  /build
  ..
/project

The exec goal of the plugin gets called and executes correctly. Now I'm
moving the execution in the profile build:

project

  build
  .
  /build
  profiles
profile
  idprof1/id
  build
plugins
  plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
version1.0/version
executions
  execution
phaseinstall/phase
configuration
.
/configuration
goals
  goalexec/goal
/goals
  /execution
/executions
  /plugin
/plugins
  /build
/profile
  /profiles
  ..
/project

Now, the exec goal doesn't get called any more. Everything happens as if the
profile prof1 is not active. However, doing mvn help:active-profiles
displays prof1. What I'm doing wrong ?

Many thanks in advance,

Nicolas

-- 
View this message in context: 
http://www.nabble.com/Goal-doesn%27t-get-called-after-having-been-moved-from-pom-build-to-profile-build-tp17825923p17825923.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to execute a script in maven2 ?

2008-06-05 Thread nicolas.duminil

Greetings,

I need to execute a script (bat, cmd, sh, etc.) in maven and I don't find
anything. I can execute a Java app but don't know how to launch a .bat file.
Please help.

Kind regards,

Nicolas
-- 
View this message in context: 
http://www.nabble.com/How-to-execute-a-script-in-maven2---tp17670955p17670955.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]