Re: [Dspace-tech] Mvn package build fail

771 views
Skip to first unread message

Mark H. Wood

unread,
Aug 26, 2015, 10:15:34 AM8/26/15
to dspac...@lists.sourceforge.net
On Thu, Dec 13, 2012 at 04:46:35AM -0800, mErRYo wrote:
> I am using dspace 3.0 release and my maven build is failing when i try to run this command
> mvn -Ddb.name=oracle package
>
> I am using oracle 11g XE with oracle Linux and maven is 3.x
>
>
> error it throws is :
> Failed to execute goal on project additions: Could not resolve dependencies for project org.dspace.modules:additions:jar:3.0: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced

Oracle does not post JARs to Maven Central (or any other
Maven-compatible archive that I know of) so Maven can't get it for
you automagically. You need to collect this one from Oracle's web
site (after agreeing to their license) and put a copy in your local
repository manually. It appears that this has not yet been done.

If it were me, once I had the JAR (let's say it is
ojdbc6-11.2.0.2.0.jar) I'd use a command like this:

mvn install:install-file \
-DgroupId=com.oracle \
-DartifactId=ojdbc6 \
-Dversion=11.2.0.2 \
-Dfile=ojdbc6-11.2.0.2.0.jar

In fact it appears that I did, once upon a time. But I hardly ever
have to do this, and thus don't remember it very well, so the command
may need some adjustment.

--
Mark H. Wood, Lead System Programmer mw...@IUPUI.Edu
There's an app for that: your browser

helix84

unread,
Aug 26, 2015, 10:15:36 AM8/26/15
to mErRYo, dspac...@lists.sourceforge.net
On Thu, Dec 13, 2012 at 1:46 PM, mErRYo <merry...@yahoo.com> wrote:
> I am using dspace 3.0 release and my maven build is failing when i try to run this command
> mvn -Ddb.name=oracle package

The correct installation procedure for Oracle is described in the
official documentation:

https://wiki.duraspace.org/display/DSDOC3x/Installation


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

helix84

unread,
Aug 26, 2015, 10:15:59 AM8/26/15
to mErRYo, dspac...@lists.sourceforge.net, mw...@iupui.edu
On Fri, Dec 14, 2012 at 12:03 PM, mErRYo <merry...@yahoo.com> wrote:
>
> Actually the problem is (due to dspace online documentaation which says: to manually install Oracle JDBC Driver with maven command : mvn install:install ..... , as incomplete oracle version is mentioned 11.2.0.3 instead of 11.2.0.3.0) .

I corrected the documentation to say 11.2.0.3.0. But I think it would
work as it was (because it told you to put 11.2.0.3 also in pom).

> Secondly again according to dspace online documentation: add Oracle dependency descriptor in pom.xml , which is not required, because it is already mentioned in pom.xml file, ALL you need is to correct the driver version 11.2.0.2.0 TO 11.2.0.3.0

It is there because you need to install the same version as you have
in pom. By default, that is 11.2.0.2.0 (see link), so you needed to
change it if you installed 11.2.0.3.0.

https://github.com/DSpace/DSpace/blob/dspace-3_x/pom.xml#L849

mErRYo

unread,
Aug 26, 2015, 10:18:10 AM8/26/15
to hel...@centrum.sk, hilton...@gmail.com, lighto...@gmail.com, jm...@lyncode.com, dspac...@lists.sourceforge.net
I am using dspace 3.0 release and my maven build is failing when i try to run this command
mvn -Ddb.name=oracle package

I am using oracle 11g XE with oracle Linux and maven is 3.x


error it throws is :
Failed to execute goal on project additions: Could not resolve dependencies for project org.dspace.modules:additions:jar:3.0: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced

detail trace is:

[ERROR] Failed to execute goal on project additions: Could not resolve dependencies for project org.dspace.modules:additions:jar:3.0: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project additions: Could not resolve dependencies for project org.dspace.modules:additions:jar:3.0: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.dspace.modules:additions:jar:3.0: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:189)
    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
    ... 22 more
Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:183)
    ... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
    ... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find com.oracle:ojdbc6:jar:11.2.0.2 in http://oss.sonatype.org/content/repositories/releases/ was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-releases has elapsed or updates are forced
    at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:230)
    at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:204)
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427)
    ... 26 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

mErRYo

unread,
Aug 26, 2015, 10:18:10 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net, mw...@iupui.edu
Issue Resolved.

Actually the problem is (due to dspace online documentaation which says: to manually install Oracle JDBC Driver with maven command : mvn install:install ..... , as incomplete oracle version is mentioned 11.2.0.3 instead of 11.2.0.3.0) .

Secondly again according to dspace online documentation: add Oracle dependency descriptor in pom.xml , which is not required, because it is already mentioned in pom.xml file, ALL you need is to correct the driver version 11.2.0.2.0 TO 11.2.0.3.0

After that run mvn package command to build your package for oracle . You will be successful.



--- On Thu, 12/13/12, mErRYo <merry...@yahoo.com> wrote:

From: mErRYo <merry...@yahoo.com>
Subject: Re: Mvn package build fail
To: hel...@centrum.sk
Cc: hilton...@gmail.com, lighto...@gmail.com, jm...@lyncode.com, dspac...@lists.sourceforge.net, mw...@IUPUI.Edu
Date: Thursday, December 13, 2012, 9:14 PM

Guys I already these steps as mentioned by Mr. Wood and Helix but the result is same error. I got few warnings also which is as follows:

[WARNING] Some problems were encountered while building the effective model for org.dspace:dspace:pom:3.0
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.oracle:ojdbc6:jar -> version 11.2.0.2 vs 11.2.0.2.0 @ org.dspace:dspace-parent:3.0, /usr/local/dspace-3.0-src-release/pom.xml, line 853, column 22
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

my log file is also attached.


--- On Thu, 12/13/12, helix84 <hel...@centrum.sk> wrote:

From: helix84 <hel...@centrum.sk>
Subject: Re: Mvn package build fail
To: "mErRYo" <merry...@yahoo.com>
Cc: hilton...@gmail.com, lighto...@gmail.com, jm...@lyncode.com, dspac...@lists.sourceforge.net
Date: Thursday, December 13, 2012, 7:22 PM

On Thu, Dec 13, 2012 at 1:46 PM, mErRYo <merry...@yahoo.com> wrote:
> I am using dspace 3.0 release and my maven build is failing when i try to run this command
> mvn -Ddb.name=oracle package

The correct installation procedure for Oracle is described in the
official documentation:

https://wiki.duraspace.org/display/DSDOC3x/Installation


mErRYo

unread,
Aug 26, 2015, 10:18:10 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net, mw...@iupui.edu
error_new.log
Reply all
Reply to author
Forward
0 new messages