Get inherited groupId with readMavenPom The Next CEO of Stack OverflowDuplicate artifactId in child pomPassing properties present in <parent> tag via command lineMaven reuse properties from Super POMhow to specify final jar file name from command line in multi module environmentJenkins job failing because of incorrect parent child pom.xml entriesjenkins get environment variable pom properties nullsHow do pipeline parameters and jenkins GUI parameters work together?Accessing parent POM properties from JenkinsfileWhat will be the groupId for the dependencies used inside the pom if there is no variable specified in properties?Jenkins Artifactory Plugin + Maven Flatten plugin + rtMavenDeployer. Is there a way to deploy flatten pom files?
How did people program for Consoles with multiple CPUs?
Rotate a column
What was the first Unix version to run on a microcomputer?
If the heap is initialized for security, then why is the stack uninitialized?
Would a galaxy be visible from outside, but nearby?
Won the lottery - how do I keep the money?
WOW air has ceased operation, can I get my tickets refunded?
Why don't programming languages automatically manage the synchronous/asynchronous problem?
Received an invoice from my ex-employer billing me for training; how to handle?
Why am I allowed to create multiple unique pointers from a single object?
Why has the US not been more assertive in confronting Russia in recent years?
I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin
In excess I'm lethal
Anatomically Correct Strange Women In Ponds Distributing Swords
Return the Closest Prime Number
How to prevent changing the value of variable?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Multiple labels for a single equation
Why do professional authors make "consistency" mistakes? And how to avoid them?
Is it ever safe to open a suspicious html file (e.g. email attachment)?
Novel about a guy who is possessed by the divine essence and the world ends?
Do I need to enable Dev Hub in my PROD Org?
Which kind of appliances can one connect to electric sockets located in an airplane's toilet?
What happened in Rome, when the western empire "fell"?
Get inherited groupId with readMavenPom
The Next CEO of Stack OverflowDuplicate artifactId in child pomPassing properties present in <parent> tag via command lineMaven reuse properties from Super POMhow to specify final jar file name from command line in multi module environmentJenkins job failing because of incorrect parent child pom.xml entriesjenkins get environment variable pom properties nullsHow do pipeline parameters and jenkins GUI parameters work together?Accessing parent POM properties from JenkinsfileWhat will be the groupId for the dependencies used inside the pom if there is no variable specified in properties?Jenkins Artifactory Plugin + Maven Flatten plugin + rtMavenDeployer. Is there a way to deploy flatten pom files?
I have a question concerning readMavenPom
(Link to doc) utility from Jenkins pipelines.
I have a project with a pom.xml
where no groupId
is defined but this pom.xml
has a parent pom with a a defined groupId
. (It could happen that, even this parent doesn't have a defined groupId
and is the parent.parent the one that has it).
Is there a way to get the, let's say, effective groupId
in an elegant way?
I'm currently getting null
with the getGroupId() method (or property accessor .groupId
)
NOTE: With elegant way I mean, not looping into parents and checking if groupId is not null.
Thanks in advance.
maven jenkins jenkins-pipeline pom.xml
add a comment |
I have a question concerning readMavenPom
(Link to doc) utility from Jenkins pipelines.
I have a project with a pom.xml
where no groupId
is defined but this pom.xml
has a parent pom with a a defined groupId
. (It could happen that, even this parent doesn't have a defined groupId
and is the parent.parent the one that has it).
Is there a way to get the, let's say, effective groupId
in an elegant way?
I'm currently getting null
with the getGroupId() method (or property accessor .groupId
)
NOTE: With elegant way I mean, not looping into parents and checking if groupId is not null.
Thanks in advance.
maven jenkins jenkins-pipeline pom.xml
Hi, what do you need the groupId for?
– hakamairi
Mar 8 at 8:32
add a comment |
I have a question concerning readMavenPom
(Link to doc) utility from Jenkins pipelines.
I have a project with a pom.xml
where no groupId
is defined but this pom.xml
has a parent pom with a a defined groupId
. (It could happen that, even this parent doesn't have a defined groupId
and is the parent.parent the one that has it).
Is there a way to get the, let's say, effective groupId
in an elegant way?
I'm currently getting null
with the getGroupId() method (or property accessor .groupId
)
NOTE: With elegant way I mean, not looping into parents and checking if groupId is not null.
Thanks in advance.
maven jenkins jenkins-pipeline pom.xml
I have a question concerning readMavenPom
(Link to doc) utility from Jenkins pipelines.
I have a project with a pom.xml
where no groupId
is defined but this pom.xml
has a parent pom with a a defined groupId
. (It could happen that, even this parent doesn't have a defined groupId
and is the parent.parent the one that has it).
Is there a way to get the, let's say, effective groupId
in an elegant way?
I'm currently getting null
with the getGroupId() method (or property accessor .groupId
)
NOTE: With elegant way I mean, not looping into parents and checking if groupId is not null.
Thanks in advance.
maven jenkins jenkins-pipeline pom.xml
maven jenkins jenkins-pipeline pom.xml
asked Mar 7 at 15:03
dcalapdcalap
536725
536725
Hi, what do you need the groupId for?
– hakamairi
Mar 8 at 8:32
add a comment |
Hi, what do you need the groupId for?
– hakamairi
Mar 8 at 8:32
Hi, what do you need the groupId for?
– hakamairi
Mar 8 at 8:32
Hi, what do you need the groupId for?
– hakamairi
Mar 8 at 8:32
add a comment |
2 Answers
2
active
oldest
votes
You need te got the effective-pom and get the groupid from there. The effective pom is the result after all dependencies and inheritance variables have been resolved, giving you a perfect overview of what will end up in your package.
doc.: https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html
add a comment |
You could simply use the maven-help-plugin:evaluate goal via command line which can give you what you need.
The following will exactly extract the groupId of the project and will handle all the things based on your inheritance part.
mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout
This could be done in a separate stage step of the Jenkins Pipeline.
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%2f55046895%2fget-inherited-groupid-with-readmavenpom%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need te got the effective-pom and get the groupid from there. The effective pom is the result after all dependencies and inheritance variables have been resolved, giving you a perfect overview of what will end up in your package.
doc.: https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html
add a comment |
You need te got the effective-pom and get the groupid from there. The effective pom is the result after all dependencies and inheritance variables have been resolved, giving you a perfect overview of what will end up in your package.
doc.: https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html
add a comment |
You need te got the effective-pom and get the groupid from there. The effective pom is the result after all dependencies and inheritance variables have been resolved, giving you a perfect overview of what will end up in your package.
doc.: https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html
You need te got the effective-pom and get the groupid from there. The effective pom is the result after all dependencies and inheritance variables have been resolved, giving you a perfect overview of what will end up in your package.
doc.: https://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojo.html
answered Mar 8 at 8:33
fl0wfl0w
1,1981319
1,1981319
add a comment |
add a comment |
You could simply use the maven-help-plugin:evaluate goal via command line which can give you what you need.
The following will exactly extract the groupId of the project and will handle all the things based on your inheritance part.
mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout
This could be done in a separate stage step of the Jenkins Pipeline.
add a comment |
You could simply use the maven-help-plugin:evaluate goal via command line which can give you what you need.
The following will exactly extract the groupId of the project and will handle all the things based on your inheritance part.
mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout
This could be done in a separate stage step of the Jenkins Pipeline.
add a comment |
You could simply use the maven-help-plugin:evaluate goal via command line which can give you what you need.
The following will exactly extract the groupId of the project and will handle all the things based on your inheritance part.
mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout
This could be done in a separate stage step of the Jenkins Pipeline.
You could simply use the maven-help-plugin:evaluate goal via command line which can give you what you need.
The following will exactly extract the groupId of the project and will handle all the things based on your inheritance part.
mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout
This could be done in a separate stage step of the Jenkins Pipeline.
answered Mar 8 at 17:23
khmarbaisekhmarbaise
65.9k18127166
65.9k18127166
add a comment |
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%2f55046895%2fget-inherited-groupid-with-readmavenpom%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
Hi, what do you need the groupId for?
– hakamairi
Mar 8 at 8:32