You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aaron Anderson <ni...@yahoo.com> on 2006/04/20 20:20:01 UTC

Using profile property from settings.xml in plugin with requiresProject=false

I am writing a maven 2 plugin that can be used to invoke some JMX operations on a server and I would like it to be able to be run the plugin from any directory. This plugin has parameters that's values are set from properties set in a profile defined in the settings.xml (bad form, I know). I have added the requiresProject=false annotation to the plugin so I can run it in the absence of a POM file. The plugin works fine when a POM is present. 
   
  However, when I run the plugin without a POM the plugin's parameters thats values are set with expressions that reference the properties from the settings.xml profile are not set. It seems the settings.xml file is not loaded and the active profiles properties are not loaded into the plugin. 
   
  Is this an expected behavior? Even without a POM present the super-pom is loaded so I would think the settings.xml should still be loaded and the profile properties applied to the plugin.

Re: Using profile property from settings.xml in plugin with requiresProject=false

Posted by Wayne Fay <wa...@gmail.com>.
Just to be clear...

Running Maven 2.0.3 does not necessarily mean you are using Maven Help
Plugin 2.0.1 or higher. You can pass the -X parameter to mvn (ie mvn
-X test) to check the versions of plugins (and other dependencies)
being used by Maven while it executes.

Wayne

On 4/22/06, Aaron Anderson <ni...@yahoo.com> wrote:
> Hmm, I am running 2.0.3
>
>  I did some additional debugging and opened up a JIRA issue about the profiles not being loaded in the standaloneSuperProject
>
>  http://jira.codehaus.org/browse/MNG-2236
>
>  Thanks for your help! it is greatly appreciated!!!!!!!!
>
> Alexandre Poitras <al...@gmail.com> wrote:
>  It is fix in the version 2.0.1 so ensure you use the latest one :)
> http://jira.codehaus.org/browse/MPH-11
>
> On 4/22/06, Aaron Anderson wrote:
> > I get a build error:
> >
> > [INFO] Cannot execute mojo: effective-settings. It requires a project with an ex
> > isting pom.xml, but the build is not using one.
> >
> >
> > Alexandre Poitras wrote:
> > What does "mvn help:effective-settings" output?
> >
> > On 4/20/06, Aaron Anderson wrote:
> > > I am writing a maven 2 plugin that can be used to invoke some JMX operations on a server and I would like it to be able to be run the plugin from any directory. This plugin has parameters that's values are set from properties set in a profile defined in the settings.xml (bad form, I know). I have added the requiresProject=false annotation to the plugin so I can run it in the absence of a POM file. The plugin works fine when a POM is present.
> > >
> > > However, when I run the plugin without a POM the plugin's parameters thats values are set with expressions that reference the properties from the settings.xml profile are not set. It seems the settings.xml file is not loaded and the active profiles properties are not loaded into the plugin.
> > >
> > > Is this an expected behavior? Even without a POM present the super-pom is loaded so I would think the settings.xml should still be loaded and the profile properties applied to the plugin.
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>

Re: Using profile property from settings.xml in plugin with requiresProject=false

Posted by Aaron Anderson <ni...@yahoo.com>.
Hmm, I am running 2.0.3
   
  I did some additional debugging and opened up a JIRA issue about the profiles not being loaded in the standaloneSuperProject
   
  http://jira.codehaus.org/browse/MNG-2236
   
  Thanks for your help! it is greatly appreciated!!!!!!!!

Alexandre Poitras <al...@gmail.com> wrote:
  It is fix in the version 2.0.1 so ensure you use the latest one :)
http://jira.codehaus.org/browse/MPH-11

On 4/22/06, Aaron Anderson wrote:
> I get a build error:
>
> [INFO] Cannot execute mojo: effective-settings. It requires a project with an ex
> isting pom.xml, but the build is not using one.
>
>
> Alexandre Poitras wrote:
> What does "mvn help:effective-settings" output?
>
> On 4/20/06, Aaron Anderson wrote:
> > I am writing a maven 2 plugin that can be used to invoke some JMX operations on a server and I would like it to be able to be run the plugin from any directory. This plugin has parameters that's values are set from properties set in a profile defined in the settings.xml (bad form, I know). I have added the requiresProject=false annotation to the plugin so I can run it in the absence of a POM file. The plugin works fine when a POM is present.
> >
> > However, when I run the plugin without a POM the plugin's parameters thats values are set with expressions that reference the properties from the settings.xml profile are not set. It seems the settings.xml file is not loaded and the active profiles properties are not loaded into the plugin.
> >
> > Is this an expected behavior? Even without a POM present the super-pom is loaded so I would think the settings.xml should still be loaded and the profile properties applied to the plugin.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>

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



Re: Using profile property from settings.xml in plugin with requiresProject=false

Posted by Alexandre Poitras <al...@gmail.com>.
It is fix in the version 2.0.1 so ensure you use the latest one :)
http://jira.codehaus.org/browse/MPH-11

On 4/22/06, Aaron Anderson <ni...@yahoo.com> wrote:
> I get a build error:
>
>   [INFO] Cannot execute mojo: effective-settings. It requires a project with an ex
> isting pom.xml, but the build is not using one.
>
>
> Alexandre Poitras <al...@gmail.com> wrote:
>   What does "mvn help:effective-settings" output?
>
> On 4/20/06, Aaron Anderson wrote:
> > I am writing a maven 2 plugin that can be used to invoke some JMX operations on a server and I would like it to be able to be run the plugin from any directory. This plugin has parameters that's values are set from properties set in a profile defined in the settings.xml (bad form, I know). I have added the requiresProject=false annotation to the plugin so I can run it in the absence of a POM file. The plugin works fine when a POM is present.
> >
> > However, when I run the plugin without a POM the plugin's parameters thats values are set with expressions that reference the properties from the settings.xml profile are not set. It seems the settings.xml file is not loaded and the active profiles properties are not loaded into the plugin.
> >
> > Is this an expected behavior? Even without a POM present the super-pom is loaded so I would think the settings.xml should still be loaded and the profile properties applied to the plugin.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>

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


Re: Using profile property from settings.xml in plugin with requiresProject=false

Posted by Aaron Anderson <ni...@yahoo.com>.
I get a build error: 
   
  [INFO] Cannot execute mojo: effective-settings. It requires a project with an ex
isting pom.xml, but the build is not using one.
  

Alexandre Poitras <al...@gmail.com> wrote:
  What does "mvn help:effective-settings" output?

On 4/20/06, Aaron Anderson wrote:
> I am writing a maven 2 plugin that can be used to invoke some JMX operations on a server and I would like it to be able to be run the plugin from any directory. This plugin has parameters that's values are set from properties set in a profile defined in the settings.xml (bad form, I know). I have added the requiresProject=false annotation to the plugin so I can run it in the absence of a POM file. The plugin works fine when a POM is present.
>
> However, when I run the plugin without a POM the plugin's parameters thats values are set with expressions that reference the properties from the settings.xml profile are not set. It seems the settings.xml file is not loaded and the active profiles properties are not loaded into the plugin.
>
> Is this an expected behavior? Even without a POM present the super-pom is loaded so I would think the settings.xml should still be loaded and the profile properties applied to the plugin.
>
>

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



Re: Using profile property from settings.xml in plugin with requiresProject=false

Posted by Alexandre Poitras <al...@gmail.com>.
What does "mvn help:effective-settings" output?

On 4/20/06, Aaron Anderson <ni...@yahoo.com> wrote:
> I am writing a maven 2 plugin that can be used to invoke some JMX operations on a server and I would like it to be able to be run the plugin from any directory. This plugin has parameters that's values are set from properties set in a profile defined in the settings.xml (bad form, I know). I have added the requiresProject=false annotation to the plugin so I can run it in the absence of a POM file. The plugin works fine when a POM is present.
>
>   However, when I run the plugin without a POM the plugin's parameters thats values are set with expressions that reference the properties from the settings.xml profile are not set. It seems the settings.xml file is not loaded and the active profiles properties are not loaded into the plugin.
>
>   Is this an expected behavior? Even without a POM present the super-pom is loaded so I would think the settings.xml should still be loaded and the profile properties applied to the plugin.
>
>

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