0

I want to make an executable jar in Gradle:

task fatJar(type: Jar) { manifest { attributes ( 'Main-Class': 'com.mycompany.json_validator.Main' ) } baseName 'json-validator' from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } with jar } 

But i have an error from Gradle "Could not expand ZIP ..... archive is not a ZIP archive". I have this error on dependency, which is not .jar, it is pom.

compile group: 'org.glassfish.jersey', name: 'jersey-bom', version: '2.17', ext: 'pom' 

How can i make an executable jar with it?

1 Answer 1

1

This appears to be the same issue described here: Gradle trying to unzip a pom typed dependency

The answer there describes what is happening and a possible remedy.

Alternatively, it should execute if you remove , ext: 'pom' from your dependency though I don't know if this is what you are going for.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.