Great, thanks Ron (sorry for delay in response, my Inbox rules need a
little assist as this dropped to the folder).
--
Ken Beal
Senior Software Engineer, Build/Release

Cross Country Automotive Services
One Cabot Road
Medford, MA 02155
p: (781) 306-3605
m: (978) 423-8977
e: [email protected]


-----Original Message-----
From: GALLAGHER, RON (ATTSI) [mailto:[email protected]] 
Sent: Tuesday, September 07, 2010 3:36 PM
To: Maven Users List
Subject: RE: Issue with help:effective-pom

Ken,

The default packaging type is "jar" [1].  If the the "packaging" entry
is missing from the output of "help:effective-pom", then you can safely
assume that the packaging is "jar".

[1]
http://maven.apache.org/ref/2.2.1/maven-model/maven.html#class_project

Ron Gallagher

-----Original Message-----
From: Ken Beal [mailto:[email protected]] 
Sent: Tuesday, September 07, 2010 11:50 AM
To: [email protected]
Subject: Issue with help:effective-pom

Hi,

 

We have a POM.XML file which has a <packaging> element in it.

 

When I run "mvn help:effective-pom > effective-pom.txt" and then open
the resulting file, the <packaging> element is missing.

 

I'm fairly new to this so I might be overlooking something.  Is this the
expected behavior?

 

In searching I found this page
(http://www.avajava.com/tutorials/lessons/how-do-i-display-the-effective
-pom-of-a-project.html), which shows an example of processing a pom and
the example shows (but doesn't point out) that the <packaging> element
is present in the original POM.XML, and missing in the output from "mvn
help:effective-pom"-which does seem to support that this is the expected
behavior, but I figured I'd ask anyway.

 

 

(Background: we're automating Maven builds, and I'm working on a way of
determining all the output files that will be produced by a particular
POM.XML, so we can automate adding builds to the automation.  My (again,
limited) understanding was that the <packaging> element determines the
output type, and we produced automation that worked against a parent
POM; but when pointed at a POM that doesn't have any children, the
<packaging> element is stripped.  As a workaround I'll add code saying
"if no <packaging> element, and this is a child-less POM, read in the
POM itself and extract the <packaging> element, then continue
processing."  Critique of this approach would also be appreciated-there
may be an easier way of doing this.)

 

Thanks,

--
Ken Beal
Senior Software Engineer, Build/Release

Cross Country Automotive Services
One Cabot Road
Medford, MA 02155
p: (781) 306-3605
m: (978) 423-8977
e: [email protected] <mailto:[email protected]> 


Confidentiality Note: This e-mail message and any attachments may
contain 
confidential or privileged information. If you are not the intended
recipient, 
please notify me immediately by replying to this message and destroy all

copies of this message and any attachments. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Confidentiality Note: This e-mail message and any attachments may contain 
confidential or privileged information. If you are not the intended recipient, 
please notify me immediately by replying to this message and destroy all 
copies of this message and any attachments. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to