graphstream / gs-core

Graphstream core
http://graphstream-project.org/
Other
398 stars 109 forks source link

Publish the library on maven central #349

Closed DanySK closed 3 years ago

DanySK commented 3 years ago

Hi, I see that older versions of the library were published on Maven Central. I'd like to integrate graphstream with a scientific simulator for pervasive computing, but I need to depend on libraries published on Central, as the simulator is hosted (also) there.

Any chance for the release 2.0.0 to be made available there?

Thanks

hichbra commented 3 years ago

Hi, It's not planned for the moment, sorry.

DanySK commented 3 years ago

Understood. Since the license seems to allow for redistribution, would you mind if I fork and publish this work myself on central?

pigne commented 3 years ago

Graphstream 2.0 now uses the jitpack repository. You just need to add it to your gradle config:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

and then add the dependencies :

dependencies {
        implementation 'com.github.graphstream:gs-core:2.0'
}

It should not affect your other dependencies hosted on Maven Central.

When you say "I need to depend on libraries published on Central", are you implying that libraries hosted on Maven Central can only rely on dependencies also hosted on Maven Central? That would be sad.

DanySK commented 3 years ago

That is correct. I do know how to import gs, and I'm actually experimenting with it already (I'm using gradle kts, so the syntax is slightly different than the one you proposed for groovy).

The problem is the one you pinpointed: stuff on central should only depend from other stuff on central, and that's actually pretty reasonable: otherwise your users need to specify multiple sources to pull in transitive dependencies.

Anyway, my first experiments with gs are so promising that I'm really tempted to just publish it on central myself.

I'm actually thinking of refactoring it to a gradle multiproject and then publish it there.

Is there any restriction in this sense that I've missed? I've read the license and seems rather permissive with regard to modification and redistribution.

On Wed, Sep 9, 2020, 22:58 Yoann Pigné notifications@github.com wrote:

Graphstream 2.0 now uses the jitpack https://jitpack.io/#graphstream/gs-core/2.0 repository. You just need to add it to your gradle config:

allprojects { repositories { ... maven { url 'https://jitpack.io' } } }

and then add the dependencies :

dependencies { implementation 'com.github.graphstream:gs-core:2.0' }

It should not affect your other dependencies hosted on Maven Central.

When you say "I need to depend on libraries published on Central", are you implying that libraries hosted on Maven Central can only rely on dependencies also hosted on Maven Central? That would be sad.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/graphstream/gs-core/issues/349#issuecomment-689818524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPGH6I6UERYBPAC4YSHGFTSE7UAVANCNFSM4RCXAPGQ .

DanySK commented 3 years ago

Hi, I forked the subprojects I needed (core, algo, swing), created a Gradle build for them, repackaged, patched #351, and prepared a deploy. The parent project is this one.

Version 2.0.0 with a patch for #351 will be soon available on Maven Central (~20 min from my post). Artifact ids are:

I'm leaving this message here, should anyone need the library from Central. Anyway, I advocate that this library really deserves to be "officially" distributed on Central. It's not much of a difference for those writing applications, but it does for who writes libraries that want to use graphstream as a dependency. So I kindly ask @hichbra and @pigne to consider deploying future versions also there besides jitpack (bonus: deploying on Central makes the library also available on Bintray/JCenter).

Thanks

pigne commented 3 years ago

GraphStream packages for version 2.0 are now available on Maven Central.

<dependency>
  <groupId>org.graphstream</groupId>
  <artifactId> gs-core | gs-algo | gs-ui-javafx | gs-ui-swing | gs-ui-android </artifactId>
  <version>2.0</version>
</dependency>
DanySK commented 3 years ago

Wow, thanks!