uploadArchives works with Java 7 but not 8

plugins

(Mark Bidewell) #1

I am working with updating a Gradle (using Gradle 4.3.1) project that was building with JDK 7 to JDK 8. the uploadArchives section is as follows:

artifacts {
  archives grailsPackage
}

release {
    failOnCommitNeeded = false
    failOnUnversionedFiles = false
    failOnUpdateNeeded = false
    revertOnFail = true
    tagTemplate = '$name-$version'
    versionPropertyFile = 'application.properties'
    versionProperties = ["app.version"]
    buildTasks = ['build']


    svn {
        username = project.uname
        password = project.pwd
    }
}

if (hasProperty('mavenUser')) {
    uploadArchives {
        repositories {
            mavenDeployer {
                repository(url: "<url>") {
                    authentication(userName: "${mavenUser}", password: "${mavenPassword}")
                }
                pom.artifactId = project.name
				        pom.groupId = "<groupID>"
                pom.version = project.version
            }
        }
    }
}

build.dependsOn 'grailsBuild'
assemble.dependsOn 'grailsPackage'
clean.dependsOn 'grailsClean'
afterReleaseBuild.dependsOn uploadArchives

The upload works perfectly on Java 7. But on Java 8 the upload does not happen and logging indicates that Ivy is being used:

11:07:00.734 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :uploadArchives (Thread[Daemon worker,5,main]) started.
11:07:00.734 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Task :htkmanualcomp:htkmanualcomp:uploadArchives' started
11:07:00.734 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :htkmanualcomp:htkmanualcomp:uploadArchives
11:07:00.734 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':htkmanualcomp:htkmanualcomp:uploadArchives'
11:07:00.734 [INFO] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':htkmanualcomp:htkmanualcomp:uploadArchives' into context took 0.0 secs.
11:07:00.734 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':htkmanualcomp:htkmanualcomp:uploadArchives' is up-to-date
11:07:00.735 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Up-to-date check for task ':htkmanualcomp:htkmanualcomp:uploadArchives' took 0.0 secs. It is not up-to-date because:
  Task has not declared any outputs.
