You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by John Farrell <Fa...@cat.com> on 2003/08/19 03:31:25 UTC
pom.id has a : in it?
If I write this in my maven.xml:
] <goal name="blah"><echo>${pom.id}</echo></goal>
I get:
]$ maven blah
]blah:
] [echo] mp-util:mp-util
My project.xml has this in it:
] <!-- a unique name for this project -->
] <id>mp-util</id>
I definitely expected pom.id to give me just "mp-util", instead of
"mp-util:mp-util". Why are my expectations wrong?
I can fix it:
] <j:set var="id" value="${pom.id}" />
] <j:set var="id" value="${id.substring(0,id.indexOf(':'))}" />
] <echo>id = ${id}</echo>
but I don't get it. Thanks for clues.
John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: pom.id has a : in it?
Posted by John Farrell <Fa...@cat.com>.
On Tue, 19 Aug 2003 01:53 pm, Jason van Zyl wrote:
> On Mon, 2003-08-18 at 21:31, John Farrell wrote:
> > I definitely expected pom.id to give me just "mp-util", instead of
> > "mp-util:mp-util". Why are my expectations wrong?
> The id has been something that has been used internally for a while now.
> What you are looking for is ${pom.artifactId}. ${pom.id} is currently
> equal to ${pom.groupId}:${pom.artifactId}.
Thanks jvz & dIon, I get it now.
John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: pom.id has a : in it?
Posted by Jason van Zyl <jv...@maven.org>.
On Mon, 2003-08-18 at 21:31, John Farrell wrote:
> If I write this in my maven.xml:
>
> ] <goal name="blah"><echo>${pom.id}</echo></goal>
>
> I get:
>
> ]$ maven blah
> ]blah:
> ] [echo] mp-util:mp-util
>
> My project.xml has this in it:
> ] <!-- a unique name for this project -->
> ] <id>mp-util</id>
>
> I definitely expected pom.id to give me just "mp-util", instead of
> "mp-util:mp-util". Why are my expectations wrong?
>
> I can fix it:
>
> ] <j:set var="id" value="${pom.id}" />
> ] <j:set var="id" value="${id.substring(0,id.indexOf(':'))}" />
> ] <echo>id = ${id}</echo>
>
> but I don't get it. Thanks for clues.
The id has been something that has been used internally for a while now.
What you are looking for is ${pom.artifactId}. ${pom.id} is currently
equal to ${pom.groupId}:${pom.artifactId}.
> John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: pom.id has a : in it?
Posted by Ben Walding <be...@walding.com>.
I have a suspicion that the behaviour is not consistent as I had all
manner of problems when I wanted to do an id like
maven-proxy:core
jar:installing to the wrong place was one of the things I noticed.
In the older project.xml parser, the behaviour was order dependant
dion@multitask.com.au wrote:
><id> is short for <groupId>:<artifactId>. If groupId and artifactId aren't
>specified and id is, the id value is passed to group and artifact.
>--
>dIon Gillard, Multitask Consulting
>Blog: http://blogs.codehaus.org/people/dion/
>
>
>John Farrell <Fa...@cat.com> wrote on 19/08/2003 11:31:25 AM:
>
>
>
>>If I write this in my maven.xml:
>>
>>] <goal name="blah"><echo>${pom.id}</echo></goal>
>>
>>I get:
>>
>>]$ maven blah
>>]blah:
>>] [echo] mp-util:mp-util
>>
>>My project.xml has this in it:
>>] <!-- a unique name for this project -->
>>] <id>mp-util</id>
>>
>>I definitely expected pom.id to give me just "mp-util", instead of
>>"mp-util:mp-util". Why are my expectations wrong?
>>
>>I can fix it:
>>
>>] <j:set var="id" value="${pom.id}" />
>>] <j:set var="id" value="${id.substring(0,id.indexOf(':'))}" />
>>] <echo>id = ${id}</echo>
>>
>>but I don't get it. Thanks for clues.
>>
>>John
>>
>>---------------------------------------------------------------------
>>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: pom.id has a : in it?
Posted by di...@multitask.com.au.
<id> is short for <groupId>:<artifactId>. If groupId and artifactId aren't
specified and id is, the id value is passed to group and artifact.
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
John Farrell <Fa...@cat.com> wrote on 19/08/2003 11:31:25 AM:
> If I write this in my maven.xml:
>
> ] <goal name="blah"><echo>${pom.id}</echo></goal>
>
> I get:
>
> ]$ maven blah
> ]blah:
> ] [echo] mp-util:mp-util
>
> My project.xml has this in it:
> ] <!-- a unique name for this project -->
> ] <id>mp-util</id>
>
> I definitely expected pom.id to give me just "mp-util", instead of
> "mp-util:mp-util". Why are my expectations wrong?
>
> I can fix it:
>
> ] <j:set var="id" value="${pom.id}" />
> ] <j:set var="id" value="${id.substring(0,id.indexOf(':'))}" />
> ] <echo>id = ${id}</echo>
>
> but I don't get it. Thanks for clues.
>
> John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>