Skip to content

deprecation plan for allowIncompleteProjects #666

@zwxue

Description

@zwxue

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 88ce159#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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions