Hi Adam,
thank you for your interesting explanation. They are new to me and I
have to think about them.
I have no idea how to "model the target environment".
regards,
Mathias Kalb
Am 06.01.2011 22:03, schrieb Adam Murdoch:
I think a "providedCompile" would be very useful for the java
plugin (JAR).
I'm not so sure. What does a 'provided' classpath actually mean for a
java project?
To me, the 'provided' classpaths really only make sense when you are
bundling some code to execute in a particular container (container in
the abstract sense here, ie some environment where the code is executed).
This really shouldn't be the concern of a java project. It should be
the concern of the project which builds the bundle. Sometimes these
are the same project, sometimes they are different projects. Sometimes
there are multiple projects which bundle the code. Sometimes the code
is included in different bundles for different environments, where the
provided classes are different.
Given this, declaring the 'provided' classpath in the source project,
in a global configuration, really doesn't make any sense.
Instead, I'd do a couple of things:
1. Make it easy to exclude one classpath from another. This is the
primitive that you could use to deal with this problem:
war {
classpath = configurations.runtime - configurations.providedRuntime
}
2. Get rid of the provided classpaths, and instead model the target
environments. For a war, you'd define the target web container, which
would include the provided classpath. This would allow you to build
different wars for different target containers.
The war plugin would wire up some defaults, so that the war targets a
generic web container with the appropriate servlet version. You'd then
be able to configure that web container, or add others.
This same definition would also be usable for deployment, too. The
jetty plugin can use the web container definition to determine which
version of jetty to use, and what to make available in the container
classpath.
--
PRODATO Integration Technology GmbH
Hauptstrasse 40, 91054 Erlangen
http://www.prodato.de
Mathias Kalb, Dipl.-Inf. (FH)
mailto:[email protected]
fon: +49-9131-612877
fax: +49-9131-612881
Sitz: Ebermannstadt, Registergericht Bamberg HRB 3748
Geschäftsführer: Dr. Michael Schlundt, Dr. Christian Meiler, Prof. Dr. Stefan
Jablonski
USt-IdNr. DE199384894
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email