lgrignon / jsweet-gradle-plugin

Brings the power of JSweet to Gradle
Apache License 2.0
17 stars 15 forks source link

Can not get SNAPSHOT.pom #6

Closed sebnozzi closed 7 years ago

sebnozzi commented 8 years ago

I am getting this error message from Gradle (2.14) through IntelliJ when trying to build my project:

Error:Could not GET 'http://repository.jsweet.org/artifactory/libs-release-local/org/jsweet/candies/jsweet-core/1.0.2-SNAPSHOT/jsweet-core-1.0.2-SNAPSHOT.pom'. Received status code 409 from server: Conflict

The build.gradle file I'm using looks like this:

group 'sebnozzi'
version '1.0-SNAPSHOT'

buildscript {
    repositories {
        mavenCentral()
        maven { url "http://repository.jsweet.org/artifactory/libs-release-local" }
        maven { url "http://repository.jsweet.org/artifactory/libs-snapshot-local" }
        maven { url "http://repository.jsweet.org/artifactory/plugins-release-local" }
        maven { url "http://repository.jsweet.org/artifactory/plugins-snapshot-local" }
        maven { url "http://google-diff-match-patch.googlecode.com/svn/trunk/maven" }
    }
    dependencies {
        classpath('org.jsweet:jsweet-gradle-plugin:1.0.0-SNAPSHOT') { //
            transitive = true }
    }
}

apply plugin: 'java'
apply plugin: 'org.jsweet.jsweet-gradle-plugin'

repositories {
    mavenCentral()
}

jsweet {
    verbose = true
    encoding = 'UTF-8'
    sourceMap = true
    outDir = new File('target/js')
    targetVersion = EcmaScriptComplianceLevel.ES3
    includes = ['**/fr/test/my/**/*.java']
}

dependencies {
    compile group: 'org.jsweet.candies', name: 'jsweet-core', version:'1.0.2-SNAPSHOT'
    compile group: 'org.jsweet.candies', name: 'es6-promise', version:'0.0.2-SNAPSHOT'
    compile group: 'org.jsweet', name: 'jsweet-transpiler', version:'1.0.0-SNAPSHOT'
    //compileOnly 'org.immutables:value:2.2.10'
    //testCompile group: 'junit', name: 'junit', version: '4.11'
}

I based this from the instruction on your README file.

Any help appreciated! :-)

lgrignon commented 8 years ago

Please use jsweet-gradle-plugin version 1.2.0-SNAPSHOT, it should be better. Same goes for your candies, please use the latest version. Indeed, you specify invalid candies version. For instance, jsweet-core 1.0.2-SNAPSHOT does not exist.

Hope it helps :)

sebnozzi commented 8 years ago

I am really at a loss, even when changing the version to 1.2.0-SNAPSHOT I get complaints from gradle.

Do you think the README could be properly updated to provide more reliable instructions to newcomers like me? :-) (especially given the outcome of issue #4)

lgrignon commented 8 years ago

I think issue #4 was another topic, just about using JSweet transpiler v1.2.0-SNAPSHOT. Given your initial Gradle error, the problem was that your jsweet-core dependency had the wrong version (you could check available candies & their versions here: http://www.jsweet.org/candies-snapshots/). Now, if you fixed the dependency version, you probably have another error or I miss something :) This repository is only for the Gradle plugin, that's why the documentation focuses on it, but you have a more comprehensive documentation here: http://www.jsweet.org/

In addition, there is a good build.gradle example in: https://github.com/cincheo/jsweet-examples

Please tell me if it helped you.

sebnozzi commented 8 years ago

@lgrignon Thanks for trying to help me out. Your kind attitude does not go unnoticed. I will try to adapt my build.gradle file from the example project you mentioned and send a PR if it works :-)

lgrignon commented 8 years ago

@sebnozzi no problem it's normal ;) if your problem persists, please post here your build.gradle and detailed stacktrace (gradle jsweet --stacktrace should do the trick :)), and I will take a look at it.