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

Ability to retain original groupId & artifactId #1029

Open
jglick opened this issue Dec 21, 2016 · 2 comments
Open

Ability to retain original groupId & artifactId #1029

jglick opened this issue Dec 21, 2016 · 2 comments

Comments

@jglick
Copy link

jglick commented Dec 21, 2016

The need to pick a distinct GA when using jitpack is problematic, since Maven then treats the artifact as unrelated to the “real” one. An example of a problem that you can hit is that the dependency resolution algorithm “prefer nearest” breaks down when there are dependency trails to both the jitpack and regular versions of the same dependency: Maven will include both in the dependency graph, causing mayhem.

Here in jenkinsci/workflow-job-plugin#27 you can see an example of the fragile workaround of excludeing the regular versions. This is onerous enough that I think I would rather go back to deploying timestamped snapshots (obviously only an option if you have upload permission to a relevant repository).

Would it be possible to allow you to keep the original GA and encode the repository information in the version instead? For example, rather than

<dependency>
    <groupId>com.github.jglick</groupId>
    <artifactId>workflow-api-plugin</artifactId>
    <version>ea218b9</version>
</dependency>

I would much rather see

<dependency>
    <groupId>org.jenkins-ci.plugins.workflow</groupId>
    <artifactId>workflow-api</artifactId>
    <version>com.github:jglick:workflow-api-plugin:ea218b9</version>
</dependency>

or even (for better behavior with, e.g., versions:display-dependency-updates)

<dependency>
    <groupId>org.jenkins-ci.plugins.workflow</groupId>
    <artifactId>workflow-api</artifactId>
    <version>2.9-com.github:jglick:workflow-api-plugin:ea218b9-SNAPSHOT</version>
</dependency>

where the dependency is

<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.9-SNAPSHOT</version>
@lex-em
Copy link

lex-em commented Dec 28, 2017

Hi, is there some news about this feature?

@davibicudo
Copy link

Hi, any news on this enhancement?

inodb added a commit to cBioPortal/maven-external-version that referenced this issue Dec 7, 2018
Requires hardcoding the name of the repo in ExternalVersionExtension, because
jitpack overrides groupId:

jitpack/jitpack.io#1029

Furthermore, for multi-module projects there can only be one groupId:

jitpack/jitpack.io#2872

So changed everything to be in *.version (i.e. not in *.plugin). Maven
complains that maven-*-plugin should be in groupId org.apache.maven.plugins,
but works anyway.
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

4 participants