user504909 user504909 - 4 months ago 20
Java Question

maven: how to build the dependency from source.jar to jar files and put the jar file as it dependency?

For maven 3, I need to use the

<dependency>
<groupId>javax.sql</groupId>
<artifactId>jdbc-stdext</artifactId>
<version>2.0</version>
</dependency>


as the one of my dependency, but I only can find the source jar form maven central:

https://repo.maven.apache.org/maven2/javax/sql/jdbc-stdext/2.0/

how to compile it as normal jar in maven with maven plugins and make it work as one of dependency?

Answer

I think you can add another Maven repository to your Pom.xml and get jdbc-stdext-2.0.jar http://repo.jfrog.org/artifactory/libs-releases/javax/sql/jdbc-stdext/2.0/

<repository>
    <id>jfrog-libs</id>
    <name>jfrog-libs</name>
    <url>http://repo.jfrog.org/artifactory/libs-releases</url>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
</repository>