2

私は Play Framework を初めて使用し、Alfresco にアクセスする必要があるアプリケーションを持っています。これはBuild.scalaファイルです

object ApplicationBuild extends Build {

  val appName         = "Librarian"
  val appVersion      = "1.0-SNAPSHOT"

  val appDependencies = Seq(
    javaCore,
    javaJdbc,
    javaEbean,
    "org.alfresco" % "alfresco-web-service-client" % "4.2.c"
  )

  val main = play.Project(appName, appVersion, appDependencies).settings(
     lessEntryPoints <<= baseDirectory(_ / "app" / "assets" / "stylesheets" ** "main.less"),
    resolvers += "Alfresco Repository" at "http://maven.alfresco.com/nexus/content/groups/public"
  )
}

実行play compileすると、Alfresco の依存関係が解決されず、次のエラーが発生します。

[info] Loading project definition from D:\Projects\Play\Librarian\project
[info] Set current project to Librarian (in build file:/D:/Projects/Play/Librarian/)
[info] Updating {file:/D:/Projects/Play/Librarian/}Librarian...
[warn]  module not found: org.alfresco#alfresco-web-service-client;4.2.c
[warn] ==== local: tried
[warn]   D:\Java\play-2.1.1\repository\local\org.alfresco\alfresco-web-service-client\4.2.c\ivys\ivy.xml
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/alfresco/alfresco-web-service-client/4.2.c/alfresco-web-service-client-4.2.c.pom
[warn] ==== Typesafe Snapshots Repository: tried
[warn]   http://repo.typesafe.com/typesafe/snapshots/org/alfresco/alfresco-web-service-client/4.2.c/alfresco-web-service-client-4.2.c.pom
[warn] ==== Alfresco Repository: tried
[warn]   http://maven.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-web-service-client/4.2.c/alfresco-web-service-client-4.2.c.pom
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/alfresco/alfresco-web-service-client/4.2.c/alfresco-web-service-client-4.2.c.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.alfresco#alfresco-web-service-client;4.2.c: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.alfresco#alfresco-web-service-client;4.2.c: not found
        at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:114)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:114)
        at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:102)
        at sbt.IvySbt.liftedTree1$1(Ivy.scala:49)
        at sbt.IvySbt.action$1(Ivy.scala:49)
        at sbt.IvySbt$$anon$3.call(Ivy.scala:58)
        at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:75)
        at xsbt.boot.Locks$GlobalLock.withChannelRetries$1(Locks.scala:58)
        at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:79)
        at xsbt.boot.Using$.withResource(Using.scala:11)
        at xsbt.boot.Using$.apply(Using.scala:10)
        at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:51)
        at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:51)
        at xsbt.boot.Locks$.apply0(Locks.scala:30)
        at xsbt.boot.Locks$.apply(Locks.scala:27)
        at sbt.IvySbt.withDefaultLogger(Ivy.scala:58)
        at sbt.IvySbt.withIvy(Ivy.scala:99)
        at sbt.IvySbt.withIvy(Ivy.scala:95)
        at sbt.IvySbt$Module.withModule(Ivy.scala:114)
        at sbt.IvyActions$.update(IvyActions.scala:121)
        at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:951)
        at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:949)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$54.apply(Defaults.scala:972)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$54.apply(Defaults.scala:970)
        at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:974)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:969)
        at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
        at sbt.Classpaths$.cachedUpdate(Defaults.scala:977)
        at sbt.Classpaths$$anonfun$45.apply(Defaults.scala:856)
        at sbt.Classpaths$$anonfun$45.apply(Defaults.scala:853)
        at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
        at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
        at sbt.std.Transform$$anon$5.work(System.scala:71)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:238)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.alfresco#alfresco-web-service-client;4.2.c: not found
[error] Total time: 9 s, completed May 2, 2013 6:00:30 PM

出力は、正しいリポジトリが試行されたことを示していますが、何らかの理由で依存関係が見つかりません。ブラウザから次の URL にアクセスすると、問題なく動作します。

https://maven.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-web-service-client/4.2.c/alfresco-web-service-client-4.2.c.pom

お知らせ下さい。

4

2 に答える 2

2

その理由は、alfresco nexus リポジトリが新しい場所 ( http://artifacts.alfresco.com ) に移動したことが原因ではないかと考えています。ワゴン プロバイダーがリダイレクトをたどることができなかった同様の問題 (maven を使用) がありました。http://maven.alfresco.comの古い場所を指すときにサーバーによって発行されました。

https://artifacts.alfresco.com/nexus/content/groups/publicリポジトリを試す必要があります (コメントを参照)。

于 2013-05-02T14:55:16.813 に答える
0

Alfresco 4.2.b から 4.2.e では、アーティファクト "alfresco-web-client" に問題があると思います。pom.xml ファイルでの私の解決策は次のとおりです。

    <dependency>
        <groupId>org.alfresco</groupId>
        <artifactId>alfresco-web-client</artifactId>
        <version>4.2.e</version>
        <classifier>classes</classifier>
        <scope>system</scope>
        <systemPath>C:/Users/Fernando/.m2/repository/org/alfresco/alfresco-web-client/4.2.e/alfresco-web-client-4.2.e.jar</systemPath>
    </dependency>
于 2014-09-11T13:42:43.810 に答える