How to run goals in aggregate pom after all of the child poms in mavenIs there a simple way to remove unused dependencies from a maven pom.xml?How to configure encoding in Maven?Maven Aggregate POM with Goal?Maven alternate pomIntelliJ inspection gives “Cannot resolve symbol” but still compiles codemaven generating pom fileRunning tests with maven packaging type “pom”Dealing with “Xerces hell” in Java/Maven?Maven is not working in Java 8 when Javadoc tags are incompleteGenerate .pom file all artifacts in Maven

Pigeonhole Principle Problem

How did Arya get back her dagger from Sansa?

Why do money exchangers give different rates to different bills

What does air vanishing on contact sound like?

Packet sniffer for MacOS Mojave and above

Visa for volunteering in England

I’ve officially counted to infinity!

How did Captain America use this power?

How could a planet have most of its water in the atmosphere?

Applying a function to a nested list

Short story about people living in a different time streams

Save terminal output to a txt file

Can commander tax be proliferated?

Accidentally deleted the "/usr/share" folder

Is lying to get "gardening leave" fraud?

Entropy as a function of temperature: is temperature well defined?

Why is Thanos so tough at the beginning of "Avengers: Endgame"?

Copy line and insert it in a new position with sed or awk

Unidentified items in bicycle tube repair kit

If an enemy is just below a 10-foot-high ceiling, are they in melee range of a creature on the ground?

Password expiration with Password manager

Can a cyclic Amine form an Amide?

Why is this a valid proof for the harmonic series?

How to creep the reader out with what seems like a normal person?



How to run goals in aggregate pom after all of the child poms in maven


Is there a simple way to remove unused dependencies from a maven pom.xml?How to configure encoding in Maven?Maven Aggregate POM with Goal?Maven alternate pomIntelliJ inspection gives “Cannot resolve symbol” but still compiles codemaven generating pom fileRunning tests with maven packaging type “pom”Dealing with “Xerces hell” in Java/Maven?Maven is not working in Java 8 when Javadoc tags are incompleteGenerate .pom file all artifacts in Maven






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have two child projects that generate jar files. I also have an aggregate pom.xml to build them in the package phase, which works. I now would like to have a goal that runs after the child projects have been packaged to generate a dockerfile using the dockerfile-maven-plugin from spotify.



Is it possible to configure the aggregate pom with the dockerfile plugin in such a way that it will run only when the jars are fully built?










share|improve this question






















  • What about having a third module for the docker build?

    – JF Meier
    Mar 22 at 20:25

















0















I have two child projects that generate jar files. I also have an aggregate pom.xml to build them in the package phase, which works. I now would like to have a goal that runs after the child projects have been packaged to generate a dockerfile using the dockerfile-maven-plugin from spotify.



Is it possible to configure the aggregate pom with the dockerfile plugin in such a way that it will run only when the jars are fully built?










share|improve this question






















  • What about having a third module for the docker build?

    – JF Meier
    Mar 22 at 20:25













0












0








0








I have two child projects that generate jar files. I also have an aggregate pom.xml to build them in the package phase, which works. I now would like to have a goal that runs after the child projects have been packaged to generate a dockerfile using the dockerfile-maven-plugin from spotify.



Is it possible to configure the aggregate pom with the dockerfile plugin in such a way that it will run only when the jars are fully built?










share|improve this question














I have two child projects that generate jar files. I also have an aggregate pom.xml to build them in the package phase, which works. I now would like to have a goal that runs after the child projects have been packaged to generate a dockerfile using the dockerfile-maven-plugin from spotify.



Is it possible to configure the aggregate pom with the dockerfile plugin in such a way that it will run only when the jars are fully built?







maven pom.xml multi-module






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 20:19









AndyAndy

32




32












  • What about having a third module for the docker build?

    – JF Meier
    Mar 22 at 20:25

















  • What about having a third module for the docker build?

    – JF Meier
    Mar 22 at 20:25
















What about having a third module for the docker build?

– JF Meier
Mar 22 at 20:25





What about having a third module for the docker build?

– JF Meier
Mar 22 at 20:25












1 Answer
1






active

oldest

votes


















2














