maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <>
Subject avoiding kludge when factoring common build steps into parent pom
Date Fri, 07 May 2010 18:30:20 GMT
I have a bunch of project that execute some common build steps.

I factored these out into a parent-pom, and change the projects to
specify this as their parent.

My parent-pom is of package-type "pom".  

The problem I'm having is that the factored-out build steps run when I
do "mvn install" on the parent-pom to get it into my local repo.  These
steps don't work and throw errors, when run here. 

So I fixed this with a kludge - and I'm hoping to learn a better way. 
My kludge:

I moved the build steps into a profile, and activated the profile on the
absence of a file, named something like
"marker-file-identifying-parent-pom-XXX".  And then, I put a dummy file
of that name into the parent project.  This keeps the pom from running
the build steps in the parent, but makes those steps available to the

Is there a better way?

-Marshall Schor

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message