No you clarified that Maven is an even more convoluted clusterfsck than I remembered.
Joerg Hohwiller wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Nick,
On Tue, 24 Apr 2007, Joerg Hohwiller wrote:
 <issueManagement>
   <system>bugzilla</system>
   <url>http://issues.apache.org/bugzilla/</url>
 </issueManagement>
Thanks, I've updated that
okay.
But from what I see in your subversion, you still need to replace
"issueTrackingUrl" with "issueManagement".
I also went through your ant build and have seen that you do not modify the root
tag <metadata>. The also needs to be changed to <project>, what might be the
major reason for the bugzialla issue about the POM file.
BTW: I assume that we are just talking about maven2 here and NOT about
maven1.
Since that seems to be the version most people use, I guess so.

Since maven1 does NOT support transitive dependencies the POMs are
not too relevant for the users. Maybe the maven guyz create maven1
artifacts automatically if maven2 artifacts are added - I do not know...
As I said, I'm not a maven user myself, and I normally end up with a headache
whenever I try and learn....

Since you have 3 artifacts (jar-files): poi, poi-contrib,
poi-scratchpad you will need 3 individual pom.xml files. The
poi-contrib and poi-scratchpad also need dependencies. Further you
could think about creating an additional pom file to keep the parent
metadata (licnese, scm, issueManagement, etc.) out of the other pom's
and avoid redundancies. But since you named the main artifact "poi"
and not e.g. "poi-core" this might not fit here.
I don't think it'd be too hard to have the ant build file spit out three
poms from the same template. That would also save us the faff of
deciding what needs to get split into a parent pom, what doesn't etc.
Yep, I think the best thing would be to have one template per POM.
For contrib and scratchpad, I guess we want to call the output pom
something like poi-scratchpad-3.0-final.pom. Is the artificatId then
poi-scratchpad? Is the dependency groupId=org.apache.poi,
artificatId=poi, and version=(same version) ?
The groupId should be the same for all of your artifacts (JAR files and
according POMs). As we discussed earlier it would make sense to use
org.apache.poi.

The artifactId is the major part of the name of the JAR file.
So you would have the artifact IDs
"poi", "poi-contrib", and "poi-scratchpad".

Then you would have a version. I would suggest to call the version "3.0".
- From your suggesstion above the version would be "3.0-final".
If maven needs to compare the version with another one to decide which one is
newer, it would be better and more straight forward to use "3.0".

So for
<groupId>org.apache.poi</groupId>
<artifactId>poi-contrib</artifactId>
<version>3.0</version>

The artifacts would be located in the repository like this:
org/apache/poi/poi-contrib/3.0/poi-contrib-3.0.pom
org/apache/poi/poi-contrib/3.0/poi-contrib-3.0.jar
org/apache/poi/poi-contrib/3.0/poi-contrib-3.0-sources.jar

The general pattern is:
groupId.replace('.', '/')/artifactId/version/artifactId-version*

The *-sources.jar is not required, but if you supply it and someone
uses maven to configure its IDE (e.g. eclipse, netbeans, intelliJ)
then the sources are automatically attached and can be browsed in
your IDE what is very handy.

If you want I could create the three POM files for you and attach them
to the bugzilla issue.
If it's just the scratchpad and contrib poms that need updating (the
main one now being fine), could you do a version for one of them? I can
then work it into the ant build file.

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.poi</groupId>
  <artifactId>poi-contrib</artifactId>
  <version>@VERSION@</version>
  <packaging>jar</packaging>
  <name>Jakarta POI Contrib</name>
  <url>http://jakarta.apache.org/poi/</url>
  <description>Jakarta POI Contrib - TODO</description>
  <dependencies>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi</artifactId>
      <version>@VERSION@</version>
    </dependency>
  </dependencies>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
</project>

Feel free to add some of the extra tags (scm, ...) from the other template if
you want to. The dependency says that I someone wants to use "poi-contrib",
then he will also needs "poi".

If you wanted to create a parent pom then you would need to set packaging to
"pom" there (instead of jar) and use
  <groupId>org.apache.poi</groupId>
  <artifactId>poi-parent</artifactId>
  <version>1.0</version>
Since you would not need to change the parent pom with a new release, the
version could be independend of the release version.

In the other three poms you would inherit from that by adding
  <parent>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-parent</artifactId>
    <version>1.0</version>
  </parent>

Then you can remove all the tags (license, scm, issueManagement) from the other
3 poms and only keep them together in the parent pom.

(A more convenient naming scheme would be to name the artifactId "poi" to
"poi-core" and then use "poi" instead of "poi-parent". But maybe it is NOT a
good idea to change this afterwards. Changing the groupId might be enough.)

I hope that I helped more than I did confuse you ;)
Nick
Regards
  Jörg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGL6eamPuec2Dcv/8RAlhzAJ4/aSW9ynaqh9KqW/YFTlARdPFRKQCglaU5
WvFPFkQ2HBnwNuWk+g8AfYg=
=hMct
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


--
Catch us at Linuxfest Northwest (4/28-4/29) http://linuxfestnorthwest.org
Buni Meldware Communication Suite
Email, Calendaring, ease of configuration/administration
http://buni.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to