Skip to content

feat: automatic merge for multi-module projects#82

Merged
algomaster99 merged 1 commit intomainfrom
push-rrtyosrlkukv
Dec 22, 2025
Merged

feat: automatic merge for multi-module projects#82
algomaster99 merged 1 commit intomainfrom
push-rrtyosrlkukv

Conversation

@algomaster99
Copy link
Member

@algomaster99 algomaster99 commented Dec 21, 2025

Fixes #30

We stick to the double command workflow because of #82 (comment).

There are two major changes

  1. Only a single merged classport-files is created at the directory when mvn command is run.
  2. -Dmaven.main.skip is required flag for packaging. This is necessary because packaging phase writes the MANIFEST.MF file into target/classes directory which triggers a recompilation of the main class for the next submodule in the reactor phase. For a single module project, this -Dmaven.main.skip is not needed. If you do need to compile the main class, you can run mvn compile again.

@algomaster99
Copy link
Member Author

algomaster99 commented Dec 22, 2025

Doing it at packaging time is not the best idea because then the bundled jar is embedded. So classfiles like info.picocli.CommandLine have annotations like this:

    @ClassportInfo(group = "org.apache.pdfbox", version = "3.0.4", id = "org.apache.pdfbox:pdfbox-app:bundle:3.0.4", sourceProjectId = "org.apache.pdfbox:pdfbox-app:bundle:3.0.4", childIds = { "org.apache.pdfbox:pdfbox-tools:jar:3.0.4", "org.bouncycastle:bcpkix-jdk18on:jar:1.80", "org.bouncycastle:bcprov-jdk18on:jar:1.80", "commons-io:commons-io:jar:2.18.0", "org.apache.pdfbox:jbig2-imageio:jar:3.0.4" }, artefact = "pdfbox-app", isDirectDependency = false)
    public interface IExitCodeExceptionMapper
    {
        int getExitCode(final Throwable p0);
    }

The group should be info.picocli.

@algomaster99 algomaster99 changed the title feat: single command for embedding and packaging feat: automatic merge for multi-module projects Dec 22, 2025
@algomaster99 algomaster99 marked this pull request as ready for review December 22, 2025 13:51
@algomaster99 algomaster99 merged commit 63615ea into main Dec 22, 2025
2 checks passed
@algomaster99 algomaster99 deleted the push-rrtyosrlkukv branch December 22, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use a single command to package a jar with embedded dependencies

1 participant