J2OBJC使dist“无规则制作目标”错误

时间:2014-04-27 17:17:58

标签: linux maven jar makefile converter

我试图在我的Ubuntu桌面上构建j2objc,我收到此错误:

`root@craig-OptiPlex-3020:/home/craig/j2objc-0.8.8# make dist
./scripts/sysroot_path.sh: line 30: xcode-select: command not found
../scripts/sysroot_path.sh: line 30: xcode-select: command not found
make[1]: Entering directory /home/craig/j2objc-0.8.8/annotations'
Building j2objc annotations
make[1]: Leaving directory /home/craig/j2objc-0.8.8/annotations'
../scripts/sysroot_path.sh: line 30: xcode-select: command not found
make[1]: Entering directory /home/craig/j2objc-0.8.8/java_deps'
mvn generate-resources dependency:sources
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building j2objc 0.8
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.5:copy-dependencies (copy-dependencies) @ j2objc ---
[INFO] Copying org.eclipse.equinox.common-3.6.0.v20100503.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.equinox.common-3.6.0.v20100503.jar
[INFO] Copying org.eclipse.core.resources-3.6.0.v20100526-0737.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.core.resources-3.6.0.v20100526-0737.jar
[INFO] Copying org.eclipse.core.runtime-3.6.0.v20100505.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.core.runtime-3.6.0.v20100505.jar
[INFO] Copying org.eclipse.core.jobs-3.5.0.v20100515.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.core.jobs-3.5.0.v20100515.jar
[INFO] Copying org.eclipse.core.contenttype-3.4.100.v20100505-1235.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.core.contenttype-3.4.100.v20100505-1235.jar
[INFO] Copying org.eclipse.text-3.5.100.v20110505-0800.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.text-3.5.100.v20110505-0800.jar
[INFO] Copying junit-4.10.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/junit-4.10.jar
[INFO] Copying mockito-core-1.9.5.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/mockito-core-1.9.5.jar
[INFO] Copying org.eclipse.equinox.preferences-3.3.0.v20100503.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.equinox.preferences-3.3.0.v20100503.jar
[INFO] Copying jsr305-2.0.2.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/jsr305-2.0.2.jar
[INFO] Copying org.eclipse.osgi-3.6.0.v20100517.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.osgi-3.6.0.v20100517.jar
[INFO] Copying org.eclipse.jdt.core-3.8.1.v20120531-0637.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/org.eclipse.jdt.core-3.8.1.v20120531-0637.jar
[INFO] Copying guava-13.0.jar to /home/craig/j2objc-0.8.8/java_deps/build_result/guava-13.0.jar
[INFO] 
[INFO] --- maven-dependency-plugin:2.5:sources (default-cli) @ j2objc ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    org.hamcrest:hamcrest-core:java-source:sources:1.1
[INFO]    org.eclipse.core:org.eclipse.core.jobs:java-source:sources:3.5.0.v20100515
[INFO]    org.objenesis:objenesis:java-source:sources:1.0
[INFO]    org.eclipse.core:org.eclipse.core.contenttype:java-source:sources:3.4.100.v20100505-1235
[INFO]    org.jibx.config.3rdparty.org.eclipse:org.eclipse.text:java-source:sources:3.5.100.v20110505-0800
[INFO]    org.eclipse.tycho:org.eclipse.jdt.core:java-source:sources:3.8.1.v20120531-0637
[INFO]    com.google.guava:guava:java-source:sources:13.0
[INFO]    org.eclipse.osgi:org.eclipse.osgi:java-source:sources:3.6.0.v20100517
[INFO]    org.mockito:mockito-core:java-source:sources:1.9.5
[INFO]    org.eclipse.equinox:org.eclipse.equinox.common:java-source:sources:3.6.0.v20100503
[INFO]    org.eclipse.equinox:org.eclipse.equinox.preferences:java-source:sources:3.3.0.v20100503
[INFO]    org.eclipse.core:org.eclipse.core.runtime:java-source:sources:3.6.0.v20100505
[INFO]    junit:junit:java-source:sources:4.10
[INFO]    org.eclipse.core:org.eclipse.core.resources:java-source:sources:3.6.0.v20100526-0737
[INFO] 
[INFO] The following files have NOT been resolved:
[INFO]    com.google.code.findbugs:jsr305:java-source:sources:2.0.2
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.419s
[INFO] Finished at: Sun Apr 27 12:17:40 EDT 2014
[INFO] Final Memory: 10M/171M
[INFO] ------------------------------------------------------------------------
make[1]: *** No rule to make target /usr/local/apache-maven-3.0.5//repository/com/google/code/findbugs/jsr305/2.0.2/jsr305-2.0.2.jar', needed by /home/craig/j2objc-0.8.8/java_deps/build_result/jsr305-2.0.2.jar'.  Stop.
make[1]: Leaving directory /home/craig/j2objc-0.8.8/java_deps'
make: *** [java_deps_dist] Error 2`

在我告诉你我尝试过的内容之前,请查看我的系统,java版本和Maven版本的信息:

Mac OSX 版本 - 10.9.2

Java版" 1.7.0_51",OpenJDK运行时环境(IcedTea 2.4.6)(7u51-2.4.6-1ubuntu4)

Maven版 Apache Maven 3.0.5(r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)

以下是我尝试的内容

首先,我已经查看了this threadthis thread,因为他们有相同的错误。两个人都没有帮助。

1。删除〜/ .m2然后运行make clean并make dist

2。运行" mvn generate-resources依赖:来源"在java_deps子目录中,然后运行make clean和make dist

3. 将Java和Maven版本更新到最新版本 - 以及降级版本。

4. 将M2_HOME设置为〜/ .m2

5. 在〜/ .m2目录中创建了一个settings.xml文件,其中包含以下标记:

<localRepository>$M2_HOME/repository</localRepository>

任何帮助都会很棒,这件事让我很头疼。

提前致谢。

1 个答案:

答案 0 :(得分:0)

我终于找到了解决这个问题的方法。从顶部......

下载/安装了Maven的最新版本......

已下载j2objc-0.9.1 ...

设置Maven的路径......

export M2_HOME=/Users/Craig/apache-maven-3.2.1
export PATH=$PATH:$M2_HOME/bin

运行&#39; make dist&#39; ... 它仍然给我上面的错误

然后我改变了这条道路......

export M2_HOME=~/.m2

运行&#39; make&#39;

工作!

Maven正在查看&#34; ../ repository / com / google / findbugs / jsr305 / 2.0.2 / jsr305-2.0.2.jar&#34;的错误位置。

在运行之前更改路径&#39;制作&#39;解决了这个问题。

make命令完成后,运行:

export PATH=$PATH:/<j2objc location>/dist

这允许您使用命令j2objc和j2objcc。