自建jetspeed发布时找不到oracle数据源(大概是这么个问题)

注定会睡着 发布于 2011/12/15 20:59
阅读 2K+
收藏 0

初次接触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🏺2.0-rc2 is missing, no
dependency information available
[WARNING] The POM for com.oracle:classes12🏺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🏺
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🏺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🏺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🏺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🏺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🏺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>

 

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

加载中
0
注定会睡着

好吧,我自己回答,class12.jar这个东西在中央仓库里没有,所以,cmd到oracle\product\10.2.0\db_1\jdbc\lib路径下,mvn install 就好了(发布第三方jar到本地库)

l
lamaracy
安装到本地库 mvn install:install-file -DgroupId=com.oracle -DartifactId=classes12 -Dversion=10.2.0.4 -Dpackaging=jar -Dfile=d:\apache-maven-3.0.1-bin\classes12.jar
0
注定会睡着
另外在搞定了上面的问题后继续发布又出了个问题,说是我用mvn生成的jetspeed程序的pom在中央仓库里找不到,那是肯定找不到的,在jetspeed根路径下mvn clean install 就好了,也不知道对不对。新手玩不转啊。
返回顶部
顶部