From 7f76f0f2b5b1b028d2d870782048e44402637fb0 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Wed, 3 Jan 2024 20:11:51 -0600 Subject: [PATCH] Remove unexpected sources from gwt-user by making valid servlet sources (#9888) Removes an old hack which uses gwt-user's sources as if they were the correct sources for gwt-servlet by creating a real build artifact that contains the sources which correspond to the classes found in gwt-servlet and gwt-servlet-jakarta. This lets us avoid using gwt-user's own sources as if they were the sources for other jars, which in turn allows us to only package gwt-user sources in gwt-user.jar. Fixes #9886 --- distro-source/build.xml | 4 +--- maven/lib-gwt.sh | 10 +++----- servlet/build.xml | 53 +++++++++++++++++++++++++++++++---------- user/build.xml | 2 -- 4 files changed, 45 insertions(+), 24 deletions(-) diff --git a/distro-source/build.xml b/distro-source/build.xml index 90e0448383..55c712802f 100755 --- a/distro-source/build.xml +++ b/distro-source/build.xml @@ -31,10 +31,8 @@ - - + - diff --git a/maven/lib-gwt.sh b/maven/lib-gwt.sh index bb8ac49f7e..4d3028523e 100644 --- a/maven/lib-gwt.sh +++ b/maven/lib-gwt.sh @@ -115,14 +115,10 @@ function maven-gwt() { gwtPomFile=$pomDir/gwt/gwt-$i/pom.xml SOURCES_FILE=gwt-${i}-sources.jar SOURCES_PATH_FILE=$GWT_EXTRACT_DIR/$SOURCES_FILE - # If there are no sources, use gwt-user sources. - # This is a bit hacky but Sonatype requires a - # source jar for Central, and lack of sources - # should only happen for gwt-servlet and - # gwt-servlet-jakarta, which are basically a - # subset of gwt-user. + # If there are no sources, fail, this is a requirement of maven central if [ ! -f $SOURCES_PATH_FILE ]; then - SOURCES_PATH_FILE=$GWT_EXTRACT_DIR/gwt-user-sources.jar + echo "ERROR: sources jar not found for $i" + exit 1 fi maven-deploy-file $mavenRepoUrl $mavenRepoId "$CUR_FILE" $gwtPomFile "$JAVADOC_FILE_PATH" "$SOURCES_PATH_FILE" || die diff --git a/servlet/build.xml b/servlet/build.xml index 60901a6876..47d554892f 100644 --- a/servlet/build.xml +++ b/servlet/build.xml @@ -13,7 +13,7 @@ location="${gwt.build.lib}/gwt-${ant.project.name}-deps.jar" /> + depends="-servlet, -servlet-jakarta, -servlet-sources, -servlet-jakarta-sources, -deps" /> @@ -30,7 +30,6 @@ - @@ -43,13 +42,28 @@ - - - - - + + + + + + + + + + + + + + + + + + + + @@ -62,7 +76,6 @@ - @@ -75,12 +88,28 @@ - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/user/build.xml b/user/build.xml index 1f43783a4c..d627a8078c 100755 --- a/user/build.xml +++ b/user/build.xml @@ -373,8 +373,6 @@ - -