Re: Profile Activation Help?

2009-08-11 Thread Stephen Connolly
Are you saying that if you do sth like this:

project
  ...
  profiles
...
profile
  idchanges-report/id
  activation
...
  /activation
  build
plugins
  plugin
groupId.../groupId
artifactId.../artifactId
version.../version
inheritedfalse/inherited
executions
  execution
idproduce-changes-report/id
phase!-- I don't know where you want this, either
--site!-- or --deploy/phase
goals
  goaldo-the-changes-report-mojo/goal
/goals
configuration
  ...
/configutation
  /execution
/executions
  /plugin
 /plugins
   /build
 /profile
 ...
  /profiles
  ...
/project

That the plugin gets executed in the child modules or have you been
trying to run the mojo from the CLI rather than integrating it into the
lifecycle

-Stephen

2009/8/11 David C. Hicks dhi...@i-hicks.org

 Hi Stephen,

 I tried that, but it didn't seem to work.  The plugin still tried to
 execute for the sub-modules.  I ended up punting.  I run my
 changes:announcement-mail goal in a completely separate Maven run after
 my build is completed, but I give it the -N switch to keep it from
 running child modules.

 Dave

 PS - maybe there is a bug that I should write up a JIRA for?  I'm
 uncomfortable doing that since I don't know for sure that I had things
 configured correctly.

 Stephen Connolly wrote:
  Just define all the _*plugins*_ in your profile as
  inheritedfalse/inherited
 
  2009/8/10 David C. Hicks dhi...@i-hicks.org
 
 
  I take it back.  That doesn't help me, either.
  I guess once the profile has been activated at the parent POM level, it
  stays that way for all the children.
 
  David C. Hicks wrote:
 
  I must have been blind when reading through my MDG last night.  I found
  what I believe will be my solution.
 
  activation
 file
existssrc/changes/changes.xml/exists
 /file
  /activation
 
  Since this is the only module that will have a changes.xml file, this
  should do the trick for me.  I thought I'd share what I found for
 
  posterity.
 
  Dave
 
  David C. Hicks wrote:
 
 
  I'm trying to get a profile to activate for my parent project but not
  for the children.  Unfortunately, the children inherit from the parent
  to get dependency information.  So, they also inherit everything else.
  My solution (or so I thought) was to use the project.artifactId
 property
  in my activation section...
 
  activation
  activeByDefaultfalse/activeByDefault
  property
  nameproject.artifactId/name
  valuesalient/value
  /property
  /activation
 
  Since only the parent project has this artifact Id, I assumed that it
  would activate only for the parent.  However, there was no activation
 of
  this profile at all.
 
  My overall goal is to try to get the maven-changes-plugin to do an
  announcement email using changes.xml in the parent project.  I do not
  want announcements for all of the children, though.
 
  Any help?
  Thanks,
  Dave
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
 



Re: Profile Activation Help?

2009-08-11 Thread Stephen Connolly
That is correct.  The build plan is evaluated prior to any plugins
executing... therefore profile activation must be decided up front

AFAIK Maven 3 may be able to fix this somewhat

-Stephen

2009/8/11 David C. Hicks dhi...@i-hicks.org

 Then my experience, I would say, confirms that for both of us.  My file
 *is* in the top-level, and I found that the profile was activated for
 all modules.  I had arrived at the same conclusion that they are
 evaluated once, at the start of execution.


 Benson Margulies wrote:
  You may be walking into a trap in a multi-module project. It is my
  strong impression that activation decisions are not made
  module-by-module in the reactor, but only once. When I tried what you
  tried I found that, since the top-level project with the modules in it
  didn't have the file, the profile was never active when running maven
  from top-level.
 
  On Mon, Aug 10, 2009 at 3:28 PM, David C. Hicksdhi...@i-hicks.org
 wrote:
 
  I must have been blind when reading through my MDG last night.  I found
  what I believe will be my solution.
 
 activation
file
   existssrc/changes/changes.xml/exists
/file
 /activation
 
  Since this is the only module that will have a changes.xml file, this
  should do the trick for me.  I thought I'd share what I found for
 posterity.
  Dave
 
  David C. Hicks wrote:
 
  I'm trying to get a profile to activate for my parent project but not
  for the children.  Unfortunately, the children inherit from the parent
  to get dependency information.  So, they also inherit everything else.
  My solution (or so I thought) was to use the project.artifactId
 property
  in my activation section...
 
  activation
  activeByDefaultfalse/activeByDefault
  property
  nameproject.artifactId/name
  valuesalient/value
  /property
  /activation
 
  Since only the parent project has this artifact Id, I assumed that it
  would activate only for the parent.  However, there was no activation
 of
  this profile at all.
 
  My overall goal is to try to get the maven-changes-plugin to do an
  announcement email using changes.xml in the parent project.  I do not
  want announcements for all of the children, though.
 
  Any help?
  Thanks,
  Dave
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 



