You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by fyzahmd <fy...@gmail.com> on 2013/03/10 09:09:50 UTC

Changing groupID,artifactID of pom.xml using maven-properties-plugin

Hi All,

Is it possible to change the groupID and artifactID of the same
pom.xml(fetching the properties from a abc.properties file) in which i am
using  the  properties-maven-plugin  ?


Thanks and Regards,
Fayaz ahamed.



--
View this message in context: http://maven.40175.n5.nabble.com/Changing-groupID-artifactID-of-pom-xml-using-maven-properties-plugin-tp5750255.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


RE: Changing groupID,artifactID of pom.xml using maven-properties-plugin

Posted by Martin Gainty <mg...@hotmail.com>.
use Archetype to create your poms as Baptiste and Wayne has suggested
http://maven.apache.org/guides/introduction/introduction-to-archetypes.html
IF the archetype creation mechanism does not properly create your your pom.xmlTHEN  we should consider other environments such as gradle,velocity,ftl to create your environment for you.....
Remember when you configure non-maven-template-tool you must make first confirm that tool is configured correctly for each possible environment permutation where you wish to run the template-tool to generate your template..
http://irregularexpression.blogspot.com/2010/01/create-new-maven-archetype-from.html
Martin ______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > Date: Sun, 10 Mar 2013 18:45:33 +0100
> Subject: Re: Changing groupID,artifactID of pom.xml using maven-properties-plugin
> From: ml@batmat.net
> To: users@maven.apache.org
> 
> Hi Fayaz,
> From what you describe, it seems to me you should have a look at the
> maven-archetype-plugin.
> 
> Archetypes are templates in the standard Maven way.
> 
> Hope that helps.
> 
> Cheers
> Le 10 mars 2013 16:32, "fyzahmd" <fy...@gmail.com> a écrit :
> 
> > Hi Baptiste,
> >
> > Thanks for your response.
> >
> > I want to create a pom.xml (a general template) such that all the
> > configurable parameters can be picked up from a .properties during the
> > maven
> > build .I don't want to search for the same tags in the pom.xml and edit
> > them.Is there a way in Maven through which i can acheive this ?
> >
> >
> > Thanks and Regards,
> > Fayaz ahamed.
> >
> >
> >
> > --
> > View this message in context:
> > http://maven.40175.n5.nabble.com/Changing-groupID-artifactID-of-pom-xml-using-maven-properties-plugin-tp5750255p5750281.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
 		 	   		  

Re: Changing groupID,artifactID of pom.xml using maven-properties-plugin

Posted by Baptiste MATHUS <ml...@batmat.net>.
Hi Fayaz,
>From what you describe, it seems to me you should have a look at the
maven-archetype-plugin.

Archetypes are templates in the standard Maven way.

Hope that helps.

Cheers
Le 10 mars 2013 16:32, "fyzahmd" <fy...@gmail.com> a écrit :

> Hi Baptiste,
>
> Thanks for your response.
>
> I want to create a pom.xml (a general template) such that all the
> configurable parameters can be picked up from a .properties during the
> maven
> build .I don't want to search for the same tags in the pom.xml and edit
> them.Is there a way in Maven through which i can acheive this ?
>
>
> Thanks and Regards,
> Fayaz ahamed.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Changing-groupID-artifactID-of-pom-xml-using-maven-properties-plugin-tp5750255p5750281.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Changing groupID,artifactID of pom.xml using maven-properties-plugin

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Fayaz,

> I want to create a pom.xml (a general template) such that all the
> configurable parameters can be picked up from a .properties during the
> maven build .

If you really need to code generate Maven projects in this way, perhaps you
would be better served doing it outside Maven itself. For example, you
could have a shell or Ant script that calls a templating engine such as
Velocity (Java) or Genshi (Python) to do the actual code generation. The
you can call Maven on your freshly generated multi-module build like usual.

Regards,
Curtis


On Sun, Mar 10, 2013 at 10:31 AM, fyzahmd <fy...@gmail.com> wrote:

> Hi Baptiste,
>
> Thanks for your response.
>
> I want to create a pom.xml (a general template) such that all the
> configurable parameters can be picked up from a .properties during the
> maven
> build .I don't want to search for the same tags in the pom.xml and edit
> them.Is there a way in Maven through which i can acheive this ?
>
>
> Thanks and Regards,
> Fayaz ahamed.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Changing-groupID-artifactID-of-pom-xml-using-maven-properties-plugin-tp5750255p5750281.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Changing groupID,artifactID of pom.xml using maven-properties-plugin

Posted by Wayne Fay <wa...@gmail.com>.
> I want to create a pom.xml (a general template) such that all the
> configurable parameters can be picked up from a .properties during the maven
> build .I don't want to search for the same tags in the pom.xml and edit
> them.Is there a way in Maven through which i can acheive this ?

This is contrary to the way 99.99% of people use Maven, so you are
bound to find this is a difficult path forward. Good luck, and come
back when you abandon it so we can give useful and practical advice on
using Maven.

Wayne

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


Re: Changing groupID,artifactID of pom.xml using maven-properties-plugin

Posted by fyzahmd <fy...@gmail.com>.
Hi Baptiste,

Thanks for your response.

I want to create a pom.xml (a general template) such that all the
configurable parameters can be picked up from a .properties during the maven
build .I don't want to search for the same tags in the pom.xml and edit
them.Is there a way in Maven through which i can acheive this ?


Thanks and Regards,
Fayaz ahamed.



--
View this message in context: http://maven.40175.n5.nabble.com/Changing-groupID-artifactID-of-pom-xml-using-maven-properties-plugin-tp5750255p5750281.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Changing groupID,artifactID of pom.xml using maven-properties-plugin

Posted by Baptiste MATHUS <ml...@batmat.net>.
Hi,
It's not possible. Those attributes won't get resolved if you use variables
inside.

What are you trying to do?

Cheers
Le 10 mars 2013 09:10, "fyzahmd" <fy...@gmail.com> a écrit :

> Hi All,
>
> Is it possible to change the groupID and artifactID of the same
> pom.xml(fetching the properties from a abc.properties file) in which i am
> using  the  properties-maven-plugin  ?
>
>
> Thanks and Regards,
> Fayaz ahamed.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Changing-groupID-artifactID-of-pom-xml-using-maven-properties-plugin-tp5750255.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>