Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Doesn't compile using gradle, the paths should be updated #9

Closed
cdelgadob opened this issue Dec 2, 2014 · 5 comments
Closed

Doesn't compile using gradle, the paths should be updated #9

cdelgadob opened this issue Dec 2, 2014 · 5 comments

Comments

@cdelgadob
Copy link

No description provided.

@wilkinsona
Copy link
Contributor

Works for me:

[aw-rmbp master]: ./gradlew clean build
Download http://repo.spring.io/plugins-release/org/springframework/build/gradle/docbook-reference-plugin/0.2.1/docbook-reference-plugin-0.2.1.pom
Download http://repo.spring.io/plugins-release/org/springframework/build/gradle/docbook-reference-plugin/0.2.1/docbook-reference-plugin-0.2.1.jar
The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
:clean UP-TO-DATE
:analyze:clean UP-TO-DATE
:command-line:clean UP-TO-DATE
:contributions:clean UP-TO-DATE
:render:clean UP-TO-DATE
:user-guide:clean UP-TO-DATE
:util:clean UP-TO-DATE
:util:compileJava
:util:processResources UP-TO-DATE
:util:classes
:util:jar
:analyze:compileJava
:analyze:processResources UP-TO-DATE
:analyze:classes
:analyze:jar
:analyze:assemble
:analyze:compileTestJava
Download http://repo.spring.io/libs-release/org/slf4j/slf4j-simple/1.7.6/slf4j-simple-1.7.6.pom
Download http://repo.spring.io/libs-release/org/slf4j/slf4j-simple/1.7.6/slf4j-simple-1.7.6.jar
:analyze:processTestResources
:analyze:testClasses
:analyze:test
objc[34171]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
:analyze:check
:analyze:build
:render:compileJava
Download http://repo.spring.io/libs-release/org/freemarker/freemarker/2.3.19/freemarker-2.3.19.pom
Download http://repo.spring.io/libs-release/org/freemarker/freemarker/2.3.19/freemarker-2.3.19.jar
:render:processResources
:render:classes
:render:jar
:command-line:compileJava
:command-line:processResources
:command-line:classes
:command-line:jar
:command-line:assemble
:command-line:compileTestJava
:command-line:processTestResources
:command-line:testClasses
:command-line:test
objc[34178]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
:command-line:check
:command-line:build
:contributions:compileJava
:contributions:processResources
:contributions:classes
:contributions:jar
:contributions:assemble
:contributions:compileTestJava
Download http://repo.spring.io/libs-release/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0.1/geronimo-ejb_3.0_spec-1.0.1.pom
Download http://repo.spring.io/libs-release/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0.1/geronimo-ejb_3.0_spec-1.0.1.jar
:contributions:processTestResources
:contributions:testClasses
:contributions:test
objc[34186]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
:contributions:check
:contributions:build
:render:assemble
:render:compileTestJava
:render:processTestResources
:render:testClasses
:render:test
objc[34193]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
:render:check
:render:build
:util:assemble
:util:compileTestJava
:util:processTestResources
:util:testClasses
:util:test
objc[34194]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
:util:check
:util:build

BUILD SUCCESSFUL

Total time: 28.147 secs

@wilkinsona
Copy link
Contributor

Fails on Bamboo though due to recent Sonar changes. We should fix that.

@wilkinsona wilkinsona reopened this Dec 2, 2014
wilkinsona added a commit that referenced this issue Dec 2, 2014
The Sonar server, sonar.spring.io, was recently upgraded and is no
longer compatible with the Sonar client that's used by Gradle 1.x.
This commit upgrades the build to Gradle 2.x; restoring compatibility
with sonar.spring.io.

See gh-9
@cdelgadob
Copy link
Author

For me, in order to get it to work, I had to change the file user-guide/build.gradle, from

buildscript {
    repositories {
        maven { url 'http://repo.spring.io/plugins-release' }
    }
    dependencies {
        classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.1'
    }
}

apply plugin: 'docbook-reference'

task htmlSingle(type: HtmlSingleDocbookReferenceTask) {
    sourceDir = file('src/reference/docbook')
}

task htmlMulti(type: HtmlMultiDocbookReferenceTask) {
    sourceDir = file('src/reference/docbook')
}

task docs(dependsOn:[htmlSingle, htmlMulti])

rootProject.docsZip {
    dependsOn docs
    from ("${buildDir}/reference") {
        into (this.project.name)
    }
}

rootProject.distZip {
    dependsOn docs
    from ("${this.project.buildDir}/reference") {
        into ("${distRoot}/${this.project.name}")
    }
}

To:

buildscript {
    repositories {
        maven { url 'http://repo.springsource.org/plugins-release' }
    }
    dependencies {
        classpath 'io.spring.gradle:docbook-reference-plugin:0.3.0'
    }
}

apply plugin: 'docbook-reference'

task htmlSingle(type: HtmlSingleDocbookReferenceTask) {
    sourceDir = file('src/reference/docbook')
    sourceFileName = 'index.xml'
}

task htmlMulti(type: HtmlMultiDocbookReferenceTask) {
    sourceDir = file('src/reference/docbook')
    sourceFileName = 'index.xml'
}

task docs(dependsOn:[htmlSingle, htmlMulti])

rootProject.docsZip {
    dependsOn docs
    from ("${buildDir}/reference") {
        into (this.project.name)
    }
}

rootProject.distZip {
    dependsOn docs
    from ("${this.project.buildDir}/reference") {
        into ("${distRoot}/${this.project.name}")
    }
}

@wilkinsona
Copy link
Contributor

Looks like you tried to build with Gradle 2.x - 0.2.1 of the docbook-reference-plugin is only compatible with 1.x. Generally speaking, you should always build with ./gradlew to ensure that the correct version of Gradle is used.

@cdelgadob
Copy link
Author

All right, thanks.

Then an upgrade to Gradle 2.x will definitely help :)

wilkinsona added a commit that referenced this issue Dec 2, 2014
Rather than relying on the project being built with the correct
JDK, the source and target compatibility is now explicitly configured
in the build. This should all the project to be built with Java 7
(which is required by the FindBugs plugin used on sonar.spring.io),
while still producing Java 6-compatible byte code.

See gh-9
wilkinsona added a commit that referenced this issue Dec 2, 2014
The new DocBook plugin requires that the sourceFileName property is
configured.

See gh-9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants