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

Remove JitPack repo from core POM when uploading to Maven Central #430

Closed
michael-o opened this issue Jul 30, 2021 · 4 comments
Closed

Remove JitPack repo from core POM when uploading to Maven Central #430

michael-o opened this issue Jul 30, 2021 · 4 comments

Comments

@michael-o
Copy link

michael-o commented Jul 30, 2021

Please remove this snippet from the POM at least when uploading to Maven Central:

json-schema/core/pom.xml

Lines 283 to 288 in 5210f30

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

It imposes several issues on the developer using your library:

I was able to build the project (core only) from master without JitPack repo and an empty local repo if I use the clone from @erosb and apply the following patch:

osipovmi@deblndw011x:~/var/Projekte/json-schema/core ((1.13.0) *%)
$ git diff
diff --git a/core/pom.xml b/core/pom.xml
index a4595acc..73fdefd4 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -18,8 +18,8 @@
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
-    <groupId>org.everit.json</groupId>
-    <artifactId>org.everit.json.schema</artifactId>
+    <groupId>com.github.erosb</groupId>
+    <artifactId>everit-json-schema</artifactId>
     <version>1.13.0</version>
     <packaging>bundle</packaging>
     <properties>
@@ -138,8 +138,8 @@
                 <configuration>
                     <oldVersion>
                         <dependency>
-                            <groupId>com.github.everit-org.json-schema</groupId>
-                            <artifactId>org.everit.json.schema</artifactId>
+                            <groupId>${project.groupId}</groupId>
+                            <artifactId>${project.artifactId}</artifactId>
                             <version>1.12.3</version>
                             <type>jar</type>
                         </dependency>
@@ -279,11 +279,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <repositories>
-        <repository>
-            <id>jitpack.io</id>
-            <url>https://jitpack.io</url>
-        </repository>
-    </repositories>
 </project>

Note: Hunk 2 can be applied immediately to the origin repo.

PS: I am a Maven core developer

@joshbybee
Copy link

I am also running into this issue in a corporate environment, the jitpack.io download dependency will randomly fail like this during an AzureDevOps pipeline build:

Downloading from : https://jitpack.io/com/github/everit-org/json-schema/org.everit.json.schema/1.9.2/org.everit.json.schema-1.9.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:22 min
[INFO] Finished at: 2021-09-29T13:19:51Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mule-custom-api: Could not resolve dependencies for project com.mycompany:mule-mule-custom-api:mule-application:1.0.0-SNAPSHOT: Could not transfer artifact com.github.everit-org.json-schema:org.everit.json.schema:jar:1.9.2 from/to central (https://repo.maven.apache.org/maven2): Connection reset -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

@michael-o
Copy link
Author

I am also running into this issue in a corporate environment, the jitpack.io download dependency will randomly fail like this during an AzureDevOps pipeline build:

Downloading from : https://jitpack.io/com/github/everit-org/json-schema/org.everit.json.schema/1.9.2/org.everit.json.schema-1.9.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:22 min
[INFO] Finished at: 2021-09-29T13:19:51Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mule-custom-api: Could not resolve dependencies for project com.mycompany:mule-mule-custom-api:mule-application:1.0.0-SNAPSHOT: Could not transfer artifact com.github.everit-org.json-schema:org.everit.json.schema:jar:1.9.2 from/to central (https://repo.maven.apache.org/maven2): Connection reset -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

You have been hit by https://issues.apache.org/jira/browse/WAGON-611. ShitPack, not JitPack.

@erosb erosb closed this as completed in ab8c27b Oct 9, 2021
@erosb
Copy link
Contributor

erosb commented Oct 9, 2021

Version 1.14.0 should be soon available on maven central without depending on jitpack. Please let me know if there are any further problems with it.

@michael-o
Copy link
Author

Version 1.14.0 should be soon available on maven central without depending on jitpack. Please let me know if there are any further problems with it.

Fantastic, thank you!

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

No branches or pull requests

3 participants