restlet-framework-java icon indicating copy to clipboard operation
restlet-framework-java copied to clipboard

Synchronize with central Maven repository

Open thboileau opened this issue 12 years ago • 43 comments

Initial ticket : http://restlet.tigris.org/issues/show_bug.cgi?id=497

thboileau avatar Mar 14 '12 10:03 thboileau

I'm not really sure why it is necessary that Sonatype supports pulling from the Restlet Maven repo, cannot you just push the built artifact into it during your build process? This should be simple to implement, would keep your Maven repo as the master and would it make possible to use OSS as is, now. (I'm not sure that Sonatype will be willing to do what you want.)

It would be nice to have Restlet in the Maven Central ASAP.

holyjak avatar Apr 02 '12 08:04 holyjak

Just now discovering restlet -- would love to use it to stub out external dependencies, but I've spent the last few hours trying to get a simple maven project that depends on the restlet jars working inside Eclipse.

The extra config required for an alternate repository is a real downer. I would be happy to help automate publication to maven central as part of the build process.

hoodja avatar Nov 22 '12 22:11 hoodja

Ok, let's move in this direction: pushing to Sonatype repo in addition to our master repository.

Your contribution on this front would be welcome.

jlouvel avatar Nov 27 '12 08:11 jlouvel

How does the removal of pom.xml files in 2.2 in the master branch affect maven support?

bce55cec41efc1ba4697f1885d895e3ab480deef

ansell avatar Dec 04 '12 06:12 ansell

Hi ansell,

This is by no means authoritative, but from what I can see the pom files are generated as part of the build process. So the project does not use maven to accomplish its build, but it does support project that use maven by publishing poms and artifacts into a maven repository.

I'm now working on enhancing that build process so that the artifacts may be published to maven central in addition to the restlet master repo.

Hope this helps. Jim

hoodja avatar Dec 04 '12 14:12 hoodja

That sounds good. I was a little alarmed by the 2.2 draft release notes that seemed to say that Maven was going away.

It will make it possible for me to deploy my restlet-related projects to Maven Central once Restlet is deploying there (unless someone does a Third-Party Artifact Upload, which is impractical for a project as large as Restlet).

ansell avatar Dec 05 '12 00:12 ansell

I confirm that the removal of pom.xml in GitHub is just to facilitate their maintenance and the usage of Eclipse IDE which otherwise tries to process them instead of using the regular Eclipse project files provided.

We still generate those poms and the repo metadata as part of the build process.

Thanks Jim for working on this!

jlouvel avatar Dec 10 '12 18:12 jlouvel

Pushing to Sonatype (oss.sonatype.org, OSO in short) can be integrated as "after step" too, you don't have to integrate it into your build, and you can just "push" the things after you did your own "homework" on your build.

For example, this is how we maintain and deploy our patched Restlet 1.1 for Nexus needs: https://github.com/sonatype/restlet1x

In short, we build the Restlet 1.1 "as is", using provided Ant script, and luckily :) the build produces all we need.

For OSO push, the requirements are a bit stricter: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-6.CentralSyncRequirement

This means, you will probably need to update the POMs (ensure required elements like developers and SCM are in place), -sources was already built by restlet 1.1 build so that should not be a problem, would need -javadoc (maybe already built by 2.x build), all files would need SHA1/MD5 hashes (again, already done by restlet 1.1 build), and PGP signatures would need to be provided.

Finally, as for actual "staging" on OSO, you could use Repository Image Upload of Nexus Staging Maven plugin, to upload the locally "prepared" Restlet released artifacts (prepped as a repository).

cstamas avatar Apr 16 '13 08:04 cstamas

Oh, and OSO should work fine with Ant staging tasks too: https://github.com/sonatype/nexus-ant-tasks/tree/master/nexus-staging-ant-tasks

cstamas avatar Apr 16 '13 09:04 cstamas

Set milestone to 2.2.0. Let's get this done before the 2.2 release.

jlouvel avatar Feb 08 '14 02:02 jlouvel

Let's try to make some progress on this for 2.2 RC2.

jlouvel avatar Feb 10 '14 19:02 jlouvel

Statistics from Maven Central repository would still be available: http://blog.sonatype.com/2010/12/now-available-central-download-statistics-for-oss-projects/#.U020r_ldU7I

jlouvel avatar Apr 15 '14 22:04 jlouvel

