Adding Binary dependency in V3

How to publish binary in V3 maven repository?

Before adding new binary dependency, check at maven public repository if the dependency is already present there. URL of public maven repository: http://www.mvnrepository.com or http://www.mvnbrowser.com/, there is a search at the top of the page.

If its not present in maven repository, then you can upload your artifacts using the web-application deployed here: http://kohsuke.sfbay/deploy2java.net (Available inside Sun Firewall only).

You will have to add binaries as well source files for the binary dependency into the repository. Binary jar will contain .class files with full package, and source jar will contain .java files with the same package.

Group ID: Package name e.g. org.apache.tools.ant or com.sun.jdbc

Artifact ID: Jar filename e.g. ant or jdbc without any version or suffix.

Classifier: (Optional) "sources" for Source jar

Packaging: (Optional) filename extention, used for .war, .ear, shell scripts, default is jar, so no need to pass anything here.

Version: Version of the binary e.g 1.0, 2.1 etc

File: Local Path of the file to upload

You will have to upload 2 jars for each binary dependency, first for actual binary jar and second for sources of the binary dependency with Classifier as "sources"

Use Published Artifact into your project:

Once you publish binary dependency in maven repository with above steps, you can access it in your project by adding it in "dependencies" section of pom.xml, see the snippet from pom.xml

POM Dependency

<dependency>
    <groupId>org.apache.ant</groupId>
    <artifactId>ant</artifactId>
    <version>1.7.0</version>
</dependency>

Browse the repository

You can browse GlassFish V3 - maven2 repository information at https://maven2-repository.java.net
or Repository listing at: http://download.java.net/maven/2

GlassFish V2 Repository information is at: https://maven-repository.java.net or listing at http://download.java.net/maven/1