Menu

Maven repository

2007-09-17
2012-07-18
  • Jason Johnston

    Jason Johnston - 2007-09-17

    It would be very useful to have the cssparser library artifact uploaded to the central Maven repository, to make it automatically available as a dependency for Maven-based projects. If you're not familiar, here's a quick intro to Maven: http://maven.apache.org/what-is-maven.html

    I'm happy to do the legwork to create a bundle for cssparser 0.9.4 for submitting to the Maven central repository, and to modify the cssparser build process to produce bundles for new versions going forward.

    Is that something that you'd all be interested in? Thanks in advance.

     
    • Jason Johnston

      Jason Johnston - 2008-02-22

      FYI I posted patch #1899343 in the issue tracker which adds a target to the cssparser build.xml, which automatically creates a maven upload bundle file. So for future releases, creating the bundle is as easy as 'ant maven-bundle'.

       
    • David Schweinsberg

      That sounds like an interesting plan. I'll have a look through the Maven info to see what this involves, but feel free to summarise the required work here :-)

      David

       
    • Jason Johnston

      Jason Johnston - 2007-09-17

      Sure, I'll summarize...

      Getting a JAR artifact submitted to the Maven central repo involves two steps:

      1) Create a "bundle" file which contains:
      a) the binary JAR artifact
      b) a pom.xml file declaring basic metadata about the project and its dependencies
      c) optional JARs containing sources and/or javadocs
      2) Opening a request in the Maven JIRA system to submit the bundle.

      Details about the process are at http://maven.apache.org/guides/mini/guide-central-repository-upload.html

      I'm willing to do step 1 to construct the bundle file for the 0.9.4 artifact. All you'd have to do would be to open the JIRA request (I can't do that step since it must be done by someone intimately involved in the project).

      I'm also willing to submit a patch to the build.xml to automate the process of creating bundles for future releases, but first thing first.

       
    • Jason Johnston

      Jason Johnston - 2007-09-18

      OK, I've got a bundle for 0.9.4 put together and have made it available at https://files.lojjic.net/cssparser-maven/cssparser-0.9.4-bundle.jar

      It contains three files:
      ) cssparser-0.9.4.jar -- this is the ss_css2.jar that comes in the cssparser 0.9.4 distribution, but with the org.w3c. packages removed. I removed them because they're available in other packages in the Maven repository, which I declared as dependencies in the POM.
      ) cssparser-0.9.4-sources.jar -- just the src/com/ source files jarred up.
      *) pom.xml -- The project object model file which declares the basic project identification and metadata, and dependencies on libraries containing the DOM and SAC APIs.

      Please have a look over the above, especially the pom.xml, and let me know if you spot anything wrong. One thing in particular is the project groupId -- I chose net.sourceforge.cssparser because it's the project web site, even though the code uses the com.steadystate.css package. Let me know if you disagree with that.

      If everything looks good, then the next step is to open an upload request in the Maven JIRA system, per their instructions in Step 2 on http://maven.apache.org/guides/mini/guide-central-repository-upload.html

      Thanks for your time!

       
    • David Schweinsberg

      Many thanks for this.

       

Log in to post a comment.