jackson-bom icon indicating copy to clipboard operation
jackson-bom copied to clipboard

2.17 Gradle Platform and Catalog

Open elect86 opened this issue 1 year ago • 11 comments

As titled, this is on the same line as Scijava

During the publication, Maven will run Gradle to generate the Platform (Gradle counterpart for Maven BOM) and Catalog

image

The cool thing is that Maven and Gradle consumers will use both the very same coordinate, but each of them will actually consume only its corresponding system: pom.xml for Maven, module.json for Gradle.

I just tried/tested this locally within Gradle only, so, please, give me a feedback whether this is working also from Maven on your CI

elect86 avatar Jan 31 '25 11:01 elect86

Ok, I am bit confused here. So, I thought this would be the alternative to flattening versions... but looks like PR also contains flattening changes?

cowtowncoder avatar Jan 31 '25 19:01 cowtowncoder

Looks like CI wasn't enabled for PRs (haven't gotten too many), enabled now.

cowtowncoder avatar Jan 31 '25 19:01 cowtowncoder

Ok, I am bit confused here. So, I thought this would be the alternative to flattening versions... but looks like PR also contains flattening changes?

Sorry, this was supposed to take some time before getting it to work (since the one in Scijava lasted quite long), so I prepared this in the meanwhile, while the other one could be merged right away

However I should have switched back branch before creating a new one, ~let's close this one and create a new one~

Or let me revert the flattening and fix the .gitattributes on this one since the flattening is already merged

elect86 avatar Feb 01 '25 10:02 elect86

Ok, it should be back on track now

Sorry for all the noise..

elect86 avatar Feb 01 '25 10:02 elect86

CI fails (looks like I need to manually approve CI runs since it's your first contribution), need to specify plug-in version(s).

cowtowncoder avatar Feb 06 '25 18:02 cowtowncoder

Sorry for the late reply

I might write some brief javadoc, if still interested

need to specify plug-in version(s).

Also, is this still relevant?

elect86 avatar Apr 14 '25 09:04 elect86

Sorry for the late reply

I might write some brief javadoc, if still interested

need to specify plug-in version(s).

Also, is this still relevant?

Yes. You haven't tried Maven build for the project? It fails on CI -- see Checks.

Locally fails for me with

./mvnw clean compile

cowtowncoder avatar Apr 14 '25 20:04 cowtowncoder

Yes. You haven't tried Maven build for the project? It fails on CI -- see Checks.

No sorry, I didn't pay attention, but yeah, you are right

However mvnw clean compile runs fine on mine, weird

elect@gibanb02:~/IdeaProjects/jackson-bom$ ./mvnw clean compile [INFO] Scanning for projects... [INFO] Inspecting build with total of 2 modules... [INFO] Installing Nexus Staging features: [INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] Jackson BOM [pom] [INFO] Jackson Base [pom] [INFO] [INFO] -----------------< com.fasterxml.jackson:jackson-bom >------------------ [INFO] Building Jackson BOM 2.19.0-SNAPSHOT [1/2] [INFO] from pom.xml [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- clean:3.4.1:clean (default-clean) @ jackson-bom --- [INFO] [INFO] --- enforcer:3.5.0:enforce (enforce-java) @ jackson-bom --- [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed [INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed [INFO] Rule 2: org.apache.maven.enforcer.rules.RequirePluginVersions passed [INFO] [INFO] --- build-helper:3.6.0:add-source (add-generated-sources) @ jackson-bom --- [INFO] Source directory: /home/elect/IdeaProjects/jackson-bom/target/generated-sources added. [INFO] [INFO] -----------------< com.fasterxml.jackson:jackson-base >----------------- [INFO] Building Jackson Base 2.19.0-SNAPSHOT [2/2] [INFO] from base/pom.xml [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- clean:3.4.1:clean (default-clean) @ jackson-base --- [INFO] [INFO] --- build-helper:3.6.0:regex-property (regex-property) @ jackson-base --- [INFO] [INFO] --- enforcer:3.5.0:enforce (enforce-java) @ jackson-base --- [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion passed [INFO] Rule 1: org.apache.maven.enforcer.rules.version.RequireMavenVersion passed [INFO] Rule 2: org.apache.maven.enforcer.rules.RequirePluginVersions passed [INFO] [INFO] --- build-helper:3.6.0:add-source (add-generated-sources) @ jackson-base --- [INFO] Source directory: /home/elect/IdeaProjects/jackson-bom/base/target/generated-sources added. [INFO] [INFO] --- build-helper:3.6.0:add-resource (add-resource) @ jackson-base --- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Jackson BOM 2.19.0-SNAPSHOT: [INFO] [INFO] Jackson BOM ........................................ SUCCESS [ 0.195 s] [INFO] Jackson Base ....................................... SUCCESS [ 0.103 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.196 s [INFO] Finished at: 2025-04-23T15:40:39+02:00 [INFO] ------------------------------------------------------------------------

Anyway, I just pushed a commit with the plugins versions (I picked the latest ones, tell me if this may not be fine for whatever reason)

elect86 avatar Apr 23 '25 13:04 elect86

However mvnw clean compile runs fine on mine, weird

Often that'd be due to older version of Maven (at some point things changed to stricter defaults), but if using mvnw from repo that should not be the case. Oh well.

cowtowncoder avatar Apr 24 '25 17:04 cowtowncoder

@elect86 Latest versions should be fine but... for some reason, CI now just fails. Hmmh.

cowtowncoder avatar Apr 24 '25 17:04 cowtowncoder

Sorry, my bad, dummy mistake, gradle wrapper is supposed to be found under the gradle directory from the gradlew point of view.. now it should run

elect86 avatar Apr 25 '25 08:04 elect86