Skip to content

Commit 15b8857

Browse files
committed
melting-pot: do not generate an aggregator POM
Unfortunately, due to a bug in Maven, this aggregator POM does not work in an intuitive way. In particular, executing build.sh in the top-level melting-pot directory does not pin the versions as desired within each submodule. Shockingly, they often are different versions than when you cd into a particular groupId/artifactId directory and run ../../build.sh from there. The problem is probably related to: * https://stackoverflow.com/q/45041888/1207769 * https://issues.apache.org/jira/browse/MNG-6141 * https://issues.apache.org/jira/browse/MNG-5761 Anyway, the melting pot does not use this aggregator POM anymore anyway, so let's refrain from generating it, to avoid any potential reliance on something that's broken.
1 parent c59f4fc commit 15b8857

1 file changed

Lines changed: 0 additions & 35 deletions

File tree

melting-pot.sh

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -566,40 +566,6 @@ isProject() {
566566
test "$1" = "LOCAL/PROJECT" -o "$a" = "$(basename "$1")" && echo 1
567567
}
568568

569-
# Generates an aggregator POM for all modules in the current directory.
570-
generatePOM() {
571-
echo '<?xml version="1.0" encoding="UTF-8"?>' > pom.xml
572-
echo '<project xmlns="http://maven.apache.org/POM/4.0.0"' >> pom.xml
573-
echo ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' >> pom.xml
574-
echo ' xsi:schemaLocation="http://maven.apache.org/POM/4.0.0' >> pom.xml
575-
echo ' https://maven.apache.org/xsd/maven-4.0.0.xsd">' >> pom.xml
576-
echo ' <modelVersion>4.0.0</modelVersion>' >> pom.xml
577-
echo >> pom.xml
578-
echo ' <groupId>melting-pot</groupId>' >> pom.xml
579-
echo ' <artifactId>melting-pot</artifactId>' >> pom.xml
580-
echo ' <version>0.0.0-SNAPSHOT</version>' >> pom.xml
581-
echo ' <packaging>pom</packaging>' >> pom.xml
582-
echo >> pom.xml
583-
echo ' <name>Melting Pot</name>' >> pom.xml
584-
echo >> pom.xml
585-
echo ' <modules>' >> pom.xml
586-
local dir
587-
for dir in */*
588-
do
589-
if [ "$(isProject "$dir")" ]
590-
then
591-
echo " <module>$dir</module>" >> pom.xml
592-
else
593-
# Check for a child component of a multi-module project.
594-
local childDir="$dir/$(basename "$dir")"
595-
test "$(isProject "$childDir")" &&
596-
echo " <module>$childDir</module>" >> pom.xml
597-
fi
598-
done
599-
echo ' </modules>' >> pom.xml
600-
echo '</project>' >> pom.xml
601-
}
602-
603569
# Generates melt.sh and helper scripts for all modules in the current directory.
604570
generateScripts() {
605571
echo '#!/bin/sh' > melt.sh
@@ -796,7 +762,6 @@ meltDown() {
796762

797763
# Generate build scripts.
798764
info "Generating build scripts"
799-
generatePOM
800765
echo "#!/bin/sh" > build.sh
801766
echo "mvn $args \\\\\n dependency:list test \$@" >> build.sh
802767
chmod +x build.sh

0 commit comments

Comments
 (0)