Maven build parent pom last

I've got a parent pom building a bunch of modules, looks like this:

pom.xml | project-A / pom.xml | project-B / pom.xml | project-C / pom.xml

Which results in a build order of

Parent A B C

When I install, I want to run a bunch of ant tasks that are in the parent pom, basically moving the jars in them modules into another directory, which requires the modules to be built first and the the parent to do it's thing. The problem is that the parent pom builds first then builds the modules, which isn't want I want.

The main requirement though is that I have to have it done in the install phase, if thats possible.

How can I make it so that when I run clean install, it runs the ant tasks AFTER the modules have been built and the module's jars are in their target directory?

-------------Problems Reply------------

Just create a "packager module" that depends on all of the other modules and run your ant tasks there.

Category:maven Views:0 Time:2011-06-16
Tags: maven

Related post

  • Maven : Determine parent POM 2010-03-11

    I have a whole bunch of mavenised projects, and I want to check that each project has the correct version of a parent pom. One way could be to checkout each project in turn, and then have a script that reads the parent section. Or is these some way o

  • Child not finding parent pom in flat structured multi module maven build 2009-11-05

    I'm setting up a multi module project with a flat structure, i.e. parent and child are in the same base directory. Parent is defined as <project xmlns="" xmlns:xsi="" xsi:sc

  • Project build error: Non-resolvable parent POM in maven 2011-07-27

    Project build error: Non-resolvable parent POM guide.ide.eclipse:guide-ide-eclipses:1.0-SNAPSHOT for guide.ide.eclipse:guide-ide-eclipse:0.0.1-SNAPSHOT: Failed to resolve POM for guide.ide.eclipse:guide-ide-eclipses:1.0-SNAPSHOT due to Missing: 1) gu

  • Maven: Only want to run profile if doing a build on the parent pom 2011-09-12

    I'm using Maven 3.0.3. I have a project that inherits from a parent … <modelVersion>4.0.0</modelVersion> <groupId>com.myco.util.ant</groupId> <artifactId>selenium-framework</artifactId> <packaging>jar</pac

  • How can I mix parent POMs in a Maven multi-module build? 2012-03-30

    I have a Maven multi-module project and I need two different parent POMs in this build. The first one is the real parent POM for most modules in the project but one module is a demo project which uses the parent POM of a completely different project

  • Maven - skip parent project build 2009-10-01

    I know it's mauvais ton to ask twice in a single day but here's another Maven puzzler: I have a parent POM which defines 5 modules (5 subprojects). Since each module is executed in exactly the same way I pull <profile><build> section into

  • Maven : Is it possible to override the configuration of a plugin already defined for a profile in a parent POM 2009-11-20

    In a POM parent file of my project, I have such a profile defining some configurations useful for this project (so that I can't get rid of this parent POM) : <profile> <id>wls7</id> ... <build> <plugins> <!-- use java

  • Maven parent pom vs modules pom 2010-01-02

    There seem to be several ways to structure parent poms in a multiproject build and I wondering if anyone had any thoughts on what the advantages / drawbacks are in each way. The simplest method of having a parent pom would be putting it in the root o

  • multi module maven project with parent pom and svn layout 2010-12-14

    I currently have about 16 projects that I build with maven that get deployed to the same application server that make up something like a "portal". I have built a parent pom to handle common dependencies and plugin configurations. Currently, my SVN s

  • Hudson build fail: Non-resolvable parent POM 2011-03-02

    I used to work with Hudson on my project, and lately I had to move it to a new server. I configured it the exact same way it use to be (for all I can tell) but when I try to launch a build, it fails and I get the following error: Démarré par l'utilis

  • How to build plugins having different versions from a single parent pom.xml? 2011-07-09

    I am trying to build several Eclipse plug-ins with Maven Tycho. All the plug-ins does not have the same version number. Let's say the following pom architecture: plugin1 (version 1.0.6.qualifier) / pom.xml plugin2 (version 1.4.0.qualifier) / pom.xml

  • Parent pom and maven goals for only war projects 2011-07-13

    I have a multi module maven project. It has 5 module and 2 of them are web projects. I want to customize my plugins to be run at only war projects. I mean at parent pom level I would like to trigger my goals and only my war projects will be affected.

  • How can I validate the pluginManagement section of my parent POM in Maven? 2011-09-09

    I use a project layout like the first one described in the accepted answer to this question. If my parent-pom is managed, built and deployed separate from my project POMs, how can I ensure the pluginManagement section of my parent-pom is valid? Maven

  • Maven: Non-resolvable parent POM 2011-09-30

    I have my maven project setup as 1 shell projects and 4 children modules. When I try to build the shell. I get: [INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project module1:1.0_A0 (C:\m

  • How do I disable Cobertura in a child project when it is enabled by a Maven parent pom? 2011-10-14

    I have many projects which inherit from a parent pom. I enable Cobertura coverage reports in the parent via a Maven profile that is activated in our Jenkins CI builds. However, I want to disable Cobertura for one child project (while getting everythi

  • How to override parameters of maven-war-plugin defined in parent pom.xml? 2011-11-02

    I'm trying to build a grails project with maven. By itself, that wouldn't be so hard. But it is required that the pom.xml in my project have a certain enterprise pom as it's parent. The parent pom has many things in it that are important in our deplo

  • maven release:perform and parent pom 2011-12-14

    I have a library which I "mavenized" recently and put into a local git repository. In order to lock some plugin versions I created a simple parent pom which defines the plugin versions via pluginManagement (the parent pom file is not checked into any

  • Myibatis source Project build error: Non-resolvable parent POM 2012-01-30

    First I check out svn to mybatis project. I´m actually trying setup a new development environment, using Apache Maven 3.0.1 and java version "1.6.0_23" When trying to build mybatis source projects within maven

  • Maven - Parent Pom - Child Inheritance 2012-02-28

    I am attempting to make a maven parent pom setup where I don't have to declare any plugin information in my child pom, everything is taken from the parent pom. I essentially have it working where I've put all my plugins with there configurations in t

Copyright (C), All Rights Reserved.

processed in 0.166 (s). 11 q(s)