Skip to content

chore(build): alter mojos used during the build - #29

Open
Jaroslav Tulach (JaroslavTulach) wants to merge 2 commits into
developfrom
jtulach/AlterBuild
Open

chore(build): alter mojos used during the build#29
Jaroslav Tulach (JaroslavTulach) wants to merge 2 commits into
developfrom
jtulach/AlterBuild

Conversation

@JaroslavTulach

@JaroslavTulach Jaroslav Tulach (JaroslavTulach) commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator
  • register a ProjectExecutionListener and observe the build
  • demonstrate some mojo(s) can be removed from the build
    • with b5d46cf
    • one can perform:
    • MOJO_MAVEN_CLEAN_PLUGIN=remove mvn -f native/launcher/ exec:exec -Dexec.appArgs="-f $PWD/examples/java-maven-sample-project/pom.xml clean package"
    • and the clean:clean mojo is removed
  • move some mojo(s) to independent execution
  • move the independent execution to a own Channel.create(null)
  • move that execution into Channel.create(jvm)

var args = new String[] {mojo.getMojoDescriptor().getFullGoalName()};
System.err.println(" - running " + args[0] + " now");
try {
getOther().run(args, null, null, null, true);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 93b1af1 is wild, but it does the basic trick
  • one can execute as
elide/native-maven$ MOJO_MAVEN_CLEAN_PLUGIN=remove mvn -f native/launcher/ package exec:exec -Dexec.appArgs="-f /home/devel/NetBeansProjects/elide/native-maven/examples/java-maven-sample-project/pom.xml clean package"
  • and then in middle of a Maven execution we
  • start new Maven context and execute clean:clean!

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.

2 participants