This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git


The following commit(s) were added to refs/heads/main by this push:
     new f42b4d7  Fix CI: produce precompiler generated JAR at process-classes 
phase
f42b4d7 is described below

commit f42b4d719cbafc3701520c103d3d70fdf8116022
Author: Wu Sheng <[email protected]>
AuthorDate: Thu Feb 19 23:43:57 2026 +0800

    Fix CI: produce precompiler generated JAR at process-classes phase
    
    Move the maven-jar-plugin execution for the classified JAR
    (precompiler-*-generated.jar) from package to process-classes phase.
    This ensures the artifact is attached to the reactor before downstream
    modules need it, even with `mvn test` which never reaches package.
    
    Root cause: Maven's ReactorReader does not fall back to the local repo
    for classified artifacts when the producing module is in the reactor
    but hasn't attached the artifact yet.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 Makefile                        | 5 ++---
 build-tools/precompiler/pom.xml | 7 +++++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 01d7424..d40ddcc 100644
--- a/Makefile
+++ b/Makefile
@@ -36,9 +36,8 @@ build-skywalking: init-submodules
        cd skywalking && ../mvnw flatten:flatten install -DskipTests 
-Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dgpg.skip=true
 
 # Compile + install to local repo (no tests).
-# Install is needed because the precompiler produces a classified JAR 
(precompiler-*-generated.jar)
-# at the package phase. Subsequent standalone goals (javadoc:javadoc, test) 
resolve this artifact
-# from the local Maven repo, so it must be installed first.
+# Install is needed so standalone goals like javadoc:javadoc (which don't 
trigger the reactor
+# lifecycle) can resolve the precompiler-*-generated.jar from the local Maven 
repo.
 compile:
        $(MVN) clean install -DskipTests $(MVN_ARGS)
 
diff --git a/build-tools/precompiler/pom.xml b/build-tools/precompiler/pom.xml
index 9eafb4a..2bbe6ad 100644
--- a/build-tools/precompiler/pom.xml
+++ b/build-tools/precompiler/pom.xml
@@ -138,7 +138,10 @@
                 </configuration>
             </plugin>
 
-            <!-- Package generated classes into a classified JAR -->
+            <!-- Package generated classes into a classified JAR.
+                 Bound to process-classes (after exec-maven-plugin generates 
the classes)
+                 so the artifact is attached to the reactor early enough for 
downstream
+                 modules that depend on it during any lifecycle phase 
(including test). -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
@@ -146,7 +149,7 @@
                 <executions>
                     <execution>
                         <id>generated-classes-jar</id>
-                        <phase>package</phase>
+                        <phase>process-classes</phase>
                         <goals>
                             <goal>jar</goal>
                         </goals>

Reply via email to