1

我在为 sakai 10 编译 clog 工具时遇到了一些麻烦......

https://github.com/adrianfish/clog/issues/5

我怀疑阿德里安目前正忙于 11 版本,但我想知道它是否真的可以由用户修复,或者其他人可能已经遇到了这个问题并且正在做一些我不知道的简单事情.. ?

基本上,当前的 clog 稳定版本(0.9.3 - https://confluence.sakaiproject.org/display/CLOG/Home)无法针对 sakai 10 代码库进行编译,这似乎是一个相关问题(CLOG -113) 这里...

https://github.com/adrianfish/clog/pull/3

但我不确定 sakai-10 存储库是否存在,因为编译 clog 的 sakai-10 分支(https://github.com/adrianfish/clog/tree/sakai-10)时出现的错误为如下:

bash-3.2$ mvn clean install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project org.sakaiproject.clog:clog:0.9.5-SNAPSHOT (/usr/local/sakai/sakai-src-10.0/clog-0.9.5-sakai-10branch/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact org.sakaiproject:master:pom:10.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 12, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

有没有人设法让 clog 在 sakai 10 上编译?这对我们的 sakai 10 部署有点阻碍:(

编辑:(另见“进一步编辑”的解决方案)

尝试下面的建议(https://stackoverflow.com/a/24769111/3737856)后,我收到此错误

*---snip---*
Downloaded: http://repo1.maven.org/maven2/org/apache/commons/commons-parent/17/commons-parent-17.pom (31 KB at 507.6 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom
Downloaded: http://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom (15 KB at 320.3 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/projectlombok/lombok/0.11.6/lombok-0.11.6.pom
Downloaded: http://repo1.maven.org/maven2/org/projectlombok/lombok/0.11.6/lombok-0.11.6.pom (2 KB at 34.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CLOG .............................................. SUCCESS [  7.693 s]
[INFO] CLOG API .......................................... FAILURE [  3.520 s]
[INFO] CLOG IMPL ......................................... SKIPPED
[INFO] CLOG PACK ......................................... SKIPPED
[INFO] CLOG HELP ......................................... SKIPPED
[INFO] CLOG TOOL ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.166 s
[INFO] Finished at: 2014-07-16T10:11:38+00:00
[INFO] Final Memory: 10M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project clog-api: Could not resolve dependencies for project org.sakaiproject.clog:clog-api:jar:0.9.5-SNAPSHOT: Failed to collect depend   encies at org.sakaiproject.kernel:sakai-kernel-api:jar:10.0: Failed to read artifact descriptor for org.sakaiproject.kernel:sakai-kernel-api:jar:10.0: Could not find arti   fact org.sakaiproject:kernel:pom:10.0 in central (http://repo1.maven.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 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
[ERROR]   mvn <goals> -rf :clog-api

我已经从源代码构建了当前的 sakai 10 版本构建(构建主目录然后是根目录),将阻塞源放在根目录中并在那里构建它。这通常有效。

此外,我还尝试在 clog pom 中进行更改:

<name>CLOG</name>
<groupId>org.sakaiproject.clog</groupId>
<artifactId>clog</artifactId>
<version>0.9.5-SNAPSHOT</version>
<packaging>pom</packaging>

至:

<name>CLOG</name>
<groupId>org.sakaiproject.clog</groupId>
<artifactId>clog</artifactId>
<version>0.9.5</version>
<packaging>pom</packaging>

使用这个和其他建议的更改进行构建会导致此错误:

-bash-3.2$ mvn clean install
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/sakaiproject/master/10.0/master-10.0.pom
Downloaded: http://repo.maven.apache.org/maven2/org/sakaiproject/master/10.0/master-10.0.pom (59 KB at 172.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] CLOG API
[INFO] CLOG IMPL
[INFO] CLOG PACK
[INFO] CLOG HELP
[INFO] CLOG TOOL
[INFO] CLOG
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building CLOG API 0.9.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CLOG API .......................................... FAILURE [  1.374 s]
[INFO] CLOG IMPL ......................................... SKIPPED
[INFO] CLOG PACK ......................................... SKIPPED
[INFO] CLOG HELP ......................................... SKIPPED
[INFO] CLOG TOOL ......................................... SKIPPED
[INFO] CLOG .............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.584 s
[INFO] Finished at: 2014-07-16T10:19:02+00:00
[INFO] Final Memory: 8M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project clog-api: Could not resolve dependencies for project org.sakaiproject.clog:clog-api:jar:0.9.5-SNAPSHOT: Failed to collect dependencies at org.sakaiproject.kernel:sakai-kernel-api:jar:10.0: Failed to read artifact descriptor for org.sakaiproject.kernel:sakai-kernel-api:jar:10.0: Failure to find org.sakaiproject:kernel:pom:10.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 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

另外......我注意到下载正在引用maven2存储库,我认为这没有任何区别,我肯定在使用maven3......

-bash-3.2$ mvn -v
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T17:37:52+00:00)
Maven home: /usr/local/maven2/current
Java version: 1.6.0_27, vendor: Sun Microsystems Inc.
Java home: /usr/local/java/jdk1.6.0_27/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "2.6.18-348.18.1.el5", arch: "amd64", family: "unix"

进一步编辑:

哦!

它现在可以工作了,我只按照建议的方式更改了 pom (10-SNAPSHOT -> 10) 并且 --> “编译为 root” <-- 我之前所做的是以非超级用户身份编译的,看起来像初始构建是用 root 编译的和/或我在某处有错误的权限,但 clog 现在正在编译。

我想我会向阿德里安提交一个拉取请求,以进行 pom 更改......

4

1 回答 1

2

看起来 Clog 设置正确。如果您正在执行完整的源代码编译,您需要让父级依赖于已检出(主控)并在本地构建。然后你可以建立堵塞。

https://confluence.sakaiproject.org/pages/viewpage.action?pageId=93028745

或者,您可以将版本更改为 10.0(已发布依赖项)并且 clog 将编译。例如:

--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.sakaiproject</groupId>
         <artifactId>master</artifactId>
-        <version>10.0-SNAPSHOT</version>
+        <version>10.0</version>
         <relativePath>../master/pom.xml</relativePath>
     </parent>

每晚可用且已知可在 10 上工作的工具的外部组件在这里。 https://source.sakaiproject.org/svn/sakai/branches/sakai-trunk-experimental/.externals

于 2014-07-15T22:17:49.340 回答