Re: Profile Activation Help?

2009-08-11 Thread David C. Hicks
Yes.  I also tried adding the inherited tag with the plugin defined in
the build section (not as a profile).  I got the same result.  The
children still executed the plugin.  I defined it to execute on the
deploy phase.

Stephen Connolly wrote:
 Are you saying that if you do sth like this:

 project
   ...
   profiles
 ...
 profile
   idchanges-report/id
   activation
 ...
   /activation
   build
 plugins
   plugin
 groupId.../groupId
 artifactId.../artifactId
 version.../version
 inheritedfalse/inherited
 executions
   execution
 idproduce-changes-report/id
 phase!-- I don't know where you want this, either
 --site!-- or --deploy/phase
 goals
   goaldo-the-changes-report-mojo/goal
 /goals
 configuration
   ...
 /configutation
   /execution
 /executions
   /plugin
  /plugins
/build
  /profile
  ...
   /profiles
   ...
 /project

 That the plugin gets executed in the child modules or have you been
 trying to run the mojo from the CLI rather than integrating it into the
 lifecycle

 -Stephen


   

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Profile Activation Help?

2009-08-10 Thread David C. Hicks
I'm trying to get a profile to activate for my parent project but not
for the children.  Unfortunately, the children inherit from the parent
to get dependency information.  So, they also inherit everything else. 
My solution (or so I thought) was to use the project.artifactId property
in my activation section...

activation
activeByDefaultfalse/activeByDefault
property
nameproject.artifactId/name
valuesalient/value
/property
/activation

Since only the parent project has this artifact Id, I assumed that it
would activate only for the parent.  However, there was no activation of
this profile at all.

My overall goal is to try to get the maven-changes-plugin to do an
announcement email using changes.xml in the parent project.  I do not
want announcements for all of the children, though.

Any help?
Thanks,
Dave


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



RE: Profile Activation Help?

2009-08-10 Thread Jonathan Woods
${project.artifactId} might help.

Jon 

 -Original Message-
 From: David C. Hicks [mailto:dhi...@i-hicks.org] 
 Sent: 10 August 2009 18:12
 To: Maven Users
 Subject: Profile Activation Help?
 
 I'm trying to get a profile to activate for my parent project 
 but not for the children.  Unfortunately, the children 
 inherit from the parent to get dependency information.  So, 
 they also inherit everything else. 
 My solution (or so I thought) was to use the 
 project.artifactId property in my activation section...
 
 activation
 activeByDefaultfalse/activeByDefault
 property
 nameproject.artifactId/name
 valuesalient/value
 /property
 /activation
 
 Since only the parent project has this artifact Id, I assumed 
 that it would activate only for the parent.  However, there 
 was no activation of this profile at all.
 
 My overall goal is to try to get the maven-changes-plugin to 
 do an announcement email using changes.xml in the parent 
 project.  I do not want announcements for all of the children, though.
 
 Any help?
 Thanks,
 Dave
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Profile Activation Help?

2009-08-10 Thread David C. Hicks
That would substitute the actual name of the artifact in the name tag,
though, wouldn't it?

Jonathan Woods wrote:
 ${project.artifactId} might help.

 Jon 

   
 -Original Message-
 From: David C. Hicks [mailto:dhi...@i-hicks.org] 
 Sent: 10 August 2009 18:12
 To: Maven Users
 Subject: Profile Activation Help?

 I'm trying to get a profile to activate for my parent project 
 but not for the children.  Unfortunately, the children 
 inherit from the parent to get dependency information.  So, 
 they also inherit everything else. 
 My solution (or so I thought) was to use the 
 project.artifactId property in my activation section...

 activation
 activeByDefaultfalse/activeByDefault
 property
 nameproject.artifactId/name
 valuesalient/value
 /property
 /activation

 Since only the parent project has this artifact Id, I assumed 
 that it would activate only for the parent.  However, there 
 was no activation of this profile at all.

 My overall goal is to try to get the maven-changes-plugin to 
 do an announcement email using changes.xml in the parent 
 project.  I do not want announcements for all of the children, though.

 Any help?
 Thanks,
 Dave


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org

 


 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org

   

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Profile Activation Help?

