This content has been marked as final.
Show 1 reply
-
1. Re: How to add ojdbc14.jar to ShrinkWrap: embedded glassfish3.1, seam3, ejb 3.1
kpiwko Feb 22, 2012 7:59 AM (in response to bjoice1)Hi Brin,
I guess you are using Maven, so you have ojdbc14.jar defined in your pom.xml file.
The easiest think you need to do is to add ShrinkWrap Maven Resolver to your project:
<dependencyManagement> ... <!-- this you should already have in your project --> </dependencyManagement> <dependencies> ... <!-- ShrinkWrap Resolver --> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-api</artifactId> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-api-maven</artifactId> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-impl-maven</artifactId> </dependency> ... </dependencies>
Then, you can get the ojdbc dependency from pom.xml file and add it to the WAR/EAR:
WebArchive war = ShrinkWrap.create(WebArchive.class, "myapp.war").addAsLibraries( DependencyResolvers.use(MavenDependencyResolver.class).loadEffectivePom("pom.xml").up() .artifact("ojdbc-groupId:ojdbc-artifactId").resolveAsFiles());
Hope that helps,
Karel