1
votes

Project: cjwizard Artifacts: cjwizard and cjwizard-demo, both version 1.0.9

I just took over this project from the original owner and I am new to both the maven deploy process and Bintray.

After doing a mvn:deploy which (according to my Maven logs) was successful, I could see the pom.xml for both cjwizard AND cjwizard-demo, but I have a small project that is using gradle to try to pull down both cjwizard and cjwizard-demo and it's failing.

(EDIT: I modified my build.gradle to just download one artifact at a time. This is a simple test project, and there are no other dependencies, other than cjwizard)

My build.gradle looks like this

group 'test'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    compile 'com.github.cjwizard:cjwizard:1.0.9'
}

(I normally use gradle on my own projects. I am using maven to build cjwizard because the project was already set up to use maven)

I'm getting an error stating that the cjwizard artifact can't be resolved. Same problem with cjwizard-demo.

Am I doing something wrong?

Also, are open-source projects ineligible for email support? Thanks

1
suppose your PC is connected to internet and you can access maven there may be a firewall or virus guard program blocking the jar download. - Rajith Pemabandu
Logical answer, but I do not have any problems downloading artifacts from Maven Central. I can build a local Maven repo and stick it on a web server somewhere and I am able to download from that repo too, if I give Gradle the repo's URL. AND I can download earlier versions of cjwizard -- ones I didn't upload to Bintray, which is why my best guess is that I screwed something up with this upload. I used mvn deploy with no arguments. - SteveSobol
So... A JFrog support employee has responded to my email (and apologized for the delay, since it took a couple days). He proposed hardcoding the url for the libraries, and I was thinking "but why can't I just use jcenter" and then I discovered that pushing to bintray doesn't automatically link your project to jcenter. :) Still getting things ironed out, but it looks like that is the problem. I know my project isn't liked to jcenter because it doesn't show up on jcenter.bintray.com. Oops. - SteveSobol

1 Answers

3
votes

To sum up, as SteveSobol mentioned in his comment, pushing to a Bintray repository does not push to JCenter.

JCenter is a public well known repository, but, it is one of many managed in Bintray. In Bintray every one can open an Open Source repository.

In case you have a repository that you want to work with which is not maven central or JCenter you can connect your build tool to it easily, see the doc:

Go to https://bintray.com/cjwizard/CJWizard and click: SET ME UP

It is in the upper right corner of the page.

Or do the following:

To resolve with gradle, edit your build.gradle:

repositories {
    maven {
        url  "http://dl.bintray.com/cjwizard/CJWizard" 
    }
}

To resolve with maven, edit your settings.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
          xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>

    <profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-cjwizard-CJWizard</id>
                    <name>bintray</name>
                    <url>http://dl.bintray.com/cjwizard/CJWizard</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-cjwizard-CJWizard</id>
                    <name>bintray-plugins</name>
                    <url>http://dl.bintray.com/cjwizard/CJWizard</url>
                </pluginRepository>
            </pluginRepositories>
            <id>bintray</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>bintray</activeProfile>
    </activeProfiles>
</settings>