﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23875	Deploy pom.xml files to nexus	taylor.smock	team	"@stoecker: Do you mind if I add a maven target to [https://josm.openstreetmap.de/jenkins/job/JOSM jenkins] to deploy the pom files? It looks like I need to do that in order for the plugins ([https://josm.openstreetmap.de/jenkins/job/JOSM-Plugins/jdk=JDK11/lastBuild/console jenkins output]) to use the same dependency versions as JOSM when we do a rebuild (as an example, for awhile apache-commons was using an older version of a dependency as compared to core -- that dependency is stripped down for core, apache-commons has the whole dependency).

As an alternative, I can copy the shared configuration into the plugin root pom. Or keep the dual ivy/maven dependency files.

Caveats:
I've been using `1.0-SNAPSHOT` in the pom files instead of `SNAPSHOT` -- maven gives a warning without a number
{{{
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.openstreetmap.josm:josm:jar:SNAPSHOT
[WARNING] 'version' uses an unsupported snapshot version format, should be '*-SNAPSHOT' instead. @ org.openstreetmap.josm:josm-parent:SNAPSHOT, /Users/tsmock/workspace/josm/core/nodist/pom.xml, line 7, column 14
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
}}}
This means that we will be uploading `SNAPSHOT` and `1.0-SNAPSHOT` builds for the foreseeable future.

The pom changes in core will be as follows:
{{{#!diff
Index: nodist/pom.xml
===================================================================
diff --git a/nodist/pom.xml b/nodist/pom.xml
--- a/nodist/pom.xml	(revision 19203)
+++ b/nodist/pom.xml	(date 1724331499924)
@@ -39,6 +39,13 @@
             <url>https://josm.openstreetmap.de/nexus/content/repositories/public/</url>
         </pluginRepository>
     </pluginRepositories>
+    <distributionManagement>
+        <snapshotRepository>
+            <id>josm-snapshots</id>
+            <name>JOSM snapshots</name>
+            <url>https://josm.openstreetmap.de/nexus/content/repositories/snapshots</url>
+        </snapshotRepository>
+    </distributionManagement>
     <build>
         <pluginManagement>
             <plugins>
}}}

If we decide to use `SNAPSHOT` instead of `1.0-SNAPSHOT` going forward, the `snapshotRepository` element will instead be `repository`.

Parameters I intend to set for `Invoke top-level Maven targets`:
* Goals: `deploy`
* Properties:
  * `maven.test.skip=true` -- the tests are currently done by ant, and I don't think we want to double the CI runtime.
  * `skipTests`"	defect	new	normal		unspecified			maven jenkins	stoecker floscher
