You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Néstor Boscán <ne...@gmail.com> on 2015/06/08 01:24:25 UTC
Creating Mojo: Can I have access to the repository information stored
in settings.xml?
Hi
I am creating a mojo that requires to get information on the repositories
stored in settings.xml? Is this possible?
Regards,
Néstor
Re: Creating Mojo: Can I have access to the repository information
stored in settings.xml?
Posted by Dan Tran <da...@gmail.com>.
Take a look at maven-gpg-plugin for example on how to access the
encrypted password/passphase as well
-Dan
On Mon, Jun 8, 2015 at 1:07 PM, Néstor Boscán <ne...@gmail.com> wrote:
> Thanks Anders
>
> That solved the problem!
>
> Regards,
>
> Néstor
>
> On Mon, Jun 8, 2015 at 6:41 AM, Anders Hammar <an...@hammar.net> wrote:
>
> > There's an api for getting a server [1] credentials from the settings
> > config. You should use that.
> >
> > /Anders
> >
> > [1]
> >
> >
> http://maven.apache.org/ref/3.3.3//maven-settings/apidocs/org/apache/maven/settings/Settings.html#getServer(java.lang.String)
> >
> > On Mon, Jun 8, 2015 at 1:05 PM, Néstor Boscán <ne...@gmail.com>
> wrote:
> >
> > > Thanks for your quick answer
> > >
> > > In my case all my developers have the company's repository user and
> > > password configured in settings.xml. I have a code quality tool based
> on
> > a
> > > maven mojo that connects to the company's website using the same
> username
> > > and password. I wanted to see if I coukd extract that user and password
> > > from the settings file.
> > >
> > > Regards,
> > >
> > > Nestor
> > >
> > > On Sunday, June 7, 2015, Dan Tran <da...@gmail.com> wrote:
> > >
> > > > Hi Néstor,
> > > >
> > > > Could you elaborate on your use case? you may not need access to
> maven
> > > > settings to look for repos.
> > > >
> > > > -Dan
> > > >
> > > >
> > > > On Sun, Jun 7, 2015 at 4:24 PM, Néstor Boscán <nestorjb@gmail.com
> > > > <javascript:;>> wrote:
> > > >
> > > > > Hi
> > > > >
> > > > > I am creating a mojo that requires to get information on the
> > > repositories
> > > > > stored in settings.xml? Is this possible?
> > > > >
> > > > > Regards,
> > > > >
> > > > > Néstor
> > > > >
> > > >
> > >
> >
>
Re: Creating Mojo: Can I have access to the repository information
stored in settings.xml?
Posted by Néstor Boscán <ne...@gmail.com>.
Thanks Anders
That solved the problem!
Regards,
Néstor
On Mon, Jun 8, 2015 at 6:41 AM, Anders Hammar <an...@hammar.net> wrote:
> There's an api for getting a server [1] credentials from the settings
> config. You should use that.
>
> /Anders
>
> [1]
>
> http://maven.apache.org/ref/3.3.3//maven-settings/apidocs/org/apache/maven/settings/Settings.html#getServer(java.lang.String)
>
> On Mon, Jun 8, 2015 at 1:05 PM, Néstor Boscán <ne...@gmail.com> wrote:
>
> > Thanks for your quick answer
> >
> > In my case all my developers have the company's repository user and
> > password configured in settings.xml. I have a code quality tool based on
> a
> > maven mojo that connects to the company's website using the same username
> > and password. I wanted to see if I coukd extract that user and password
> > from the settings file.
> >
> > Regards,
> >
> > Nestor
> >
> > On Sunday, June 7, 2015, Dan Tran <da...@gmail.com> wrote:
> >
> > > Hi Néstor,
> > >
> > > Could you elaborate on your use case? you may not need access to maven
> > > settings to look for repos.
> > >
> > > -Dan
> > >
> > >
> > > On Sun, Jun 7, 2015 at 4:24 PM, Néstor Boscán <nestorjb@gmail.com
> > > <javascript:;>> wrote:
> > >
> > > > Hi
> > > >
> > > > I am creating a mojo that requires to get information on the
> > repositories
> > > > stored in settings.xml? Is this possible?
> > > >
> > > > Regards,
> > > >
> > > > Néstor
> > > >
> > >
> >
>
Re: Creating Mojo: Can I have access to the repository information
stored in settings.xml?
Posted by Anders Hammar <an...@hammar.net>.
There's an api for getting a server [1] credentials from the settings
config. You should use that.
/Anders
[1]
http://maven.apache.org/ref/3.3.3//maven-settings/apidocs/org/apache/maven/settings/Settings.html#getServer(java.lang.String)
On Mon, Jun 8, 2015 at 1:05 PM, Néstor Boscán <ne...@gmail.com> wrote:
> Thanks for your quick answer
>
> In my case all my developers have the company's repository user and
> password configured in settings.xml. I have a code quality tool based on a
> maven mojo that connects to the company's website using the same username
> and password. I wanted to see if I coukd extract that user and password
> from the settings file.
>
> Regards,
>
> Nestor
>
> On Sunday, June 7, 2015, Dan Tran <da...@gmail.com> wrote:
>
> > Hi Néstor,
> >
> > Could you elaborate on your use case? you may not need access to maven
> > settings to look for repos.
> >
> > -Dan
> >
> >
> > On Sun, Jun 7, 2015 at 4:24 PM, Néstor Boscán <nestorjb@gmail.com
> > <javascript:;>> wrote:
> >
> > > Hi
> > >
> > > I am creating a mojo that requires to get information on the
> repositories
> > > stored in settings.xml? Is this possible?
> > >
> > > Regards,
> > >
> > > Néstor
> > >
> >
>
Re: Creating Mojo: Can I have access to the repository information
stored in settings.xml?
Posted by Néstor Boscán <ne...@gmail.com>.
Thanks for your quick answer
In my case all my developers have the company's repository user and
password configured in settings.xml. I have a code quality tool based on a
maven mojo that connects to the company's website using the same username
and password. I wanted to see if I coukd extract that user and password
from the settings file.
Regards,
Nestor
On Sunday, June 7, 2015, Dan Tran <da...@gmail.com> wrote:
> Hi Néstor,
>
> Could you elaborate on your use case? you may not need access to maven
> settings to look for repos.
>
> -Dan
>
>
> On Sun, Jun 7, 2015 at 4:24 PM, Néstor Boscán <nestorjb@gmail.com
> <javascript:;>> wrote:
>
> > Hi
> >
> > I am creating a mojo that requires to get information on the repositories
> > stored in settings.xml? Is this possible?
> >
> > Regards,
> >
> > Néstor
> >
>
Re: Creating Mojo: Can I have access to the repository information
stored in settings.xml?
Posted by Dan Tran <da...@gmail.com>.
Hi Néstor,
Could you elaborate on your use case? you may not need access to maven
settings to look for repos.
-Dan
On Sun, Jun 7, 2015 at 4:24 PM, Néstor Boscán <ne...@gmail.com> wrote:
> Hi
>
> I am creating a mojo that requires to get information on the repositories
> stored in settings.xml? Is this possible?
>
> Regards,
>
> Néstor
>