frizbog / gedcom4j

Java library for reading/writing genealogy files in GEDCOM format
http://gedcom4j.org
53 stars 36 forks source link

Deploy artifact on Maven central #36

Closed frizbog closed 11 years ago

frizbog commented 11 years ago

In order to help people who wants to use gedcom4j, it could be interesting to deploy your jar on maven central which is the defacto standard for library sharing.

You can follow this guide: http://maven.apache.org/guides/mini/guide-central-repository-upload.html

Maybe it is an opportunity to switch the production from ant to maven too.

(Migrated from http://code.google.com/p/gedcom4j/issues/detail?id=36)


earlier comments

frizbog1 said, at 2012-11-27T12:02:54.000Z:

This is a good idea. Thank you for the suggestion. I don't think switching to maven for the project itself is likely, but contributing to maven central is a good idea that has little impact on the project.

julien@herr.fr said, at 2012-11-27T12:46:34.000Z:

Ant, ivy, graddle or maven is your choice. ;-) Maven is just the simplest way to deploy on central (or maybe it's because I'm a maven fan)

frizbog1 said, at 2012-11-30T19:36:41.000Z:

Looking at this I should probably start making the main ant target generate a -sources.jar and a -javadoc.jar and if I decide to deposit into Maven Central, have the ant script also generate the pom.xml file. I won't be converting gedcom4j to maven though.

dmitskevich commented 11 years ago

The firs thing I did when I got gedcom4j sources locally, I converted project to Maven one and installed it to my local repo :)

frizbog commented 11 years ago

dmitskevich, I am not a maven expert or fan, but I do see value in being able to push gedcom4j artifacts up to central, so other maven users would not need to go through the steps you did to work with the sources, but to just be able to specify their dependency in their projects and let Maven handle it for them.

Would you be willing to work with me an answer my maven noob questions with regard to pushing gedcom4j to central? I've been looking into it and it looks like using Sonatype's OSS Maven Repository as described at https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide would be the easiest route to take...

dmitskevich commented 11 years ago

Yes, I would like to help you. I've never deployed an artifact to central, but I have a lot of experience with maven. By the way, you can keep building this project by Ant, and have in parallel pom.xml in it, which describes it. The pom I've created for your project is very small and simple, but it works:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.gedcom4j</groupId>
    <artifactId>gedcom4j</artifactId>
    <version>2.0.0-SNAPSHOT</version>
    <name>gedcom4j</name>
    <description>gedcom4j is a Java library for parsing and writing GEDCOM 5.5 and 5.5.1 files</description>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.9</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src</sourceDirectory>
        <testSourceDirectory>test</testSourceDirectory>
    </build>
</project>
dmitskevich commented 11 years ago

What organization name do you want to use? org.???.gedcom4j

frizbog commented 11 years ago

yes, org.gedcom4j please. Thanks

frizbog commented 11 years ago

Work is progressing on this. Thanks to juherr and dmitskevich, who gave me a great jumping off point, I have a pom.xml file that gets created at build-time (the ant script punches in the version number so I don't have to worry about it agreeing) and there are now ant targets in the build for pushing releases to Sonatype's OSS Maven Central. JIRA Tickets are in place at Sonatype and hopefully will be pushing stuff to Maven Central soon!

juherr commented 11 years ago

You didn't choose my favorite solution but it is a good news ! :-)

frizbog commented 11 years ago

Done! It's available at search.maven.org.