Вопрос

I'm trying to build j2objc on my Ubuntu Desktop, and I get this error:

`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`

Before I tell you what I've tried, here's my info on my system, java version, and Maven version:

Mac OSX version - 10.9.2

Java version "1.7.0_51", OpenJDK Runtime Environment (IcedTea 2.4.6) (7u51-2.4.6-1ubuntu4)

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

Here's What I've tried:

Firstly, I've already looked at this thread and this thread since they had the same errors. Both haven't helped.

1. Deleting ~/.m2 then running make clean and make dist

2. running "mvn generate-resources dependency:sources" in the java_deps sub-directory, then running make clean and make dist

3. Updating Java and Maven versions to the most recent versions - as well as downgrading the versions.

4. Set M2_HOME to ~/.m2

5. Created a settings.xml file in the directory ~/.m2 with the following tag:

<localRepository>$M2_HOME/repository</localRepository>

Any help would be awesome, this thing is giving me a headache.

Thanks in advance.

Это было полезно?

Решение

I finally found the fix to this. From the top...

Downloaded/installed Maven's latest version...

Downloaded j2objc-0.9.1...

set the path for Maven...

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

ran 'make dist'...it still gave me the error above

i then changed this path...

export M2_HOME=~/.m2

ran 'make'

WORKED!

Maven was looking at the wrong location for "../repository/com/google/findbugs/jsr305/2.0.2/jsr305-2.0.2.jar".

Changing the path before you run 'make' fixes this issue.

Once the make command finishes, run:

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

This allows you to use the commands j2objc and j2objcc.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top