damokelis opened a new pull request, #67461:
URL: https://github.com/apache/doris/pull/67461

   ### What problem does this PR solve?
   
   A clean build of `fe-connector-hms-hive-shade` fails:
   
   ```
   Failed to create shaded artifact, project main artifact does not exist
   ```
   
   `maven-shade-plugin` is bound to the `process-classes` phase in this module 
(it must run there — see the `maven-jar-plugin` comment directly above it in 
the pom). By default shade performs a *replace-the-main-artifact* step, which 
reads `project.getArtifact().getFile()`. Maven only populates that field during 
the `package` phase, so at `process-classes` it is still null and shade aborts 
— even though `maven-jar-plugin` did produce the jar.
   
   ### Fix
   
   Point shade at an explicit `<outputFile>` so it writes the shaded jar 
directly instead of going through the main-artifact replacement:
   
   ```xml
   
<outputFile>${project.build.directory}/${project.artifactId}-${project.version}.jar</outputFile>
   ```
   
   The path is the default artifact path, so downstream consumers resolve 
exactly the same file as before.
   
   ### Release note
   
   None
   
   ### Check List
   
   - [x] Test <!-- At least one of them must be included. -->
       - [x] No need to test or manual test. Explain why:
           - Build-configuration fix, verified by the build itself: `mvn clean` 
+ module build fails before this change and succeeds after. The output path is 
unchanged, so no consumer-visible difference.
   
   - [x] Behavior changed:
       - [x] No.
   
   - [x] Does this need documentation?
       - [x] No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to