jitpack / jitpack.io

Documentation and issues of https://jitpack.io
MIT License
2.51k stars 183 forks source link

Maven Plugin's descriptor contains the wrong version. #590

Open netbrain opened 8 years ago

netbrain commented 8 years ago

After adding dependency through jitpack i'm getting the following error:

Invalid plugin descriptor for com.github.temyers:cucumber-jvm-parallel-plugin:f6d7c3029d (Plugin's descriptor contains the wrong version: 1.3.0-SNAPSHOT -> [Help 1]

This happens when im trying to fetch a branch as a dependency. It would seem for the solution to be to rewrite the xml file and replace 1.3.0-SNAPSHOT with the commit hash.

jitpack-io commented 8 years ago

Is it possible to override the version in plugin's descriptor during build time? Perhaps it can be replaced with the version that was requested through JitPack

netbrain commented 8 years ago

Not through maven I think. I believe it has to be solved on the server side during build where jitpack then would replace the version in the pom.xml file.

Tzrlk commented 7 years ago

From stackoverflow:

oldId="org.old.groupId"
newId="org.new.groupId"
find . -name "pom.xml" \
    | xargs sed -i "s/<groupId>${oldId}<\/groupId>/<groupId>${newId}<\/groupId>/g"

Haven't tested it myself, but it seems legit.

nrktkt commented 7 years ago

Same issue on SBT with dependencies in a branch.

java.text.ParseException: inconsistent module descriptor file found in 'https://jitpack.io/com/github/myorg/repo/submodule_2.11/develop-b2122a75b1-1/submodule_2.11-develop-b2122a75b1-1.pom': bad revision: expected='develop-b2122a75b1-1' found='develop-SNAPSHOT';

vsbogd commented 3 years ago

JIC the workaround:

Here I suppose that your master has a version master-SNAPSHOT, ${VERSION} is a variable provided by Jitpack. See Jitpack Build Environment and Jitpack Custom Commands.

jdimeo commented 2 years ago

This is also a problem when you need to use com.github.xxx as the group ID but don't want to or can't easily change the "real" group ID to match