0 0

自建jetspeed发布时找不到oracle数据源的问题3

初次接触jetspeed 按照官方的biuld guid生成了一个portal ,准备发布到tomcat上

但执行命令过程中出现错误,似乎是要去中央仓库下载oracle的数据源(classes12.jar),中央仓库是没有这个的,为此已经用nexus把oracle里的classes12.jar发布到了本地仓库(3rd party)

但程序并没有访问本地仓库,貌似直接去中央仓库找jar包。不知哪里配置错了。

以下是出错信息

d:\workspace\mavenDemo-HelloPortal\hello>mvn org.apache.portals.jetspeed-2:jetsp
eed-mvn-maven-plugin:mvn -Dtarget=db
[INFO] Scanning for projects...
[INFO]

......省略很多log

......省略很多log

......省略很多log
[INFO] ------------------------------------------------------------------------
[INFO] Building Jetspeed-2 Maven Invoker Configuration for My Portal 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jetspeed-db-maven-plugin:2.2.2:init (unpack) @ jetspeed-mvn-portal-po
m ---
[WARNING] The POM for org.springframework:spring-ojb:jar:2.0-rc2 is missing, no
dependency information available
[WARNING] The POM for com.oracle:classes12:jar:10.2.0.1.0 is missing, no depende
ncy information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.308s
[INFO] Finished at: Thu Dec 15 20:27:25 CST 2011
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.portals.jetspeed-2:jetspeed-db-maven-p
lugin:2.2.2:init (unpack) on project jetspeed-mvn-portal-pom: Execution unpack o
f goal org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2.2:init failed:
Plugin org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2.2 or one of i
ts dependencies could not be resolved: Failure to find com.oracle:classes12:jar:
10.2.0.1.0 in http://repo1.maven.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of central has elap
sed or updates are forced
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2.2:init (unpack) on pro
ject jetspeed-mvn-portal-pom: Execution unpack of goal org.apache.portals.jetspe
ed-2:jetspeed-db-maven-plugin:2.2.2:init failed: Plugin org.apache.portals.jetsp
eed-2:jetspeed-db-maven-plugin:2.2.2 or one of its dependencies could not be res
olved: Failure to find com.oracle:classes12:jar:10.2.0.1.0 in http://repo1.maven
.org/maven2 was cached in the local repository, resolution will not be reattempt
ed until the update interval of central has elapsed or updates are forced
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:225)
        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.buildProje
ct(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        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(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution unpack of
goal org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2.2:init failed:
Plugin org.apache.portals.jetspeed-2:jetspeed-db-maven-plugin:2.2.2 or one of it
s dependencies could not be resolved: Failure to find com.oracle:classes12:jar:1
0.2.0.1.0 in http://repo1.maven.org/maven2 was cached in the local repository, r
esolution will not be reattempted until the update interval of central has elaps
ed or updates are forced
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:82)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
        ... 19 more
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.
portals.jetspeed-2:jetspeed-db-maven-plugin:2.2.2 or one of its dependencies cou
ld not be resolved: Failure to find com.oracle:classes12:jar:10.2.0.1.0 in http:
//repo1.maven.org/maven2 was cached in the local repository, resolution will not
be reattempted until the update interval of central has elapsed or updates are
forced
        at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:215)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPlug
inRealm(DefaultMavenPluginManager.java:353)
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPlugi
nRealm(DefaultMavenPluginManager.java:321)
        at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(Defa
ultBuildPluginManager.java:175)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:78)
        ... 20 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure t
o find com.oracle:classes12:jar:10.2.0.1.0 in http://repo1.maven.org/maven2 was
cached in the local repository, resolution will not be reattempted until the upd
ate interval of central has elapsed or updates are forced
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
aultArtifactResolver.java:541)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
facts(DefaultArtifactResolver.java:220)
        at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDepe
ndencies(DefaultRepositorySystem.java:395)
        at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:207)
        ... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to fi
nd com.oracle:classes12:jar:10.2.0.1.0 in http://repo1.maven.org/maven2 was cach
ed in the local repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced
        at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArti
fact(DefaultUpdateCheckManager.java:190)
        at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
aultArtifactResolver.java:430)
        ... 27 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hello portal project .............................. FAILURE [1:33.959s]
[INFO] hello portal ...................................... SKIPPED
[INFO] hello portlet application ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:35.230s
[INFO] Finished at: Thu Dec 15 20:27:25 CST 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.portals.jetspeed-2:jetspeed-mvn-maven-
plugin:2.2.2:mvn (default-cli) on project hello: ...FAILED[code=1]. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
d:\workspace\mavenDemo-HelloPortal\hello>



以下是jetspeed-mvn-portal-pom.xml的主要配置信息(其他默认)

<org.apache.jetspeed.production.jdbc.driver.groupId>com.oracle</org.apache.jetspeed.production.jdbc.driver.groupId>
        <org.apache.jetspeed.production.jdbc.driver.artifactId>classes12</org.apache.jetspeed.production.jdbc.driver.artifactId>
       
        <org.apache.jetspeed.production.jdbc.driver.version>10.2.0.1.0</org.apache.jetspeed.production.jdbc.driver.version>
       
        <org.apache.jetspeed.production.database.default.name>oracle10</org.apache.jetspeed.production.database.default.name>
        <org.apache.jetspeed.production.database.url>jdbc:oracle:thin:@192.168.1.201:1521:ORCL</org.apache.jetspeed.production.database.url>
        <org.apache.jetspeed.production.database.driver>oracle.jdbc.OracleDriver</org.apache.jetspeed.production.database.driver>
        <org.apache.jetspeed.production.database.user>shopping</org.apache.jetspeed.production.database.user>
        <org.apache.jetspeed.production.database.password>shopping</org.apache.jetspeed.production.database.password>



以下是maven的settings.xml的主要配置信息

<profile>
      <id>dev</id>
      <repositories>
        <repository>
          <id>local-nexus</id>
          <url>http://localhost:8081/nexus/content/groups/public/</url>
          <releases>
          <enabled>true</enabled>
          </releases>
          <snapshots>
          <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

  <!-- activeProfiles
   | List of profiles that are active for all builds.
   |
  <activeProfiles>
    <activeProfile>alwaysActiveProfile</activeProfile>
    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
  </activeProfiles>
  -->
  <activeProfiles>
    <activeProfile>dev</activeProfile>
  </activeProfiles>



弄了好久好久,就是不知道哪里有问题.......

问题补充:果然是同桌
frftfgfv 写道
class12.jar这个东西在中央仓库里没有,所以,cmd到oracle\product\10.2.0\db_1\jdbc\lib路径下,mvn install 就好了(发布第三方jar到本地库)
我是你同桌......
http://www.oschina.net/question/218202_34381

2011年12月15日 21:18

1个答案 按时间排序 按投票排序

0 0

采纳的答案

class12.jar这个东西在中央仓库里没有,所以,cmd到oracle\product\10.2.0\db_1\jdbc\lib路径下,mvn install 就好了(发布第三方jar到本地库)
我是你同桌......
http://www.oschina.net/question/218202_34381

2011年12月20日 12:09

相关推荐

Global site tag (gtag.js) - Google Analytics