You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Andersson <ca...@ofs.no> on 2003/10/03 13:04:38 UTC
regarding id/artifactId/groupId in dependency
Hi there, I hav a small question..
in beta10 I could write a dependencytag like this
<dependency>
<id>test1-test2</id>
<groupId>test1</groupId>
<version>1.0</version>
</dependency>
after a while I discovered thet I could also write the dependencytag
like this...
<dependency>
<id>test1+test2</id>
<version>1.0</version>
</dependency>
to produce the same effect...
however, in RC1 the <id> tag has been deprecated (it still works however
which is good) so I started to change my dependencytag to use artifactId
instead.
<dependency>
<artifactId>test1+test2</artifactId>
<version>1.0</version>
</dependency>
with this sort of dependency I get an nullpointer exception.
adding the groupId back makes it all work...
<dependency>
<artifactId>test1-test2</artifactId>
<groupId>test1</groupId>
<version>1.0</version>
</dependency>
is the nullpointer exception a bug? is it intended so that we have to
use groupId
even if it made things harder to read, I thought it was nice to be able
to use the + sign to tell maven that text before the + sign was the
groupid, since it made much less editing...
anyway, just like to know, so that I know what to do :-)
/Christian Andersson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: regarding id/artifactId/groupId in dependency
Posted by John Casey <jd...@commonjava.org>.
Actually, the <id></id> syntax is deprecated. It was the old way of
doing things, and ultimately didn't provide the grouping mechanisms
desired by some of the more popular framework projects (read Jelly,
etc.). I think it will still work, but I don't know for how long, since
I've heard rumblings about another overhaul to the dependency structures
in the future. Using deprecation once removed is one thing, but two is
pretty undesirable...
Cheers,
John
On Sat, 2003-10-04 at 14:40, Paul Libbrecht wrote:
>
> Jason van Zyl wrote:
> > <dependency>
> > <groupId>foo</groupId>
> > <artifactId>bar</artifactId>
> > <version>1.0</version>
> > </dependency>
> >
> > Is the way to declare dependencies.
>
> Cool.
>
> Do I interpret correctly that:
>
> <dependency>
> <id>blop</id>
> <version>13.123231</version>
> </dependency>
>
> Is a kind of shortcut for the following ?
>
> <dependency>
> <groupId>blop</groupId>
> <artifactId>blop</artifactId>
> <version>13.123231</version>
> </dependency>
>
>
> at least it seems so in b10.
>
> Paul
>
>
> ---------------------------------------------------------------------
> 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: regarding id/artifactId/groupId in dependency
Posted by Paul Libbrecht <pa...@activemath.org>.
Jason van Zyl wrote:
> <dependency>
> <groupId>foo</groupId>
> <artifactId>bar</artifactId>
> <version>1.0</version>
> </dependency>
>
> Is the way to declare dependencies.
Cool.
Do I interpret correctly that:
<dependency>
<id>blop</id>
<version>13.123231</version>
</dependency>
Is a kind of shortcut for the following ?
<dependency>
<groupId>blop</groupId>
<artifactId>blop</artifactId>
<version>13.123231</version>
</dependency>
at least it seems so in b10.
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: regarding id/artifactId/groupId in dependency
Posted by Warner Onstine <sw...@warneronstine.com>.
When I ran into this I had a question/observation. It might be nice if
Maven automatically understood <groupId> was <artifactId> when it was
missing.
Don't know if this would break anything, just a thought.
-warner
On Friday, October 3, 2003, at 04:24 AM, Jason van Zyl wrote:
> On Fri, 2003-10-03 at 07:04, Christian Andersson wrote:
>> Hi there, I hav a small question..
>>
>> anyway, just like to know, so that I know what to do :-)
>
> <dependency>
> <groupId>foo</groupId>
> <artifactId>bar</artifactId>
> <version>1.0</version>
> </dependency>
>
> Is the way to declare dependencies.
>
>
>> /Christian Andersson
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: regarding id/artifactId/groupId in dependency
Posted by Jason van Zyl <jv...@maven.org>.
On Fri, 2003-10-03 at 07:04, Christian Andersson wrote:
> Hi there, I hav a small question..
>
> anyway, just like to know, so that I know what to do :-)
<dependency>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>1.0</version>
</dependency>
Is the way to declare dependencies.
> /Christian Andersson
>
>
> ---------------------------------------------------------------------
> 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