Maven release: Could not find POM in openmrs-repo-modules

Hi @cintiadr, @dkayiwa, and idea why this is happening (see here on Bamboo):

[INFO] Uploading: https://openmrs.jfrog.io/openmrs/modules/org/openmrs/module/datafilter/1.0.0/datafilter-1.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Data Filter Module ................................. FAILURE [ 42.745 s]
[INFO] Data Filter Module API ............................. SKIPPED
[INFO] Data Filter Module OMOD ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.276 s
[INFO] Finished at: 2020-04-24T08:25:12+00:00
[INFO] Final Memory: 30M/269M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project datafilter:
  Failed to deploy artifacts: Could not find artifact org.openmrs.module:datafilter:pom:1.0.0 in openmrs-repo-modules (https://openmrs.jfrog.io/openmrs/modules)

?

Looks like it’s attempting to upload the released POM on JFrog (but then I don’t see the “uploaded” line ever), to then fail to access it subsequently.

Any ideas?

Cc @mksrom @wyclif

I think you’ve solved that one, but now we have:

build	24-Apr-2020 17:52:50	[INFO] Checking in modified POMs...
build	24-Apr-2020 17:52:50	[INFO] Executing: /bin/sh -c cd /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1 && git add -- pom.xml api/pom.xml omod/pom.xml
build	24-Apr-2020 17:52:50	[INFO] Working directory: /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1
build	24-Apr-2020 17:52:50	[INFO] Executing: /bin/sh -c cd /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1 && git rev-parse --show-toplevel 
build	24-Apr-2020 17:52:50	[INFO] Working directory: /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1
build	24-Apr-2020 17:52:50	[INFO] Executing: /bin/sh -c cd /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1 && git status --porcelain .
build	24-Apr-2020 17:52:50	[INFO] Working directory: /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1
build	24-Apr-2020 17:52:50	[WARNING] Ignoring unrecognized line: ?? api/pom.xml.releaseBackup
build	24-Apr-2020 17:52:50	[WARNING] Ignoring unrecognized line: ?? omod/pom.xml.releaseBackup
build	24-Apr-2020 17:52:50	[WARNING] Ignoring unrecognized line: ?? pom.xml.releaseBackup
build	24-Apr-2020 17:52:50	[WARNING] Ignoring unrecognized line: ?? release-scripts/
build	24-Apr-2020 17:52:50	[WARNING] Ignoring unrecognized line: ?? release.properties
build	24-Apr-2020 17:52:50	[INFO] Executing: /bin/sh -c cd /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1 && git commit --verbose -F /tmp/maven-scm-1014617396.commit pom.xml api/pom.xml omod/pom.xml
build	24-Apr-2020 17:52:50	[INFO] Working directory: /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1
build	24-Apr-2020 17:52:50	[INFO] Executing: /bin/sh -c cd /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1 && git symbolic-ref HEAD
build	24-Apr-2020 17:52:50	[INFO] Working directory: /home/bamboo-agent/bamboo-agent/xml-data/build-dir/DF-DFML-JOB1
build	24-Apr-2020 17:52:50	[INFO] ------------------------------------------------------------------------
build	24-Apr-2020 17:52:50	[INFO] Reactor Summary:
build	24-Apr-2020 17:52:50	[INFO] 
build	24-Apr-2020 17:52:50	[INFO] Data Filter Module ................................. FAILURE [03:30 min]
build	24-Apr-2020 17:52:50	[INFO] Data Filter Module API ............................. SKIPPED
build	24-Apr-2020 17:52:50	[INFO] Data Filter Module OMOD ............................ SKIPPED
build	24-Apr-2020 17:52:50	[INFO] ------------------------------------------------------------------------
build	24-Apr-2020 17:52:50	[INFO] BUILD FAILURE
build	24-Apr-2020 17:52:50	[INFO] ------------------------------------------------------------------------
build	24-Apr-2020 17:52:50	[INFO] Total time: 03:51 min
build	24-Apr-2020 17:52:50	[INFO] Finished at: 2020-04-24T17:52:50+00:00
build	24-Apr-2020 17:52:50	[INFO] Final Memory: 16M/187M
build	24-Apr-2020 17:52:50	[INFO] ------------------------------------------------------------------------
build	24-Apr-2020 17:52:50	[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare (default-cli) on project datafilter: An error is occurred in the checkin process: Exception while executing SCM command. Detecting the current branch failed: fatal: ref HEAD is not a symbolic ref -> [Help 1]

That seems to be at the very end of release:prepare, just as it should commit.

Pretty cryptic, if you ask me. As if that wasn’t the latest commit in the branch? I can see that the pom file was released 24-04-20 12:55:32 +00:00. It seems one of your attempts to run ‘release:perform’ failed on javadoc:

https://ci.openmrs.org/browse/DF-DFML-JOB1-83/log

It’s hard to follow what happened with so many release attempts, so I’m attempting to release 1.0.1. Let see exactly what happens to this one. https://ci.openmrs.org/browse/DF-DFML-90

If a ‘release:prepare’ fails, we can attempt to create a new release reusing the same number. If a ‘release:perform’ fails, most of the time, we cannot reuse the number because usually some artefacts were already deployed.

Again, release:perform failed to generate javadocs:

https://ci.openmrs.org/browse/DF-DFML-JOB1-90/log

Are you able to fix that (and use a different release number)?

Looks like a bug in the JDK (triggered by your use of annotation classes/methods in javadocs for classes in this package), which they found worth fixing only in versions of Java newer than 1.8 https://bugs.openjdk.java.net/browse/JDK-8170447

So i have just disabled javadoc generation for the maven release plugin.

Since the earlier release attempts were not complete (e.g tag created but some artifacts not uploaded), i deleted those artifacts and released version 1.0.0 afresh.

2 Likes

Amazing @dkayiwa, so helpful. Thanks a bunch! :+1:

I really appreciate that you went all the way to avoiding patch releases on top of other releases that would have never existed. Neat.

1 Like

6 posts were split to a new topic: UgandaEMR: Use cases for the Data Filter module