2

In my groovy script, I have this code :

@Grapes([
 @Grab(group='com.oracle', module='ojdbc14', version='10.2.0.3.0')
])

When I run the script, I receive an error message :

java.lang.RuntimeException: Error grabbing Grapes -- [download failed:     com.oracle#ojdbc14;10.2.0.3.0!ojdbc14.jar]

So, I download the jar file from oracle and I add it to my maven repository :

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=\path\to\ojdbc14.jar

I try again and I receive the same error message

I add a config file as describe on the grape page , with a ibiblio refering to my local repository, I try again and have also the same error.

I tried with another group like jfreechart and it is working.

So, why is it not working with ojdbc14.jar

Thanks a lot

M. Justin
  • 14,487
  • 7
  • 91
  • 130
Jonathan Lebrun
  • 1,462
  • 3
  • 20
  • 42

3 Answers3

0

Please remember that you have to add the local Maven repository according with Grape documentation (link to documentation).

Section from documentation:

If you find yourself wanting to reuse artifacts that you already have locally in your Maven2 repository, then you can add this line to your ~/.groovy/grapeConfig.xml:

<ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
Przemek Nowak
  • 7,173
  • 3
  • 53
  • 57
0

add ext='pom' to your @Grab.

@Grab(group='com.oracle', module='ojdbc14', version='10.2.0.3.0', ext='pom')

that's ok.

Aaron.Xu
  • 21
  • 1
0

After a cleaning of the local maven repository and grape directory, it's working fine now. The problem became from the cache.

Jonathan Lebrun
  • 1,462
  • 3
  • 20
  • 42