Sonar, Nishant wrote: > Hi > > > > We work with profiles in maven as > > > > Mvn -Pprofile1,profile2 > > > > On pom > > > > <profiles> > > <profile> > > <id>profile1</id> > > <build> > > <plugin> > > ... > > </plugin> > > </build> > > <profile> > > <profile> > > <id>profile2</id> > > <build> > > <plugin> > > ... > > </plugin> > > </build> > > <profile> > > </profiles> > > > > In this case both the builds are different .Consider a case where we have a > comman build tasks in > > Both tasks but some ½ different build tasks (plugins) to be different , Is > there a way to specify one common build which > > Will always execute and one which will execute plugins on basis of profile > > > > > > Thanks > > nishant > > > >
Factor out the common parts of the profiles and put that in the POM's build section. Then just use the profiles to override or add to that. For instance, by default my project builds with standard debug settings and no optimization. This is specified in the build section of the POM. However, I created a release profile that overrides some of the compiler plugin settings. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
