Laura,

If it's an Ant mojo, you can do something like the following in the
foo.mojos.xml:

      <parameters>
      
        <parameter>
          <name>M2 local repo dir</name> 
          <property>settings.localRepository</property>
          <readonly>true</readonly>
          <defaultValue>${settings.localRepository}</defaultValue>
          <description>the path to the M2 local repository</description>
        </parameter>
      
        ...
  
      </parameters>

This will pass the settings.localRepository property into the
foo.build.xml Ant script as a parameter to the target corresponding to
the mojo goal. You could possibly also pass the entire settings bean,
but I have not attempted that.

I'm not sure how to pass a setting, or all of the settings, into a Java
mojo. If that's what you need to do, hopefully someone else will chime
in.

Ian

| -----Original Message-----
| From: Laura Hinojosa [mailto:[EMAIL PROTECTED] 
| Sent: Friday, September 29, 2006 8:57 AM
| To: users@maven.apache.org
| Subject: Is it possible to access the Users settings from a Mojo??
| 
| 
| 
| Is it possible to access the Users settings from a Mojo??
| 
| Thanks
| 
| Laura
| 
| ------------------------------------------------
| 
| This e-mail, and any attachments thereto, is confidential and 
| is intended only for the individual(s) named.  If you are not 
| the intended recipient, please let us know by e-mail reply 
| and delete it from your system; do not copy/save this e-mail 
| or disclose its contents to anyone.  E-mail transmissions 
| cannot be guaranteed to be secure or error-free as the 
| transmission could be interrupted, corrupted, lost, 
| destroyed, altered, arrive late or contain viruses.  
| ObjectWave does not accept liability for any errors or 
| omissions in the contents of this e-mail which arise as a 
| result of e-mail transmission.  The views expressed in this 
| e-mail do not necessarily reflect those of ObjectWave or its 
| affiliates.
| 
| ------------------------------------------------
| 
| 
| 

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

Reply via email to