Closed stefaneggerstorfer closed 7 years ago
I can see the problem. I will try to find a workaround and implement the plugin configuration differently.
Please try again with the latest plugin version 2.4.0.RC2
plugins {
id 'de.qaware.seu.as.code.credentials' version '2.4.0.RC2'
}
Also in your build.gradle file I saw that you use credentials to access the Bintray repository. No credentials should be required to access this repo.
Thanks for the quick fix, but now it fails with a NoClassDefFoundError in JNA:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.platform.win32.WinCrypt$DATA_BLOB
at com.sun.jna.platform.win32.Crypt32Util.cryptUnprotectData(Crypt32Util.java:121)
at com.sun.jna.platform.win32.Crypt32Util.cryptUnprotectData(Crypt32Util.java:103)
at com.sun.jna.platform.win32.Crypt32Util.cryptUnprotectData(Crypt32Util.java:90)
at de.qaware.seu.as.code.plugins.credentials.win.DPAPIEncryptor.decrypt(DPAPIEncryptor.java:34)
at de.qaware.seu.as.code.plugins.credentials.win.PropertyCredentialsStorage.findCredentials(PropertyCredentialsStorage.java:118)
at de.qaware.seu.as.code.plugins.credentials.DisplayCredentialsTask.onAction(DisplayCredentialsTask.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 68 more
This is related to https://github.com/java-native-access/jna/issues/668 on Windows 10, JNA 4.2.0 (instead of 4.2.2) works, tested with following workaround:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "net.java.dev.jna:jna:4.2.0"
classpath "net.java.dev.jna:jna-platform:4.2.0"
classpath("de.qaware.seu.as.code:seuac-credentials-plugin:2.4.0.RC2") {
exclude group: "net.java.dev.jna"
}
classpath "de.qaware.seu.as.code:seuac-svn-plugin:2.1.1"
}
}
apply plugin: "de.qaware.seu.as.code.credentials"
apply plugin: "de.qaware.seu.as.code.svn"
Thanks for this finding. I will check on my Win10 machine tonight, I have been on Mac most of the time recently. I don't see any problem downgrading the JNA dependencies to 4.2.0. So I will check an prepare a RC3.
I am still on the train, so I can't check on my Win10 machine. Still, I have downgraded to JNA 4.2.0 and published RC3 to Bintray and Gradle plugin repo. Please give it a try.
plugins {
id 'de.qaware.seu.as.code.credentials' version '2.4.0.RC3'
}
Works now, thanks :+1:
The createCredentialsStorage call is now in a project.afterEvaluate block, causing the example below to fail, since in the configuration phase the credentials storage is not yet initialize. Is this change intentional? How should the credentials now be accessed? (The same issue occurs when I want to use the credentials for a subversion task)
The command-line output: