Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
netbrain opened this issue May 27, 2016 · 6 comments
Open

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

netbrain opened this issue May 27, 2016 · 6 comments

Comments

@netbrain
Copy link

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
Copy link
Member

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
Copy link
Author

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
Copy link

Tzrlk commented May 2, 2017

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
Copy link

nrktkt commented May 15, 2017

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';

@jitpack-io jitpack-io changed the title Plugin's descriptor contains the wrong version. Maven Plugin's descriptor contains the wrong version. Dec 13, 2018
vsbogd added a commit to vsbogd/snet-sdk-java that referenced this issue Jun 9, 2021
It should fix difference of versions in Jitpack repo and artifacts
itselves. See jitpack/jitpack.io#590
@vsbogd
Copy link

vsbogd commented Jun 9, 2021

JIC the workaround:

  • create jitpack.yml file at the root of your repo
  • put the command to override version into it:
before_install:
  - find . -name "pom.xml" | xargs sed -i "s/<version>master-SNAPSHOT<\/version>/<version>${VERSION}<\/version>/g"

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
Copy link

jdimeo commented Dec 3, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants