You can may be try to define 2 profiles for your project:one for weblogic without the jdbc driver and one for jetty with that dependency...
your profile can be activated by -P option on maven command line On Mon, May 18, 2009 at 4:56 PM, tubin gen <[email protected]> wrote: > I have maven project , which is jar, war and ear. Ear I deploy in weblogic > , > and to save time I run war with jetty. > > because my project uses datasource , which is provided by weblogic and not > by jetty and in order to run in jetty > I add the deopendency > > <dependency> > <groupId>commons-dbcp</groupId> > <artifactId>commons-dbcp</artifactId> > <version>1.2.2</version> > <scope>compile</scope> > </dependency> > > <dependency> > <groupId>com.oracle</groupId> > <artifactId>ojdbc</artifactId> > <version>14</version> > <scope>compile</scope> > </dependency> > > and also created new file jetty-env.xml . > > now I want to tell maven to exclude the above three whenever ear is build > , > becasue its for weblogic and i donto the them , please tell me how i can > tell maven to avaoi above files and dependency ? >
