I am migrating from Maven to Gradle. My Gradle dependencies were initially created by calling ‘gradle init’ > and choosing to generate a Gradle build from my legacy Maven build. ‘gradle init’ thus generated dependencies including dependency pom artifacts:
dependencies {
[..]
api 'com.rockwell.delivery.ps:all-pharmasuite-dsx-digest:11.1.0.HF5.1-SNAPSHOT'
This artifact is in fact a pom file. There is no jar by this GAV.
Question: Are dependency poms valid as Gradle dependencies?
In any case, org.xtext.builder does not handle this dependency correctly.
I am using org.xtext.builder 4.0.0 to process our DSL. Calling generateXtext failes with:
* What went wrong:
Execution failed for task 'generateXtext'.
> java.util.zip.ZipException: zip END header not found
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task 'generateXtext'.
[..]
Caused by: java.util.zip.ZipException: zip END header not found
at org.eclipse.xtext.mwe.PathTraverser.traverseArchive(PathTraverser.java:58)
Debugging into org.xtext.builder I find org.xtext.gradle.builder.XtextGradleBuilder.indexChangedClasspathEntries() is calling PathTraverser().findAllResourceUris(dirtyClasspathEntry.path) with the path to my dependencyManagement pom.xml.
TODO: PathTraverser.traverseArchive(PathTraverser.java:58) - the code that tries to open this path as ZipFile - would greatly profit from error handling that logs a descriptive error message.