Skip to content

Commit 07ebf5b

Browse files
committed
Do the JOSM mvn build in the josm_build action
Signed-off-by: Taylor Smock <smocktaylor@gmail.com>
1 parent e0ad50e commit 07ebf5b

7 files changed

Lines changed: 125 additions & 91 deletions

File tree

.github/workflows/ant.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,11 @@ jobs:
165165
run: |
166166
set -ex
167167
cd $GITHUB_WORKSPACE/josm/plugins/${{ inputs.plugin-directory }}
168-
svn up ../../core
168+
svn up ../../core/tools
169169
ls ../..
170170
ls ../../core
171171
ls ../../core/tools
172172
ls ../../core/tools/checkstyle
173-
mvn --file ../../core/pom.xml package install -DskipTests
174173
mvn --file pom.xml package javadoc:jar source:jar -DskipTests -Dplugin.dist.dir=../../dist -Dplugin.version=${{ steps.version.outputs.version }}
175174
mv target/${{ inputs.plugin-jar-name }}-*-sources.jar ../../dist/${{ inputs.plugin-jar-name }}-sources.jar
176175
mv target/${{ inputs.plugin-jar-name }}-*-javadoc.jar ../../dist/${{ inputs.plugin-jar-name }}-javadoc.jar

.github/workflows/internal_ant.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,11 @@ jobs:
165165
run: |
166166
set -ex
167167
cd $GITHUB_WORKSPACE/josm/plugins/${{ inputs.plugin-directory }}
168-
svn up ../../core
168+
svn up ../../core/tools
169169
ls ../..
170170
ls ../../core
171171
ls ../../core/tools
172172
ls ../../core/tools/checkstyle
173-
mvn --file ../../core/pom.xml package install -DskipTests
174173
mvn --file pom.xml package javadoc:jar source:jar -DskipTests -Dplugin.dist.dir=../../dist -Dplugin.version=${{ steps.version.outputs.version }}
175174
mv target/${{ inputs.plugin-jar-name }}-*-sources.jar ../../dist/${{ inputs.plugin-jar-name }}-sources.jar
176175
mv target/${{ inputs.plugin-jar-name }}-*-javadoc.jar ../../dist/${{ inputs.plugin-jar-name }}-javadoc.jar

actions/josm_build/dist/index.js

Lines changed: 25 additions & 8 deletions
Large diffs are not rendered by default.

actions/josm_build/src/action.ts

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,28 @@ async function buildJosm(
6161
info("Cache hit for " + buildHit);
6262
return;
6363
}
64-
const ivyFiles = await hashFiles("**/ivy.xml");
64+
const ivyFiles = await hashFiles("**/ivy.xml\n**/pom.xml");
6565
const ivyHit = await restoreCache(
66-
["~/.ivy2/cache", "~/.ant/cache", josmSource + "/tools"],
66+
["~/.ivy2/cache", "~/.ant/cache", "~/.m2", josmSource + "/tools"],
6767
`${process.platform}-${process.arch}-ivy-${ivyFiles}`,
6868
);
6969
if (ivyHit == null || ivyHit === "") {
7070
await exec("ant", ["-buildfile", josmSource + "/build.xml", "resolve"]);
71+
await exec("mvn", ["clean", "validate"]);
7172
await saveCache(
72-
["~/.ivy2/cache", "~/.ant/cache", josmSource + "/tools"],
73+
["~/.ivy2/cache", "~/.ant/cache", "~/.m2", josmSource + "/tools"],
7374
`${process.platform}-${process.arch}-ivy-${ivyFiles}`,
7475
);
7576
}
77+
// Build with maven
78+
await exec("mvn", [
79+
"--file",
80+
josmSource + "/pom.xml",
81+
"package",
82+
"install",
83+
"-DskipTests",
84+
]);
85+
// And then ant, since that is currently the "official" distribution source.
7686
await exec("ant", ["-buildfile", josmSource + "/build.xml", "dist"]);
7787
await saveCache(
7888
[josmSource + "/dist/josm-custom.jar"],
@@ -94,19 +104,28 @@ async function buildJosmTests(
94104
return;
95105
}
96106
await buildJosm(josmSource, josmRevision);
97-
const ivyFiles = await hashFiles(josmSource + "/**/ivy.xml");
107+
const ivyFiles = await hashFiles(
108+
josmSource + "/**/ivy.xml" + "\n" + josmSource + "/**/pom.xml",
109+
);
98110
const ivyHit = await restoreCache(
99-
["~/.ivy2/cache", "~/.ant/cache", josmSource + "/tools"],
111+
["~/.ivy2/cache", "~/.ant/cache", "~/.m2", josmSource + "/tools"],
100112
`${process.platform}-${process.arch}-test-ivy-${ivyFiles}`,
101113
);
102114
if (ivyHit == null || ivyHit === "") {
103115
await exec("ant", ["-buildfile", josmSource + "/build.xml", "test-init"]);
104116
await saveCache(
105-
["~/.ivy2/cache", "~/.ant/cache", josmSource + "/tools"],
117+
["~/.ivy2/cache", "~/.ant/cache", "~/.m2", josmSource + "/tools"],
106118
`${process.platform}-${process.arch}-test-ivy-${ivyFiles}`,
107119
);
108120
}
109121
await exec("ant", ["-buildfile", josmSource + "/build.xml", "test-compile"]);
122+
await exec("mvn", [
123+
"--file",
124+
josmSource + "/test/pom.xml",
125+
"package",
126+
"install",
127+
"-DskipTests",
128+
]);
110129
await saveCache([josmSource + "/test/build"], `josm-tests-r${josmRevision}`);
111130
}
112131

actions/josm_plugin_dependencies/dist/index.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

actions/josm_plugin_dependencies/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 71 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)