metafacture / metafacture-core

Core package of the Metafacture tool suite for metadata processing.
https://metafacture.org
Apache License 2.0
69 stars 34 forks source link

Snapshot in sonatype #411

Closed hagbeck closed 2 years ago

hagbeck commented 2 years ago

Hi,

is it possible to add snapshots or release candidates of metafacture to Maven Central? Advantage: We could use important fixes in java/maven environments a.s.a.p. without local building.

blackwinter commented 2 years ago

I stumbled across this section in the README last week:

Our integration server automatically publishes successful builds of all branches as snapshot versions on Sonatype OSS Repository.

But this doesn't seem to be the case anymore (the last master-SNAPSHOT is from May 2021).

An alternative could be to publish (pre-)releases on the Github Maven repository (see also Working with the Gradle registry).

blackwinter commented 2 years ago

We could use important fixes in java/maven environments a.s.a.p. without local building.

Depending on your particular circumstances, it might also be possible for you to declare a source dependency on the appropriate branch (cf. metafacture/metafacture-fix#15).

dr0i commented 2 years ago

We used to use travis as integration server but had troubles with travis and sonatype since sonatype changed some policies (see https://github.com/metafacture/metafacture-core/issues/311). I personally doubt that it is a good idea to "publish[es] successful builds of all branches as snapshot versions " - wouldn't that be a bit too much? Anyway, you asked for it, so... @blackwinter I remember that there are some snaphsot builds but I cannot find them . Where did you see a master-SNAPHOST build? I only see regular releases in https://github.com/metafacture/metafacture-core/releases (and two release candidates in 2018) in https://repo1.maven.org/maven2/org/metafacture/metamorph/ . I do see, however, github packages, the latest build on 7. September (https://github.com/orgs/metafacture/packages?repo_name=metafacture-core)

Note that we agreed to release more often, i.e. quarterly.

Atm there are several manually steps needed to publish to maven central (see https://github.com/metafacture/metafacture-core/wiki/Maintainer-Guidelines) and it seems easier to provide snapshots using github actions and github packages. What this be good enough for you @hagbeck ?

blackwinter commented 2 years ago

Where did you see a master-SNAPHOST build?

The README refers to Sonatype OSS, not Maven Central. Here's the master-SNAPSHOT.

hagbeck commented 2 years ago

For me master-SNAPSHOTs are ok if they are up to date :-)

dr0i commented 2 years ago

Ah, thx, wasn't aware of this (couldn't find it) ! So it seems that a SNAPSHOT is/was published via e.g. https://oss.sonatype.org/content/repositories/snapshots/org/metafacture/metamorph/master-SNAPSHOT/. Yes, that could be done.

dr0i commented 2 years ago

Uploaded the latest master-SNAPSHOT manually. There is no automatic building of snapshots atm because we would need to have a project's login at github for OSS (will not place my own secrets here). Use it like:

<dependency>
  <groupId>org.metafacture</groupId>
  <artifactId>metafacture-xml</artifactId>
  <version>master-SNAPSHOT</version>
</dependency>

Don't forget to configure the URL of the repo in pom.xml (or ~/.m2/settings.xml) like:

 <repositories>
    <repository>
      <id>oss.sonatype.org-snapshot</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

Be aware that those snapshots come with little guarantee.

As noted we will release more frequently and this sporadic snapshots are not done automatically. You also may want to shoutout here so that I can upload a snapshot. @hagbeck is this ok for you atm?

hagbeck commented 2 years ago

I've configured the master-SNAPSHOT and it works as expected. And its ok for me to shout out if I want an update :-)

dr0i commented 2 years ago

OK, good to hear @hagbeck! I updated the title to "Snapshot in sonatype". Closing.

dr0i commented 2 years ago

Just a note - did rebuild and upload a new master-SNAPSHOT to oss.sonatype.org. This can happen more often now.