Hi, it appears that we have a transitive dependency issue with Apache Solr depending on Restlet, which leads to random build failures for our project (see https://jira.duraspace.org/browse/DS-1921 for more details). We're keeping on eye on #481, and look forward to simply pulling restlet straight from Maven Central.

hardyoyo avatar Apr 16 '14 20:04 hardyoyo

Set milestone to 2.3 M3. @thboileau let's try to push this further finally :)

jlouvel avatar May 02 '14 06:05 jlouvel

Still can't reach restlet artifacts from maven central

davidecavestro avatar Jul 01 '14 08:07 davidecavestro

We're experiencing the same issue as @hardyoyo - it would be really great if your artifacts could make it up to maven central! =)

daubman avatar Jul 09 '14 19:07 daubman

Thanks for all the feed-back, @thboileau has made some progress in the past few days. Thierry can you give us an update?

jlouvel avatar Jul 10 '14 04:07 jlouvel

It looks like this is still targeted for the 2.3 M4 milestone. Any chance that we'll see this change before October of 2014? I'm hoping we can close our transitive dependency issue (DS-1921) for our next release. Thanks!

hardyoyo avatar Jul 30 '14 21:07 hardyoyo

Any progress on this? Our release is drawing close.

helix84 avatar Oct 17 '14 11:10 helix84

@jlouvel: Hi, could you please tell us why you changed the feature milestone to Unplanned? This seems to affect a lot of people, so an explanation seems to be in order. Perhaps @thboileau could tell us what the problem is? Thanks in advance.

helix84 avatar Nov 14 '14 13:11 helix84

This issue is now part of the 3.0 scope detailed here: https://github.com/restlet/restlet-framework-java/wiki/Road-map-of-version-3.0 We just haven't set the detailled 3.0 milestones in GitHub.

If the uptime of Restlet Maven repository is the real concern, we have made progress on this front and now have a new bigger machine, better protection from attacks and a dedicated ops team that takes care of those aspects.

In the last six months we had an uptime of 99,98% for this repository. You can check on our status page for the history: http://stats.pingdom.com/0dzusgw4evae

jlouvel avatar Nov 16 '14 02:11 jlouvel

Another tool mentioned by @glaforge that could help us is Bintray in complement to Sonatype OSS. It can help synchronize to Maven Central: https://bintray.com/docs/usermanual/uploads/uploads_syncingartifactswithmavencentral.html

jlouvel avatar Aug 14 '15 17:08 jlouvel

Not having restlet in central is biting camel-restlet, wildfly-camel and wildfly-swarm.

Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.restlet.jee:org.restlet.ext.httpclient:jar:2.3.6 in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced
    at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
    at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)

Any chance of fixing this in the near future?

tdiesler avatar May 11 '16 13:05 tdiesler

@tdiesler Definitely, we are going to solve this issue as soon as possible. I'm going to try to meet with the Bintray team next week at their SwampUP conference and dig more into this Central sync need.

jlouvel avatar May 18 '16 20:05 jlouvel

To get us started, I've created the issue to get the setup in Sonatype OSS repository: https://issues.sonatype.org/browse/OSSRH-22534

jlouvel avatar May 18 '16 20:05 jlouvel

Next steps we'll need to get done are described here: http://central.sonatype.org/pages/requirements.html

In our case:

  • Sign Files with GPG/PGP (see details here: http://central.sonatype.org/pages/working-with-pgp-signatures.html)

Also we'll likely need to:

  • Add a dependency on http://maven.restlet.com to make sure special dependencies not in Central are properly resolved

@thboileau Do you think you could take care of those steps sometimes soon?

jlouvel avatar May 18 '16 20:05 jlouvel

Sonatype team has been pretty reactive. We are now able to push snapshot to their OSS buffer repository, and do the staging and releases steps, assuming we pass the quality checks (signatures esp.).

jlouvel avatar May 23 '16 23:05 jlouvel

here are the required steps before pushing to OSS repository:

  • complete the metadata of each artefacts (licenses, developpers, SCM Information)
  • sign each artefacts with GPG/PGP

thboileau avatar May 28 '16 08:05 thboileau

Is this still planned? Would be really great if restlet was available in Maven central.

janstey avatar Dec 07 '16 16:12 janstey

There is still a bit of work to do to make it happen, but @thboileau has already done most of it. I'll let him comment on whether he can make it work for RF v2.3, but this is definitely something we will have for RF v3.

jlouvel avatar Dec 08 '16 00:12 jlouvel