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

Unable to download the dependencies from maven central #123

Closed
born2snipe opened this issue Jul 8, 2018 · 6 comments
Closed

Unable to download the dependencies from maven central #123

born2snipe opened this issue Jul 8, 2018 · 6 comments

Comments

@born2snipe
Copy link

I was looking through the TravisCI logs for when you are publishing the braingdx jar to maven central and I see the code is compiling fine. I just could not find how you are accessing the universal-tween-engine artifact from your CI box. I originally assumed you just did an mvn install:install-file on your local dev machine to keep things moving along, but after seeing your TravisCI build worked I am guessing there is some black magic going on. :)

Dependencies in question:

  • aurelienribon.tweenengine:universal-tween-engine:6.3.3
  • com.badlogicgames.box2dlights:box2dlights:1.5-20170524.182408-1

For what it is worth I did see there is an artifact to the universal-tween-engine in maven central:

  <dependency>
    <groupId>org.mini2Dx</groupId>
    <artifactId>universal-tween-engine</artifactId>
    <version>6.3.3</version>
  </dependency>
@bitbrain
Copy link
Owner

bitbrain commented Jul 9, 2018

Hello,

I can explain the "black magic" bit you were mentioning. When I started with braingdx the universal-tween-engine dependency did not exist within Maven Central, so I had to build it myself and upload it to the custom nexus. This can be easily resolved by replacing it with the dependency you mentioned:

<dependency>
   <groupId>org.mini2Dx</groupId>
   <artifactId>universal-tween-engine</artifactId>
   <version>6.3.3</version>
</dependency>

The more tricky bit is box2dlights. The latest version available in Maven Central is 1.4, which comes with an annoying bug where you can not combine FrameBuffer instances within the box2dlights render context. This is required by braingdx to work, since we want to use lighting together with shaders and other render layers. (see LightingManagerRenderLayer class). As a result, I have built a custom version of box2dlights where the issue had been fixed. (see this merged PR back from 2015).
It has been merged but never got released. I do not know what is preventing them from releasing a hotfix (1.4.1) where this commit is cherry-picked into box2dlights. I might want to contact these guys so we do not have to rely on com.badlogicgames.box2dlights:box2dlights:1.5-20170524.182408-1 anymore.

Could you provide error output? What exactly is failing? Even when relying on these custom dependencies your download should not fail.

PS: I even created a ticket once but no one ever responded. 👎

PS 2: they just responded and it seems they are preparing 1.5 now. I will then modify the pom of braingdx so we are only relying on Maven Central dependencies from now on. This should eradicate all issues you have.

@born2snipe
Copy link
Author

The problem is gradle is just failing to locate the JARs in maven central.

~/Dev/temp/learning-braingdx ⌚ 6:59:38
$ ./gradlew build
Configuration on demand is an incubating feature.
:core:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':core:compile'.
> Could not find com.badlogicgames.box2dlights:box2dlights:1.5-20170524.182408-1.
  Searched in the following locations:
      https://repo1.maven.org/maven2/com/badlogicgames/box2dlights/box2dlights/1.5-20170524.182408-1/box2dlights-1.5-20170524.182408-1.pom
      https://repo1.maven.org/maven2/com/badlogicgames/box2dlights/box2dlights/1.5-20170524.182408-1/box2dlights-1.5-20170524.182408-1.jar
      https://oss.sonatype.org/content/repositories/snapshots/com/badlogicgames/box2dlights/box2dlights/1.5-20170524.182408-1/box2dlights-1.5-20170524.182408-1.pom
      https://oss.sonatype.org/content/repositories/snapshots/com/badlogicgames/box2dlights/box2dlights/1.5-20170524.182408-1/box2dlights-1.5-20170524.182408-1.jar
      https://oss.sonatype.org/content/repositories/releases/com/badlogicgames/box2dlights/box2dlights/1.5-20170524.182408-1/box2dlights-1.5-20170524.182408-1.pom
      https://oss.sonatype.org/content/repositories/releases/com/badlogicgames/box2dlights/box2dlights/1.5-20170524.182408-1/box2dlights-1.5-20170524.182408-1.jar
  Required by:
      learning-braingdx:core:1.0 > io.github.bitbrain:braingdx-core:0.2.10
