> -----Original Message-----
> From: Rafal Krzewski [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 06, 2003 3:04 PM
> To: Maven Users List
> Subject: Re: [Proposal] changes in POM needed by new features of maven-new
>
> Michal Maczka wrote:
> >>As Ben noted, we may need to have dependencies with varying 'transitive'
> >>status per kind. For example it is very common that a library is
> >>required for compiling and running your project, but at the same time
> >>only for running your project dependencies. Suppose we have:
>
> > I don't understand.
>
> A descriptor of a hypotetical web application toolkit, in it's master
> project. The toolkit has three sub projects: a jar, a tld and web
> contnent drop (js/css).
>
> <project>
> <groupId>footolkit.org</groupId>
> <artifactId>footoolkit</artifactId>
> <vesrion>1.0</version>
>
> <dependencies>
> <dependency>
> <groupId>footolkit.org</groupId>
> <artifactId>footoolkit-classes</artifactId>
> <version>${pom.version}</version>
> <type>jar</type>
> <kind>war.bundle.transitive</kind>
> <kind>compilation.transitive</kind>
> </dependency>
> <dependency>
> <groupId>footolkit.org</groupId>
> <artifactId>footoolkit-tags</artifactId>
> <version>${pom.version}</version>
> <type>tld</type>
> <kind>war.bundle.transitive</kind>
> </dependency>
> <dependency>
> <groupId>footolkit.org</groupId>
> <artifactId>footoolkit-content</artifactId>
> <version>${pom.version}</version>
> <type>web-content</type>
> <kind>war.bundle.transitive</kind>
> </dependency>
> </dependencies>
> </project>
>
> Then in a war project you declare a dependency on 'footolkit' and get
> compile dependency footoolkit-classes, and get the jar, tld and
> web-content stuff bundled in your war without any further hassle.
>
> Makes sense now?
>
> R.
I see it differently (as mixture of group and transitive dependencies)
In your main POM you do:
<dependecy>
<groupId>footolkit.org</groupId>
<artifactId>footoolkit</artifactId>
<vesrion>1.0</version>
<type>pom</type> <--- This mean group dependecy
<kind>runtime</kind>
<transitive>true</transitive>
<dependecy>
This is group dependency with a hint that transitive dependencies should be
followed/resolved.
Let's say that you do "war:war" for this project. I want to see all runtime
dependencies budled in this case. In addition I don't want to have any extra
metadata
Simply POM of Footoolkit will be consulted. There we should find (note that
those "strange" "kind"s like war.bundle.true are gone)
<project>
<groupId>footolkit.org</groupId>
<artifactId>footoolkit</artifactId>
<vesrion>1.0</version>
<dependencies>
<dependency>
<groupId>footolkit.org</groupId>
<artifactId>footoolkit </artifactId>
<version>${pom.version}</version>
<type>jar</type>
<kind>runtime</kind>>
</dependency>
<dependency>
<groupId>footolkit.org</groupId>
<artifactId>footoolkit-tags</artifactId>
<version>${pom.version}</version>
<type>tld</type>
<kind>runtime</kind>
</dependency>
<dependency>
<groupId>footolkit.org</groupId>
<artifactId>footoolkit-content</artifactId>
<version>${pom.version}</version>
<type>web-content</type>
<kind>runtime</kind>
</dependency>
</dependencies>
</project>
War plugin will be able to bundle some of types of artifacts ("jars", "tlds"
maybe even "web-content") I don't see a reason to mark them in special way.
Other example
<dependecy>
<groupId>footolkit.org</groupId>
<artifactId>footoolkit</artifactId>
<vesrion>1.0</version>
<type>tld</type>
<kind>runtime</kind>
<transitive>true</transitive>
<dependecy>
Let's assume that this TLD needs some extra jars to works
<project>
<groupId>footolkit.org</groupId>
<artifactId>footoolkit</artifactId>
<vesrion>1.0</version>
<dependencies>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.6</version>
<type>jar</type>
<kind>runtime</kind>>
</dependency>
....
</project>
Other common notest for both example: For making a war we will certainly
have separate project just for that and all dependencies in this project are
either of kind "test", "compile", "runtime" for this war and nothing else.
So it is clear that all runtime dependencies should be bundled inside the
war.
In the case of commons-beanutils: this artifact is runtime dependency so
consequently will be also bundled in war archive.
I don't see any reason why would we need things like: war.bundle.transitive
Why to complicate things? And then you need special markup in other projects
I don't think that you should expect such meta-information there nor you
will be able to control it (some of them won't be yours)
Isn't it simpler?
Michal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]