Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven pom.xml: downloading dependancy from maven public repository

 
trupti nigam
Ranch Hand
Posts: 626
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to download the orai18n.jar that comes with oracle version 10.2 through maven pom.xml
I searched it on maven public repository but there is no entry for the version 10.2 . There are two entries for version 11.2.1 and version 14.

I tried below in pom.xml

<dependency>
<groupId>com.oracle</groupId>
<artifactId>orai18n</artifactId>
<version>10.2</version>
</dependency>

but it gives error. I need to have the exact version cause my code gives error with version 11.2 and 14 as I am using oracle 10.2.
How do I achieve this through maven pom.xml?

thanks
Trupti
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can't find the version you need in a Mavne repository, you can always load it into your local repository. First, download the JAR you need from the Oracle web site, and then use the command that Maven gave you (it is part of the error message) to install the JAR locally.
 
trupti nigam
Ranch Hand
Posts: 626
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response.
But I am building the .war file and I want this jar to be there in the WEB_INF/lib directory everytime I build the war. can this be specified in pom.xml

I am new to maven and learing new things everyday!

Here is what I got the instructions on how to install it.

mvn install:install-file -DgroupId=com.oracle -DartifactId=orai18n -Dversi
on=10.2 -Dpackaging=jar -Dfile=/path/to/file

thanks
Trupti
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want this jar to be there in the WEB_INF/lib directory everytime I build the war

Why do you want to do that? For runtime, I agree, but for compiling Maven always gets JAR files from the local repository (after downloading the JARs from one or more global repositories).

The dependency, as you have it, will cause the JAR file to be placed in WEB-INF/lib when Maven builds the WAR.

I assume that you have read Better Builds with Maven and Maven: The Definitive Guide, both free downloads.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic