我正在使用https://github.com/webdevwilson/magento-java使用JAVA连接到我的商店magento集成系统。我安装了Maven
,openjdk-6-jdk
,为java设置了主页等。我的信息是:
sudo java -version
java version "1.6.0_36"
OpenJDK Runtime Environment (IcedTea6 1.13.8) (6b36-1.13.8-0ubuntu1~14.04)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
sudo mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.6.0_36, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-43-generic", arch: "amd64", family: "unix"
当我在包含POM.xml文件的包的文件夹中尝试时:
用于编译结果的sudo mvn package
或sudo mvn install
是:
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.511s
[INFO] Finished at: Sun Aug 30 19:50:12 EDT 2015
[INFO] Final Memory: 12M/71M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project magento-ws-client: Compilation failure: Compilation failure:
[ERROR] /magento-java/src/main/java/com/magi/magento/service/BaseService.java:[27,34] cannot find symbol
[ERROR] symbol : method getMage_Api_Model_Server_V2_HandlerPort(java.net.URL)
[ERROR] location: interface com.magi.magento.ws.client.MagentoService
[ERROR] /magento-java/src/main/java/com/magi/magento/service/OrderService.java:[112,44] incompatible types
[ERROR] found : com.magi.magento.ws.client.SalesOrderListEntity[]
[ERROR] required: com.magi.magento.ws.client.SalesOrderEntity[]
[ERROR] -> [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/MojoFailureException
注意:
[ERROR] /magento-java/src/main/java/com/magi/magento/service/BaseService.java:[27,34]找不到符号
[ERROR] /magento-java/src/main/java/com/magi/magento/service/OrderService.java:[112,44]不兼容的类型
我试图在POM FILE
更改版本的编译器maven:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
但错误仍然存在,我该怎么办?是的,我在谷歌搜索时尝试了每个提示或链接,没有解决。提前谢谢。