> Could not find aurelienribon.tweenengine:universal-tween-engine:6.3.3.
  Searched in the following locations:
      https://repo1.maven.org/maven2/aurelienribon/tweenengine/universal-tween-engine/6.3.3/universal-tween-engine-6.3.3.pom
      https://repo1.maven.org/maven2/aurelienribon/tweenengine/universal-tween-engine/6.3.3/universal-tween-engine-6.3.3.jar
      https://oss.sonatype.org/content/repositories/snapshots/aurelienribon/tweenengine/universal-tween-engine/6.3.3/universal-tween-engine-6.3.3.pom
      https://oss.sonatype.org/content/repositories/snapshots/aurelienribon/tweenengine/universal-tween-engine/6.3.3/universal-tween-engine-6.3.3.jar
      https://oss.sonatype.org/content/repositories/releases/aurelienribon/tweenengine/universal-tween-engine/6.3.3/universal-tween-engine-6.3.3.pom
      https://oss.sonatype.org/content/repositories/releases/aurelienribon/tweenengine/universal-tween-engine/6.3.3/universal-tween-engine-6.3.3.jar
  Required by:
      learning-braingdx:core:1.0 > io.github.bitbrain:braingdx-core:0.2.10

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.94 secs

@bitbrain
Copy link
Owner

bitbrain commented Jul 9, 2018

Ahh, I see what the issue is. It seems right now the following is still mandatory:

<repositories>
   <repository>
      <id>k40s</id>
      <name>k40s</name>
      <url>https://nexus.k40s.net/repository/maven-public</url>
   </repository>
</repositories>

and for gradle respectively:

repositories {
    maven {
        url "https://nexus.k40s.net/repository/maven-public"
    }
}

However, this will not work due to #122. Which means the following for braingdx:

when relying on a custom Nexus repository, ensure that all transitive dependencies are available. Partially moving dependencies over to Maven Central is not sufficient!

Lessions learnt. Hopefully this week we can move fully to Maven Central by using universal-tween-engine and box2dlights respectively.

DISCLAIMER the wiki is not up-to-date yet. I will do big progress this week to make it much more easy to understand braingdx!

@bitbrain
Copy link
Owner

fyi: libgdx/box2dlights@08cf93a

@bitbrain
Copy link
Owner

bitbrain commented Jul 10, 2018

@born2snipe Please try again with version 0.2.11.2 - it does not have any "black magic" dependency anymore. It currently depends on box2dlights 1.5-SNAPSHOT however will change it to pure 1.5 when box2dlights is released.

Today I finished #124 which allows me to do deploy very fast (uploading to Maven Central, creating a git tag and generating Javadoc). You can find the newest Javadoc of braingdx here. Let me know if it works for you now so I can close off this issue. Thanks! ❤️

@born2snipe
Copy link
Author

$ ./gradlew build
Configuration on demand is an incubating feature.
:core:compileJava
Download https://repo1.maven.org/maven2/io/github/bitbrain/braingdx-core/0.2.11.2/braingdx-core-0.2.11.2.pom
Download https://repo1.maven.org/maven2/io/github/bitbrain/braingdx/0.2.11.2/braingdx-0.2.11.2.pom
Download https://oss.sonatype.org/content/repositories/snapshots/com/badlogicgames/box2dlights/box2dlights/1.5-SNAPSHOT/box2dlights-1.5-20180710.103344-36.pom
Download https://repo1.maven.org/maven2/io/github/bitbrain/braingdx-core/0.2.11.2/braingdx-core-0.2.11.2.jar
Download https://oss.sonatype.org/content/repositories/snapshots/com/badlogicgames/box2dlights/box2dlights/1.5-SNAPSHOT/box2dlights-1.5-20180710.103344-36.jar
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
:core:processResources UP-TO-DATE
:core:classes
:core:jar
:core:assemble
:core:compileTestJava UP-TO-DATE
:core:processTestResources UP-TO-DATE
:core:testClasses UP-TO-DATE
:core:test UP-TO-DATE
:core:check UP-TO-DATE
:core:build
:desktop:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
:desktop:processResources UP-TO-DATE
:desktop:classes
:desktop:jar
:desktop:assemble
:desktop:compileTestJava UP-TO-DATE
:desktop:processTestResources UP-TO-DATE
:desktop:testClasses UP-TO-DATE
:desktop:test UP-TO-DATE
:desktop:check UP-TO-DATE
:desktop:build

BUILD SUCCESSFUL

Total time: 9.853 secs

Download successful! 👍

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

2 participants