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;
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
add a comment |
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
What about having a third module for the docker build?
– JF Meier
Mar 22 at 20:25
add a comment |
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
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
maven pom.xml multi-module
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
.
Im not sure I understand. Ispom.xml
a file inaggregate-file
subfolder?
– Andy
Mar 23 at 18:49
yes it is sorry wasn't accurate enough. Updated answer.
– khmarbaise
Mar 23 at 21:19
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
.
Im not sure I understand. Ispom.xml
a file inaggregate-file
subfolder?
– Andy
Mar 23 at 18:49
yes it is sorry wasn't accurate enough. Updated answer.
– khmarbaise
Mar 23 at 21:19
add a comment |
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
.
Im not sure I understand. Ispom.xml
a file inaggregate-file
subfolder?
– Andy
Mar 23 at 18:49
yes it is sorry wasn't accurate enough. Updated answer.
– khmarbaise
Mar 23 at 21:19
add a comment |
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
.
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
.
edited Mar 23 at 21:19
answered Mar 23 at 8:30
khmarbaisekhmarbaise
66.5k18128167
66.5k18128167
Im not sure I understand. Ispom.xml
a file inaggregate-file
subfolder?
– Andy
Mar 23 at 18:49
yes it is sorry wasn't accurate enough. Updated answer.
– khmarbaise
Mar 23 at 21:19
add a comment |
Im not sure I understand. Ispom.xml
a file inaggregate-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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
What about having a third module for the docker build?
– JF Meier
Mar 22 at 20:25