zwxue opened a new issue, #666:
URL: https://github.com/apache/maven-deploy-plugin/issues/666

   ### New feature, improvement proposal
   
   Hello team,
   I have a question for allowIncompleteProjects, I have a project that 
generates both jar and zip(by assembly), now I want to deploy zip only, I found 
a way to implement that is create a mojo and let it execute between install and 
deploy phase, in the mojo I call project.getArtifact().setFile(null) to skip 
jar deploying, then I set -DallowIncompleteProjects=true it works but with 
warnings:
   
   > [INFO] --- deploy:3.1.4:deploy (default-deploy) @ parent ---
   > [INFO] Using alternate deployment repository 
local-releases::default::http://localhost:8081/repository/maven-releases
   > [WARNING] Using legacy syntax for alternative repository. Use 
"local-releases::http://localhost:8081/repository/maven-releases"; instead.
   > [WARNING] 
   > [WARNING] The packaging plugin for project parent did not assign
   > [WARNING] a main file to the project but it has attachments. Change 
packaging to 'pom'.
   > [WARNING] 
   > [WARNING] Incomplete projects like this will fail in future Maven versions!
   > [WARNING] 
   > Uploading to local-releases: 
http://localhost:8081/repository/maven-releases/org/example/p2/job/parent/0.1.0/parent-0.1.0.pom
   > Uploaded to local-releases: 
http://localhost:8081/repository/maven-releases/org/example/p2/job/parent/0.1.0/parent-0.1.0.pom
 (25 kB at 415 kB/s)
   > Uploading to local-releases: 
http://localhost:8081/repository/maven-releases/org/example/p2/job/parent/0.1.0/parent-0.1.0.zip
   > Uploaded to local-releases: 
http://localhost:8081/repository/maven-releases/org/example/p2/job/parent/0.1.0/parent-0.1.0.zip
 (5.8 MB at 41 MB/s)
   > Downloading from local-releases: 
http://localhost:8081/repository/maven-releases/org/example/p2/job/parent/maven-metadata.xml
   > Uploading to local-releases: 
http://localhost:8081/repository/maven-releases/org/example/p2/job/parent/maven-metadata.xml
   > Uploaded to local-releases: 
http://localhost:8081/repository/maven-releases/org/example/p2/job/parent/maven-metadata.xml
 (304 B at 8.7 kB/s)
   
   looks allowIncompleteProjects will be deprecated in the future(I found the 
warning code at 
https://github.com/apache/maven-deploy-plugin/commit/88ce1593800015ac41e61f3c78d9b4d0ecb97460#diff-ffcc9777ab63d54259e77f8e53ab3fc9c1b4ae1de9554187ab2a097b41b9bd76R272),
 I want to know what's the plan after you deprecate allowIncompleteProjects, 
will there be a new way for plugin to allow this kind of case in the future?
   if no, could you please advise on the best practice for my request?
   there are several conditions that restrict some possible approaches:
   * I can't use deploy:deploy-file goal
   * assembly for zip need the jar so the jar must be generated
   * I have to use DependencySet in assembly to include jar artifacts of 
current project and dependent projects.
   
   Thank you!


-- 
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]

Reply via email to