fn icon indicating copy to clipboard operation
fn copied to clipboard

Make release artifacts available on Maven Central

Open dashorst opened this issue 5 years ago • 6 comments

For wider adoption of the FN project the Java artifacts should not only be available from bintray, but distributed properly through Maven Central. This will appease the Corporate Overlords who restrict repository access to only stuff that is available through Maven Central.

There is no reason why you should not do it, other than it being _a bit of work_™. As it currently stands, using FN project will require enterprise developers to have to _Ask for Permission_™ rather than _Ask for Forgiveness_™ as the gatekeepers restrict downloading the FN release artifacts.

Steps to reproduce the issue:

  1. go to search.maven.org
  2. type in g:com.fnproject.fn
  3. press enter

Describe the results you received:

nothing

Describe the results you expected:

A list of all released (Java) artifacts by the FN-project.

Further analysis

Apparently not shipping the Java release artifacts to Maven Central prohibits using the build tooling as described, unless one goes around the company policies and use a <repository> element in the project pom circumventing ~/.m2/settings.xml. The fn build command conveniently ignores the user installed settings.xml, and hence ignores any corporate (or personal) policies.

If the <repository> element pointing to bintray is not present in the project's POM, then currently any fn build call will fail because the released artifacts are not present on Maven Central:

[ERROR] Failed to execute goal on project banana-status: Could not resolve dependencies for project education.topicus.banana:banana-status:jar:1.0.0: The following artifacts could not be resolved: com.fnproject.fn:api:jar:1.0.85, com.fnproject.fn:testing-core:jar:1.0.85, com.fnproject.fn:testing-junit4:jar:1.0.85: Failure to find com.fnproject.fn:api:jar:1.0.85 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR] 

Performing a mvn package directly in the terminal will work, as the user supplied Maven honors the settings.xml file and goes through the company repository. I will create a separate ticket in the cli project for this.

dashorst avatar Feb 17 '19 11:02 dashorst

Hi! As far as I understand Maven central is for Java projects only. Under Fn umbrella there only 2 projects: FDK-Java and flow-lib-java. The rest of the projects available on their native package distribution systems like PYPI, github, docker, etc.

So, I’m not sure that it’s possible. Correct me if I’m wrong or missing something.

denismakogon avatar Feb 17 '19 12:02 denismakogon

The issue has mostly to do with the Java artifacts. I have no idea which subproject is responsible for publishing those.

dashorst avatar Feb 17 '19 15:02 dashorst

FDK-Java release script is responsible for that.

denismakogon avatar Feb 17 '19 16:02 denismakogon

Here’s the link https://github.com/fnproject/fdk-java.

cc @zootalures

denismakogon avatar Feb 17 '19 16:02 denismakogon

Thanks for the feedback - We made a decision not to publish on maven central in the early stages of the project which led to the current bintray repo model. The reasoning was that this gave us more control (and led to faster release cycles for developers) - MC's index can take a few hours (or longer) to update and we have been releasing the FDK on a fairly regular cadence sometimes to coincide with resolving breaking changes in the FDK contract. We didn't want to have to account for this latency in people up-taking the changes.

Going forward being on MC makes sense - we are approaching a stability milestone (around June) where we will guarantee backward compatibility in the FDK contract, that's when we should co-publish to MC.

zootalures avatar Feb 17 '19 16:02 zootalures

Assuming that MavenCentral artifacts are not coming anytime soon, could the Java API artifact at least be synced to JCenter? It's only a single button click in the Bintray UI and the artifacts are usually synced within a couple of minutes 😄

daviddenton avatar Oct 28 '20 09:10 daviddenton