I would try adding the xml fragment to a profile in your parent pom and then activate the profile only in the sub modules. The activation could even be controlled by the presence of a java property that is defined when maven is invoked.
Petar Tahchiev wrote: > > Hello gyus, > > this time a very simple question: Is there a way to execute a plugin only > for the submodules you have and not for the present pom.xml. For instance: > I > have a parent pom.xml which has several modules. Each of the modules makes > an assembly so I place the common code: > > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-assembly-plugin</artifactId> > <configuration> > <descriptor>src/assemble/main.xml</descriptor> > </configuration> > <executions> > <execution> > <phase>package</phase> > <goals> > <goal>single</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build> > > > in their parent pom.xml. The problem is that maven tries to make an > assembly > in the parent pom.xml, and since I don't have an assembly descriptor in > the > parent pom's directory it fails. What I want is to place that snippet of > code in the parent pom, but execute it over the module files only. > > Thanks to anyone that helps. > > > -- > Regards, Petar! > Karlovo, Bulgaria. > > -- View this message in context: http://www.nabble.com/Running-a-plugin-only-for-the-submodules.-tf3058197s177.html#a8506835 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
