Modify

Opened 3 months ago

Closed 3 months ago

#23535 closed defect (fixed)

Jenkins Job Nexus-JOSM-Plugins fails

Reported by: GerdP Owned by: taylor.smock
Priority: normal Milestone:
Component: Plugin pmtiles Version:
Keywords: Cc: stoecker

Description

Seems the code in plugin pmtiles cannot be compiled with java 8 since
https://josm.openstreetmap.de/changeset/36219/osm

See https://josm.openstreetmap.de/jenkins/job/Nexus-JOSM-Plugins/

Attachments (0)

Change History (5)

comment:1 by taylor.smock, 3 months ago

It has never been able to be compiled with Java 8. See r36112/osm.
I'll have to investigate why that is happening tomorrow.

comment:2 by taylor.smock, 3 months ago

Cc: stoecker added

It looks like it is just the way the job is written.
Here is a (slightly) cleaned up version.

for pluginjar in ${CHANGED_JARS}; do
    artifactId=$(basename "$pluginjar" .jar)
    id=`echo $artifactId | sed -e 's/-unixoid//g' | sed -e 's/-windows//g' | sed -e 's/-osx//g'`
    cd $BASEDIR/$id && ant clean dist && ${MVN DEPLOY}
done

I'll fiddle with the script to see if I can parse out the minimum Java version for a plugin and build with that.

comment:3 by taylor.smock, 3 months ago

In 36221/osm:

See #23535: Make jar modification to see if Jenkins changes work

comment:4 by taylor.smock, 3 months ago

In 36222/osm:

See #23535: Make jar modification to see if Jenkins changes work

comment:5 by taylor.smock, 3 months ago

Resolution: fixed
Status: newclosed

OK. It should be fixed for plugins requiring newer versions of Java.

Notes on changes:

  • Extract build and publish actions into functions for readability
    • build function uses the expected java version to set the JAVA_HOME environment variable and the javadoc.executable
  • Add a build_and_publish function to make it easier to debug (I should have done this first...)
  • Add a java_version function to get the expected Java version for the plugin
    • build.xml -- looks for java.lang.version, must match <property name="java.lang.version" value="([0-9]+)" */>
    • pom.xml -- looks for maven.compiler.release, must match <maven.compiler.release>([0-9]+)</maven.compiler.release>
    • gradle.properties -- looks for plugin.minimum.java.version, must match plugin.minimum.java.version=([0-9]+)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain taylor.smock.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.