2009-08-10 Thread David C. Hicks
I must have been blind when reading through my MDG last night.  I found
what I believe will be my solution.

activation
   file
  existssrc/changes/changes.xml/exists
   /file
/activation

Since this is the only module that will have a changes.xml file, this
should do the trick for me.  I thought I'd share what I found for posterity.
Dave

David C. Hicks wrote:
 I'm trying to get a profile to activate for my parent project but not
 for the children.  Unfortunately, the children inherit from the parent
 to get dependency information.  So, they also inherit everything else. 
 My solution (or so I thought) was to use the project.artifactId property
 in my activation section...

 activation
 activeByDefaultfalse/activeByDefault
 property
 nameproject.artifactId/name
 valuesalient/value
 /property
 /activation

 Since only the parent project has this artifact Id, I assumed that it
 would activate only for the parent.  However, there was no activation of
 this profile at all.

 My overall goal is to try to get the maven-changes-plugin to do an
 announcement email using changes.xml in the parent project.  I do not
 want announcements for all of the children, though.

 Any help?
 Thanks,
 Dave

   

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Profile Activation Help?

2009-08-10 Thread David C. Hicks
I take it back.  That doesn't help me, either.
I guess once the profile has been activated at the parent POM level, it
stays that way for all the children.

David C. Hicks wrote:
 I must have been blind when reading through my MDG last night.  I found
 what I believe will be my solution.

 activation
file
   existssrc/changes/changes.xml/exists
/file
 /activation

 Since this is the only module that will have a changes.xml file, this
 should do the trick for me.  I thought I'd share what I found for posterity.
 Dave

 David C. Hicks wrote:
   
 I'm trying to get a profile to activate for my parent project but not
 for the children.  Unfortunately, the children inherit from the parent
 to get dependency information.  So, they also inherit everything else. 
 My solution (or so I thought) was to use the project.artifactId property
 in my activation section...

 activation
 activeByDefaultfalse/activeByDefault
 property
 nameproject.artifactId/name
 valuesalient/value
 /property
 /activation

 Since only the parent project has this artifact Id, I assumed that it
 would activate only for the parent.  However, there was no activation of
 this profile at all.

 My overall goal is to try to get the maven-changes-plugin to do an
 announcement email using changes.xml in the parent project.  I do not
 want announcements for all of the children, though.

 Any help?
 Thanks,
 Dave

   
 

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Profile Activation Help?

2009-08-10 Thread Stephen Connolly
Just define all the _*plugins*_ in your profile as
inheritedfalse/inherited

2009/8/10 David C. Hicks dhi...@i-hicks.org

 I take it back.  That doesn't help me, either.
 I guess once the profile has been activated at the parent POM level, it
 stays that way for all the children.

 David C. Hicks wrote:
  I must have been blind when reading through my MDG last night.  I found
  what I believe will be my solution.
 
  activation
 file
existssrc/changes/changes.xml/exists
 /file
  /activation
 
  Since this is the only module that will have a changes.xml file, this
  should do the trick for me.  I thought I'd share what I found for
 posterity.
  Dave
 
  David C. Hicks wrote:
 
  I'm trying to get a profile to activate for my parent project but not
  for the children.  Unfortunately, the children inherit from the parent
  to get dependency information.  So, they also inherit everything else.
  My solution (or so I thought) was to use the project.artifactId property
  in my activation section...
 
  activation
  activeByDefaultfalse/activeByDefault
  property
  nameproject.artifactId/name
  valuesalient/value
  /property
  /activation
 
  Since only the parent project has this artifact Id, I assumed that it
  would activate only for the parent.  However, there was no activation of
  this profile at all.
 
  My overall goal is to try to get the maven-changes-plugin to do an
  announcement email using changes.xml in the parent project.  I do not
  want announcements for all of the children, though.
 
  Any help?
  Thanks,
  Dave
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org




Re: Profile Activation Help?

2009-08-10 Thread David C. Hicks
Hi Stephen,

I tried that, but it didn't seem to work.  The plugin still tried to
execute for the sub-modules.  I ended up punting.  I run my
changes:announcement-mail goal in a completely separate Maven run after
my build is completed, but I give it the -N switch to keep it from
running child modules.

Dave

PS - maybe there is a bug that I should write up a JIRA for?  I'm
uncomfortable doing that since I don't know for sure that I had things
configured correctly. 

