• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

maven pom.xml: downloading dependancy from maven public repository

 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic