DLL in gradleclasspathcontainer

In a subproject, which creates just a Jar with a lib directory, where we pack some jars into it, we have an entry for a DLL. This results into an entry into “gradleclasspathcontainer”, which itself is an Eclipse error:

Archive for required library: ‘Q:/gradleCache/caches/modules-2/files-2.1/com.jacob/jacob/1.17/2754524f1578dda97ed2657bae02036d817152/jacob-1.17-x64.dll’ in project ‘de.uvdms.ui.main’ cannot be read or is not a valid ZIP file
.

Where can I correct this entry? I didn’t find a file representing the"gradleclasspathcontainer".

(This is also funny, because I saw this error - treating a dll as a jar file - before some weeks ago running our Spring based application. It later disappeared, and I don’t know why…).

The ‘gradleclasspathcontainer’ is symbolic entry which injects Gradle dependencies into the Eclipse build classpath in a lazy manner. The implementation is done programatically, if you are interested you can find the code here: https://github.com/eclipse/buildship/blob/master/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/workspace/internal/GradleClasspathContainerInitializer.java

That said there is no manual way to configure it. But this has to be fixed as Buildship shouldn’t add invalid jar entries to the classpath. Would you mind assemble a small demo build what we can use to reproduce the problem?

Hi donat,

I hope the following gives you a reproducible idea.

We’ve defined these library entries:

ext.lib_jacob = [
jacob : ‘com.jacob:jacob:1.17’,
jacob_dll_x86 : ‘com.jacob:jacob:1.17:x86@dll’,
]

In the “build.gradle” of the subproject we have these entries (among some others):

configurations {
rootPluginConfig

dllConfig
}

dependencies {
dllConfig (lib_jacob.jacob_dll_x86)

rootPluginConfig (
        libraries.activemq_client,
        libraries.activemq_pool,
			libraries.activeIO_core,            
        libraries.aopalliance,
        lib_jacob.jacob,        
        // more jars...

)
}
jar {
into (’/lib’) {
from configurations.rootPluginConfig
from configurations.dllConfig
}
}

And we are producing an entry into MANIFEST.MF for the jar:

Bundle-NativeCode: lib/jacob-1.17-x86.dll

Carlo

I was able to reproduce the problem. Here is a bugzilla for this issue in case you want to subscribe to the updates: https://bugs.eclipse.org/bugs/show_bug.cgi?id=467234
Once this issue is resolved I’ll update this thread too.

We have released a new snapshot version of Buildship which contains a fix to your problem. You can use the http://download.eclipse.org/buildship/updates/snapshots/1.0/ update site to test it.