[ Jason asked me to repost this here ]
We already went into violent agreement that jars like JAF or Javamail
should have an <id></id> like <id>JAF</id> or <id>Java Activation Framework</id>.
My problem with this is, that it is killing the ability of using the <version>
tag, because <id> + <version> == jarname. So you must write the id either twice
(in <jar> and <id>) or we should introduce a new field, called <name> or <jarname>
which allows this:
<dependency>
<id>Java Activation Framework</id>
<jarname>activation</jarname>
<version>1.0.2</version>
</dependency>
--- cut ---
Hi,
while trying to keep the various dependency files in Turbine-2 and
Fulcrum in sync, I found out that there seems to be a lot of confusion
about how to write a dependency. Everyone uses his own style.
I found no docs on the turbine / maven site either, so it seems that
there is none. I wrote down a few guidelines for discussion. We should
make this (just like coding style) a guideline to avoid confusion.
Please comment.
1) Every dependency must have an <id> tag (I think this is already
enforced by Maven itself but not in the Maven docs).
2) All dependencies are ordered in ascending alphabetical sequence
of their <id> tags. This is "0-9a-zA-Z".
3) No arbitrary rename of jars should happen. Only if a vendor
distributed jar does not contain a version number, renaming
is allowed but not required.
4) Whenever possible, the <id></id> <version></version> form
should be used. Only if the name of the jar is widely different
from the <id> or does not contain a version number,
the <jar></jar> statement should be used.
Good:
<dependency>
<id>activation</id>
<version>1.0.2</version>
<jar>activation.jar</jar>
</dependency>
Good, with renaming:
<dependency>
<id>activation</id>
<version>1.0.2</version>
</dependency>
Bad:
<dependency>
<id>bsf</id>
<version>2.2</version>
<jar>bsf-2.2.jar</jar>
</dependency>
<dependency>
<id>bsf</id>
<version>2.4</version>
<jar>bsf-2.2-dev.jar</jar>
</dependency>
5) If an URL is given and does not end in a explicit page reference,
the URL must end with a "/"
Good: <url>http://jakarta.apache.org/commons/collections.html</url>
Good: <url>http://jakarta.apache.org/commons/</url>
Bad: <url>http://jakarta.apache.org/commons</url>
6) The <required></required> Tag is not to be used. All jars must
be present.
7) Confusion about some commonly used names:
Java Activation Framework (JAF):
The JAF is distributed in a jar called "activation.jar" from SUN.
It should be named like this:
<dependency>
<id>activation</id>
<version>1.0.2</version>
<jar>activation.jar</jar>
<url>http://java.sun.com/products/javabeans/glasgow/jaf.html</url>
</dependency>
Renaming of the jar is acceptable (and preferred):
<dependency>
<id>activation</id>
<version>1.0.2</version>
<url>http://java.sun.com/products/javabeans/glasgow/jaf.html</url>
</dependency>
Java Mail API (JavaMail):
The Java Mail API is distributed in a jar called "mail.jar" from SUN.
It should be named like this:
<dependency>
<id>mail</id>
<version>1.2</version>
<jar>mail.jar</jar>
<url>http://java.sun.com/products/javamail/</url>
</dependency>
Renaming of the jar is acceptable (and preferred):
<dependency>
<id>mail</id>
<version>1.2</version>
<url>http://java.sun.com/products/javamail/</url>
</dependency>
The jar should _not_ be renamed "javamail.jar"
Xerces XML Parser
The Xerces API consists of two jars. The following naming is
to be used:
<dependency>
<id>xml-xerces</id>
<type>required</type>
<version>2.0.2</version>
<jar>xercesImpl-2.0.2.jar</jar>
<url>http://xml.apache.org/xerces2-j/index.html</url>
</dependency>
<dependency>
<id>xml-apis</id>
<type>required</type>
<version>2.0.2</version>
<jar>xmlParserAPIs-2.0.2.jar</jar>
<url>http://xml.apache.org/xerces2-j/index.html</url>
</dependency>
Things we need to clear up:
- JvZ wrote me about "going to split the dependencies into compile and
runtime dependencies (runtime == testing)". This would be really
great to have.
- I'd like to introduce a "description" tag into the dependencies (this
is more for the maven people):
<dependency>
<id>mail</id>
<version>1.2</version>
<description>Java Mail API</description>
</dependency>
Which shows up in the dependency list on the maven generated web site.
Alternatively:
<dependency>
<id>Java MAIL API</id>
<jarname>mail</jarname>
<version>1.2</version>
</dependency>
Where <jarname> is used instead of <id> when present.
- SNAPSHOT and DEV
We had the confusion about <version>SNAPSHOT</version>.
Make this a formal, allowed version tag which enforces
reloading of the jars (maven people).
Regards
Henning
--- cut ---
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [EMAIL PROTECTED]
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 [EMAIL PROTECTED]
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>