The simple thing is to have a multi module build which looks like this:



+-- pom.xml (root)
+--- child1
! +-- pom.xml
+--- child2
! +-- pom.xml
+--- aggregate-child
+-- pom.xml


In the aggregate-child you define all the childs you would like to package as dependencies and in that you can also define the docker-maven-plugin to create the image.



Based on that structure you can call Maven from the root via mvn clean package.






share|improve this answer

























  • Im not sure I understand. Is pom.xml a file in aggregate-file subfolder?

    – Andy
    Mar 23 at 18:49











  • yes it is sorry wasn't accurate enough. Updated answer.

    – khmarbaise
    Mar 23 at 21:19












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55307253%2fhow-to-run-goals-in-aggregate-pom-after-all-of-the-child-poms-in-maven%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














The simple thing is to have a multi module build which looks like this:



+-- pom.xml (root)
+--- child1
! +-- pom.xml
+--- child2
! +-- pom.xml
+--- aggregate-child
+-- pom.xml


In the aggregate-child you define all the childs you would like to package as dependencies and in that you can also define the docker-maven-plugin to create the image.



Based on that structure you can call Maven from the root via mvn clean package.






share|improve this answer

























  • Im not sure I understand. Is pom.xml a file in aggregate-file subfolder?

    – Andy
    Mar 23 at 18:49











  • yes it is sorry wasn't accurate enough. Updated answer.

    – khmarbaise
    Mar 23 at 21:19
















2














The simple thing is to have a multi module build which looks like this:



+-- pom.xml (root)
+--- child1
! +-- pom.xml
+--- child2
! +-- pom.xml
+--- aggregate-child
+-- pom.xml


In the aggregate-child you define all the childs you would like to package as dependencies and in that you can also define the docker-maven-plugin to create the image.



Based on that structure you can call Maven from the root via mvn clean package.






share|improve this answer

























  • Im not sure I understand. Is pom.xml a file in aggregate-file subfolder?

    – Andy
    Mar 23 at 18:49











  • yes it is sorry wasn't accurate enough. Updated answer.

    – khmarbaise
    Mar 23 at 21:19














2












2








2







The simple thing is to have a multi module build which looks like this:



+-- pom.xml (root)
+--- child1
! +-- pom.xml
+--- child2
! +-- pom.xml
+--- aggregate-child
+-- pom.xml


In the aggregate-child you define all the childs you would like to package as dependencies and in that you can also define the docker-maven-plugin to create the image.



Based on that structure you can call Maven from the root via mvn clean package.






share|improve this answer















The simple thing is to have a multi module build which looks like this:



+-- pom.xml (root)
+--- child1
! +-- pom.xml
+--- child2
! +-- pom.xml
+--- aggregate-child
+-- pom.xml


In the aggregate-child you define all the childs you would like to package as dependencies and in that you can also define the docker-maven-plugin to create the image.



Based on that structure you can call Maven from the root via mvn clean package.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 23 at 21:19

























answered Mar 23 at 8:30









khmarbaisekhmarbaise

66.5k18128167




66.5k18128167












  • Im not sure I understand. Is pom.xml a file in aggregate-file subfolder?

    – Andy
    Mar 23 at 18:49











  • yes it is sorry wasn't accurate enough. Updated answer.

    – khmarbaise
    Mar 23 at 21:19


















  • Im not sure I understand. Is pom.xml a file in aggregate-file subfolder?

    – Andy
    Mar 23 at 18:49











  • yes it is sorry wasn't accurate enough. Updated answer.

    – khmarbaise
    Mar 23 at 21:19

















Im not sure I understand. Is pom.xml a file in aggregate-file subfolder?

– Andy
Mar 23 at 18:49





Im not sure I understand. Is pom.xml a file in aggregate-file subfolder?

– Andy
Mar 23 at 18:49













yes it is sorry wasn't accurate enough. Updated answer.

– khmarbaise
Mar 23 at 21:19






yes it is sorry wasn't accurate enough. Updated answer.

– khmarbaise
Mar 23 at 21:19




















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55307253%2fhow-to-run-goals-in-aggregate-pom-after-all-of-the-child-poms-in-maven%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript