You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Christopher.Miller@gd-ms.com" <Ch...@gd-ms.com> on 2021/09/24 17:08:46 UTC

Questions on best practice for POM Code Convention setup and how to know what tags can be setup where


I'm cleaning up the POM files that I have based on the Maven documentation, especially using the POM Code Convention as reference.

Want to ask this, to confirm that I'm following the best practice(https://maven.apache.org/developers/conventions/code.html#pom-code-convention)  for setting up the correct over for the tags in the POM file that is using deploy plugin:



<project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd<http://maven.apache.org/POM/4.0.0%20https:/maven.apache.org/xsd/maven-4.0.0.xsd>>
<modelVersion/>

<groupID/>
<artifactID/>
<version/>

<distributionManagement/>

<properties/>

<build/>


Also, I'm still not understanding the following:

What tags can I use?

And where can I use certain tags?


For example under the <build> tags, I've inherited a POM file that has the tag <packaging>iso</packaging> and <type>iso</type>  I know that packaging for ISO isn't one that can be setup where <groupID>, <artifactID> and <version> tags are setup as this isn't one of the artifacts that can be generated.  So how do I know that I can setup <packaging> and <type> tags here?  That will deploy an iso file to a remote repo?

Thanks



Re: Questions on best practice for POM Code Convention setup and how to know what tags can be setup where

Posted by Bernd Eckenfels <ec...@zusammenkunft.net>.
Check the POM reference about what goes where, and then check the definition of the plugins (the so called mojos) what properties/config they Need.

https://maven.apache.org/pom.html

In your example you are missing the dependencies which is most likely the most powerful part of the whole project model.

Gruss
Bernd


--
http://bernd.eckenfels.net
________________________________
Von: Christopher.Miller@gd-ms.com <Ch...@gd-ms.com>
Gesendet: Friday, September 24, 2021 7:08:46 PM
An: users@maven.apache.org <us...@maven.apache.org>
Betreff: Questions on best practice for POM Code Convention setup and how to know what tags can be setup where



I'm cleaning up the POM files that I have based on the Maven documentation, especially using the POM Code Convention as reference.

Want to ask this, to confirm that I'm following the best practice(https://maven.apache.org/developers/conventions/code.html#pom-code-convention)  for setting up the correct over for the tags in the POM file that is using deploy plugin:



<project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd<http://maven.apache.org/POM/4.0.0%20https:/maven.apache.org/xsd/maven-4.0.0.xsd>>
<modelVersion/>

<groupID/>
<artifactID/>
<version/>

<distributionManagement/>

<properties/>

<build/>


Also, I'm still not understanding the following:

What tags can I use?

And where can I use certain tags?


For example under the <build> tags, I've inherited a POM file that has the tag <packaging>iso</packaging> and <type>iso</type>  I know that packaging for ISO isn't one that can be setup where <groupID>, <artifactID> and <version> tags are setup as this isn't one of the artifacts that can be generated.  So how do I know that I can setup <packaging> and <type> tags here?  That will deploy an iso file to a remote repo?

Thanks



Re: Questions on best practice for POM Code Convention setup and how to know what tags can be setup where

Posted by Bernd Eckenfels <ec...@zusammenkunft.net>.
BTW I find distribution management should be in a parent (shared and hidden) or not in there at all. I prefer my POMs as landscape independent as possible.


--
http://bernd.eckenfels.net
________________________________
Von: Christopher.Miller@gd-ms.com <Ch...@gd-ms.com>
Gesendet: Friday, September 24, 2021 7:08:46 PM
An: users@maven.apache.org <us...@maven.apache.org>
Betreff: Questions on best practice for POM Code Convention setup and how to know what tags can be setup where



I'm cleaning up the POM files that I have based on the Maven documentation, especially using the POM Code Convention as reference.

Want to ask this, to confirm that I'm following the best practice(https://maven.apache.org/developers/conventions/code.html#pom-code-convention)  for setting up the correct over for the tags in the POM file that is using deploy plugin:



<project xmlns=http://maven.apache.org/POM/4.0.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd<http://maven.apache.org/POM/4.0.0%20https:/maven.apache.org/xsd/maven-4.0.0.xsd>>
<modelVersion/>

<groupID/>
<artifactID/>
<version/>

<distributionManagement/>

<properties/>

<build/>


Also, I'm still not understanding the following:

What tags can I use?

And where can I use certain tags?


For example under the <build> tags, I've inherited a POM file that has the tag <packaging>iso</packaging> and <type>iso</type>  I know that packaging for ISO isn't one that can be setup where <groupID>, <artifactID> and <version> tags are setup as this isn't one of the artifacts that can be generated.  So how do I know that I can setup <packaging> and <type> tags here?  That will deploy an iso file to a remote repo?

Thanks



RE: Questions on best practice for POM Code Convention setup and how to know what tags can be setup where

Posted by "Christopher.Miller@gd-ms.com" <Ch...@gd-ms.com>.
Sorry, Maven and these POM files I've inherited and continue to be told to make it work.  I'm not sure what you mean by custom lifecycle.  Do you have an example? 

Thanks



-----Original Message-----
From: Michael Osipov <mi...@apache.org> 
Sent: Friday, September 24, 2021 2:24 PM
To: users@maven.apache.org
Subject: Re: Questions on best practice for POM Code Convention setup and how to know what tags can be setup where

----
External E-mail --- CAUTION: This email originated from outside GDMS. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Am 2021-09-24 um 19:08 schrieb Christopher.Miller@gd-ms.com:
> For example under the <build> tags, I've inherited a POM file that has 
> the tag <packaging>iso</packaging> and <type>iso</type>

This will not work unless you have a custom lifecycle for this packaging. Do you have one?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Questions on best practice for POM Code Convention setup and how to know what tags can be setup where

Posted by Michael Osipov <mi...@apache.org>.
Am 2021-09-24 um 19:08 schrieb Christopher.Miller@gd-ms.com:
> For example under the <build> tags, I've inherited a POM file that has the tag <packaging>iso</packaging> and <type>iso</type>

This will not work unless you have a custom lifecycle for this 
packaging. Do you have one?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org