You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dreier Ruediger <Ru...@bdal.de> on 2012/05/16 11:24:40 UTC
Getting name of POM file?
Hello!
Is it somehow possible to get the name of the POM file (which might not be POM.xml if Maven was called with –f) inside a POM file (e.g. as parameter for other plugins)?
Thanks for any help,
i.A. Rüdiger Dreier
Project Manager
Bruker Daltonik GmbH
Fahrenheitstr. 4
28359 Bremen, Germany
Phone: +49 421 2205-393
Fax: +49 421 2205-3005
ruediger.dreier@bdal.de<ma...@bdal.de>
www.bruker.com<http://www.bruker.com/>
________________________________
Sitz der Gesellschaft / Registered Office Bremen; Handelsregister Amtsgericht Bremen HRB 8150 / Commercial Register District Court Bremen HRB 8150; Geschäftsführer / Managing Directors: Gerd Hülso, Sebastian Meyer-Plath, Stefan Ruge, Ian Sanders, Ph. D., Dr. Michael Schubert
Haftungsausschluss: Die Bruker Daltonik GmbH ist nicht verantwortlich für die ordnungsgemäße, vollständige und verzögerungsfreie Übertragung der Nachricht. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er unsererseits durch einen Brief oder ein Fax entsprechend bestätigt wird.
Disclaimer: Bruker Daltonik GmbH is not responsible for correct, complete and timely transmission of this message. The content of this e-mail, including any attachments, is only legally binding if confirmed by Bruker Daltonik GmbH by letter or fax
RE: Getting name of POM file?
Posted by Dreier Ruediger <Ru...@bdal.de>.
Hello!
Thanks a lot! It works!
Kind regards,
Ruediger
> -----Original Message-----
> From: Stevo Slavić [mailto:sslavic@gmail.com]
> Sent: Friday, May 18, 2012 14:59
> To: Maven Users List
> Subject: Re: Getting name of POM file?
>
> Thanks Stephen,
>
> So in pom.xml one can reference it using ${project.file}
>
> That property is listed on
> http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide but
> in one of the user comments. Comment points to maven 2 resource as
> reference to where the info was found, here is link to equivalent file in
> Maven 3
> sources:
>
> http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-
> compat/src/main/resources/META-INF/maven/plugin-
> expressions/project.paramdoc.xml?view=markup
>
> Kind regards,
> Stevo.
>
> 2012/5/18 Stephen Connolly <st...@gmail.com>
>
> > MavenProject.getFile()
> >
> > On Wednesday, 16 May 2012, Dreier Ruediger wrote:
> >
> > > Hello!
> > >
> > > Is it somehow possible to get the name of the POM file (which might
> > > not
> > be
> > > POM.xml if Maven was called with -f) inside a POM file (e.g. as
> > > parameter for other plugins)?
> > >
> > >
> > > Thanks for any help,
> > >
> > > i.A. Rüdiger Dreier
> > > Project Manager
> > >
> > > Bruker Daltonik GmbH
> > > Fahrenheitstr. 4
> > > 28359 Bremen, Germany
> > >
> > > Phone: +49 421 2205-393
> > > Fax: +49 421 2205-3005
> > >
> > > ruediger.dreier@bdal.de
> > > <javascript:;><mailto:ruediger.dreier@bdal.de
> > <javascript:;>
> > > >
> > > www.bruker.com<http://www.bruker.com/>
> > >
> > >
> > >
> > > ________________________________
> > > Sitz der Gesellschaft / Registered Office Bremen; Handelsregister
> > > Amtsgericht Bremen HRB 8150 / Commercial Register District Court
> > > Bremen
> > HRB
> > > 8150; Geschäftsführer / Managing Directors: Gerd Hülso, Sebastian
> > > Meyer-Plath, Stefan Ruge, Ian Sanders, Ph. D., Dr. Michael Schubert
> > >
> > > Haftungsausschluss: Die Bruker Daltonik GmbH ist nicht
> > > verantwortlich für die ordnungsgemäße, vollständige und
> > > verzögerungsfreie Übertragung der Nachricht. Der Inhalt der E-Mail
> > > ist nur rechtsverbindlich, wenn er unsererseits durch einen Brief oder ein
> Fax entsprechend bestätigt wird.
> > >
> > > Disclaimer: Bruker Daltonik GmbH is not responsible for correct,
> > > complete and timely transmission of this message. The content of
> > > this e-mail, including any attachments, is only legally binding if
> > > confirmed by Bruker Daltonik GmbH by letter or fax
> > >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Getting name of POM file?
Posted by Stevo Slavić <ss...@gmail.com>.
Thanks Stephen,
So in pom.xml one can reference it using ${project.file}
That property is listed on
http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide but in one
of the user comments. Comment points to maven 2 resource as reference to
where the info was found, here is link to equivalent file in Maven 3
sources:
http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/resources/META-INF/maven/plugin-expressions/project.paramdoc.xml?view=markup
Kind regards,
Stevo.
2012/5/18 Stephen Connolly <st...@gmail.com>
> MavenProject.getFile()
>
> On Wednesday, 16 May 2012, Dreier Ruediger wrote:
>
> > Hello!
> >
> > Is it somehow possible to get the name of the POM file (which might not
> be
> > POM.xml if Maven was called with –f) inside a POM file (e.g. as parameter
> > for other plugins)?
> >
> >
> > Thanks for any help,
> >
> > i.A. Rüdiger Dreier
> > Project Manager
> >
> > Bruker Daltonik GmbH
> > Fahrenheitstr. 4
> > 28359 Bremen, Germany
> >
> > Phone: +49 421 2205-393
> > Fax: +49 421 2205-3005
> >
> > ruediger.dreier@bdal.de <javascript:;><mailto:ruediger.dreier@bdal.de
> <javascript:;>
> > >
> > www.bruker.com<http://www.bruker.com/>
> >
> >
> >
> > ________________________________
> > Sitz der Gesellschaft / Registered Office Bremen; Handelsregister
> > Amtsgericht Bremen HRB 8150 / Commercial Register District Court Bremen
> HRB
> > 8150; Geschäftsführer / Managing Directors: Gerd Hülso, Sebastian
> > Meyer-Plath, Stefan Ruge, Ian Sanders, Ph. D., Dr. Michael Schubert
> >
> > Haftungsausschluss: Die Bruker Daltonik GmbH ist nicht verantwortlich für
> > die ordnungsgemäße, vollständige und verzögerungsfreie Übertragung der
> > Nachricht. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er
> > unsererseits durch einen Brief oder ein Fax entsprechend bestätigt wird.
> >
> > Disclaimer: Bruker Daltonik GmbH is not responsible for correct, complete
> > and timely transmission of this message. The content of this e-mail,
> > including any attachments, is only legally binding if confirmed by Bruker
> > Daltonik GmbH by letter or fax
> >
>
Re: Getting name of POM file?
Posted by Stephen Connolly <st...@gmail.com>.
MavenProject.getFile()
On Wednesday, 16 May 2012, Dreier Ruediger wrote:
> Hello!
>
> Is it somehow possible to get the name of the POM file (which might not be
> POM.xml if Maven was called with –f) inside a POM file (e.g. as parameter
> for other plugins)?
>
>
> Thanks for any help,
>
> i.A. Rüdiger Dreier
> Project Manager
>
> Bruker Daltonik GmbH
> Fahrenheitstr. 4
> 28359 Bremen, Germany
>
> Phone: +49 421 2205-393
> Fax: +49 421 2205-3005
>
> ruediger.dreier@bdal.de <javascript:;><mailto:ruediger.dreier@bdal.de<javascript:;>
> >
> www.bruker.com<http://www.bruker.com/>
>
>
>
> ________________________________
> Sitz der Gesellschaft / Registered Office Bremen; Handelsregister
> Amtsgericht Bremen HRB 8150 / Commercial Register District Court Bremen HRB
> 8150; Geschäftsführer / Managing Directors: Gerd Hülso, Sebastian
> Meyer-Plath, Stefan Ruge, Ian Sanders, Ph. D., Dr. Michael Schubert
>
> Haftungsausschluss: Die Bruker Daltonik GmbH ist nicht verantwortlich für
> die ordnungsgemäße, vollständige und verzögerungsfreie Übertragung der
> Nachricht. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er
> unsererseits durch einen Brief oder ein Fax entsprechend bestätigt wird.
>
> Disclaimer: Bruker Daltonik GmbH is not responsible for correct, complete
> and timely transmission of this message. The content of this e-mail,
> including any attachments, is only legally binding if confirmed by Bruker
> Daltonik GmbH by letter or fax
>
Re: Getting name of POM file?
Posted by Stevo Slavić <ss...@gmail.com>.
Hello Dreier,
Maybe I missed something, but I couldn't find this in maven docs or sources.
Nevertheless, it seems to me that you're trying to solve wrong problem. Why
do you need this info? Couldn't a workaround with same property but
different pom file specific value (one for regular, other for alternative
pom file) be applicable in your use case?
Kind regards,
Stevo.
On Wed, May 16, 2012 at 11:24 AM, Dreier Ruediger
<Ru...@bdal.de>wrote:
> Hello!
>
> Is it somehow possible to get the name of the POM file (which might not be
> POM.xml if Maven was called with –f) inside a POM file (e.g. as parameter
> for other plugins)?
>
>
> Thanks for any help,
>
> i.A. Rüdiger Dreier
> Project Manager
>
> Bruker Daltonik GmbH
> Fahrenheitstr. 4
> 28359 Bremen, Germany
>
> Phone: +49 421 2205-393
> Fax: +49 421 2205-3005
>
> ruediger.dreier@bdal.de<ma...@bdal.de>
> www.bruker.com<http://www.bruker.com/>
>
>
>
> ________________________________
> Sitz der Gesellschaft / Registered Office Bremen; Handelsregister
> Amtsgericht Bremen HRB 8150 / Commercial Register District Court Bremen HRB
> 8150; Geschäftsführer / Managing Directors: Gerd Hülso, Sebastian
> Meyer-Plath, Stefan Ruge, Ian Sanders, Ph. D., Dr. Michael Schubert
>
> Haftungsausschluss: Die Bruker Daltonik GmbH ist nicht verantwortlich für
> die ordnungsgemäße, vollständige und verzögerungsfreie Übertragung der
> Nachricht. Der Inhalt der E-Mail ist nur rechtsverbindlich, wenn er
> unsererseits durch einen Brief oder ein Fax entsprechend bestätigt wird.
>
> Disclaimer: Bruker Daltonik GmbH is not responsible for correct, complete
> and timely transmission of this message. The content of this e-mail,
> including any attachments, is only legally binding if confirmed by Bruker
> Daltonik GmbH by letter or fax
>