11:07:00.735 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':htkmanualcomp:htkmanualcomp:uploadArchives'.
11:07:00.735 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Execute upload for :uploadArchives' started
11:07:00.735 [INFO] [org.gradle.api.Task] Publishing configuration: configuration ':htkmanualcomp:htkmanualcomp:archives'
11:07:00.765 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy.default.settings.dir' to 'jar:file:/C:/Windows/System32/config/systemprofile/.gradle/wrapper/dists/gradle-4.3.1-bin/7yzdu24db77gi3zukl2a7o0xx/gradle-4.3.1/lib/plugins/ivy-2.2.0.jar!/org/apache/ivy/core/settings'
11:07:00.765 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy.basedir' to 'c:\srv\jenkins\.jenkins\workspace\web-htk-htkmanualcomp-MO-release\.'
11:07:00.765 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy.default.conf.dir' to 'jar:file:/C:/Windows/System32/config/systemprofile/.gradle/wrapper/dists/gradle-4.3.1-bin/7yzdu24db77gi3zukl2a7o0xx/gradle-4.3.1/lib/plugins/ivy-2.2.0.jar!/org/apache/ivy/core/settings'
11:07:00.861 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.runtime.name' to 'Java(TM) SE Runtime Environment'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.boot.library.path' to 'C:\srv\jenkins\Java\jdk1.8.0_152\jre\bin'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vm.version' to '25.152-b16'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vm.vendor' to 'Oracle Corporation'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vendor.url' to 'http://java.oracle.com/'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'path.separator' to ';'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vm.name' to 'Java HotSpot(TM) 64-Bit Server VM'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'file.encoding.pkg' to 'sun.io'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.script' to ''
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.java.launcher' to 'SUN_STANDARD'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.country' to 'US'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.os.patch.level' to ''
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vm.specification.name' to 'Java Virtual Machine Specification'
11:07:00.862 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.dir' to 'c:\srv\jenkins\.jenkins\workspace\web-htk-htkmanualcomp-MO-release'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.runtime.version' to '1.8.0_152-b16'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.awt.graphicsenv' to 'sun.awt.Win32GraphicsEnvironment'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.endorsed.dirs' to 'C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\endorsed'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'os.arch' to 'amd64'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.io.tmpdir' to 'C:\Windows\TEMP\'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'line.separator' to '
'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'org.gradle.appname' to 'gradlew'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vm.specification.vendor' to 'Oracle Corporation'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.variant' to ''
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'os.name' to 'Windows Server 2012 R2'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.jnu.encoding' to 'Cp1252'
11:07:00.863 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.library.path' to 'C:\srv\jenkins\Java\jdk1.8.0_152\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\srv\jenkins\Java\jdk1.8.0_152/bin:C:\Python35\Scripts\;C:\Python35\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;;.'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.specification.name' to 'Java Platform API Specification'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.class.version' to '52.0'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.management.compiler' to 'HotSpot 64-Bit Tiered Compilers'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'os.version' to '6.3'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'library.jansi.path' to 'C:\Windows\System32\config\systemprofile\.gradle\native\jansi\1.14\windows64'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.home' to 'C:\Windows\system32\config\systemprofile'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.timezone' to 'America/New_York'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.awt.printerjob' to 'sun.awt.windows.WPrinterJob'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'file.encoding' to 'Cp1252'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.specification.version' to '1.8'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.class.path' to 'C:\Windows\system32\config\systemprofile\.gradle\wrapper\dists\gradle-4.3.1-bin\7yzdu24db77gi3zukl2a7o0xx\gradle-4.3.1\lib\gradle-launcher-4.3.1.jar'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.name' to 'mbidewel'
11:07:00.864 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vm.specification.version' to '1.8'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.java.command' to 'org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.3.1'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.home' to 'C:\srv\jenkins\Java\jdk1.8.0_152\jre'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.arch.data.model' to '64'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'user.language' to 'en'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.specification.vendor' to 'Oracle Corporation'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'awt.toolkit' to 'sun.awt.windows.WToolkit'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vm.info' to 'mixed mode'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.version' to '1.8.0_152'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.ext.dirs' to 'C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\ext;C:\Windows\Sun\Java\lib\ext'
11:07:00.865 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.boot.class.path' to 'C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\resources.jar;C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\rt.jar;C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\sunrsasign.jar;C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\jsse.jar;C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\jce.jar;C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\charsets.jar;C:\srv\jenkins\Java\jdk1.8.0_152\jre\lib\jfr.jar;C:\srv\jenkins\Java\jdk1.8.0_152\jre\classes'
11:07:00.866 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vendor' to 'Oracle Corporation'
11:07:00.866 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'file.separator' to '\'
11:07:00.866 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'java.vendor.url.bug' to 'http://bugreport.sun.com/bugreport/'
11:07:00.866 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.io.unicode.encoding' to 'UnicodeLittle'
11:07:00.866 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.cpu.endian' to 'little'
11:07:00.866 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.desktop' to 'windows'
11:07:00.866 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'sun.cpu.isalist' to 'amd64'
11:07:00.938 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Execute upload for :uploadArchives'
11:07:00.938 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Build operation 'Execute upload for :uploadArchives' completed
11:07:00.938 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
11:07:00.938 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':htkmanualcomp:htkmanualcomp:uploadArchives'
11:07:00.939 [DEBUG] [org.gradle.internal.progress.DefaultBuildOperationExecutor] Completing Build operation 'Task :htkmanualcomp:htkmanualcomp:uploadArchives'

Any ideas why this script works on Java 7 but not Java 8?

UPDATE: I have discovered that the upload works on Linux but not Windows.