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.

Reply via email to