Stephen Connolly wrote:
 Just define all the _*plugins*_ in your profile as
 inheritedfalse/inherited

 2009/8/10 David C. Hicks dhi...@i-hicks.org

   
 I take it back.  That doesn't help me, either.
 I guess once the profile has been activated at the parent POM level, it
 stays that way for all the children.

 David C. Hicks wrote:
 
 I must have been blind when reading through my MDG last night.  I found
 what I believe will be my solution.

 activation
file
   existssrc/changes/changes.xml/exists
/file
 /activation

 Since this is the only module that will have a changes.xml file, this
 should do the trick for me.  I thought I'd share what I found for
   
 posterity.
 
 Dave

 David C. Hicks wrote:

   
 I'm trying to get a profile to activate for my parent project but not
 for the children.  Unfortunately, the children inherit from the parent
 to get dependency information.  So, they also inherit everything else.
 My solution (or so I thought) was to use the project.artifactId property
 in my activation section...

 activation
 activeByDefaultfalse/activeByDefault
 property
 nameproject.artifactId/name
 valuesalient/value
 /property
 /activation

 Since only the parent project has this artifact Id, I assumed that it
 would activate only for the parent.  However, there was no activation of
 this profile at all.

 My overall goal is to try to get the maven-changes-plugin to do an
 announcement email using changes.xml in the parent project.  I do not
 want announcements for all of the children, though.

 Any help?
 Thanks,
 Dave



 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


 

   


Re: Profile Activation Help?

2009-08-10 Thread Benson Margulies
You may be walking into a trap in a multi-module project. It is my
strong impression that activation decisions are not made
module-by-module in the reactor, but only once. When I tried what you
tried I found that, since the top-level project with the modules in it
didn't have the file, the profile was never active when running maven
from top-level.

On Mon, Aug 10, 2009 at 3:28 PM, David C. Hicksdhi...@i-hicks.org wrote:
 I must have been blind when reading through my MDG last night.  I found
 what I believe will be my solution.

    activation
       file
          existssrc/changes/changes.xml/exists
       /file
    /activation

 Since this is the only module that will have a changes.xml file, this
 should do the trick for me.  I thought I'd share what I found for posterity.
 Dave

 David C. Hicks wrote:
 I'm trying to get a profile to activate for my parent project but not
 for the children.  Unfortunately, the children inherit from the parent
 to get dependency information.  So, they also inherit everything else.
 My solution (or so I thought) was to use the project.artifactId property
 in my activation section...

                 activation
                     activeByDefaultfalse/activeByDefault
                     property
                         nameproject.artifactId/name
                         valuesalient/value
                     /property
                 /activation

 Since only the parent project has this artifact Id, I assumed that it
 would activate only for the parent.  However, there was no activation of
 this profile at all.

 My overall goal is to try to get the maven-changes-plugin to do an
 announcement email using changes.xml in the parent project.  I do not
 want announcements for all of the children, though.

 Any help?
 Thanks,
 Dave



 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Profile Activation Help?

2009-08-10 Thread David C. Hicks
Then my experience, I would say, confirms that for both of us.  My file
*is* in the top-level, and I found that the profile was activated for
all modules.  I had arrived at the same conclusion that they are
evaluated once, at the start of execution.


Benson Margulies wrote:
 You may be walking into a trap in a multi-module project. It is my
 strong impression that activation decisions are not made
 module-by-module in the reactor, but only once. When I tried what you
 tried I found that, since the top-level project with the modules in it
 didn't have the file, the profile was never active when running maven
 from top-level.

 On Mon, Aug 10, 2009 at 3:28 PM, David C. Hicksdhi...@i-hicks.org wrote:
   
 I must have been blind when reading through my MDG last night.  I found
 what I believe will be my solution.

activation
   file
  existssrc/changes/changes.xml/exists
   /file
/activation

 Since this is the only module that will have a changes.xml file, this
 should do the trick for me.  I thought I'd share what I found for posterity.
 Dave

 David C. Hicks wrote:
 
 I'm trying to get a profile to activate for my parent project but not
 for the children.  Unfortunately, the children inherit from the parent
 to get dependency information.  So, they also inherit everything else.
 My solution (or so I thought) was to use the project.artifactId property
 in my activation section...

 activation
 activeByDefaultfalse/activeByDefault
 property
 nameproject.artifactId/name
 valuesalient/value
 /property
 /activation

 Since only the parent project has this artifact Id, I assumed that it
 would activate only for the parent.  However, there was no activation of
 this profile at all.

 My overall goal is to try to get the maven-changes-plugin to do an
 announcement email using changes.xml in the parent project.  I do not
 want announcements for all of the children, though.

 Any help?
 Thanks,
 Dave


   
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org


 

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org