[英]Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2. 3.2:compile (default-compile) on project aopencommon
[INFO] .................................................. SUCCESS [1.166s]
[INFO] aopencommon .................................... FAILURE [3.797s]
[INFO] abbuclt ............................ SKIPPED .......................... etc all others skipped and error below appears [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2. [信息] abbuclt ................................. 跳过 .................. .........等所有其他人跳过并出现以下错误 [错误] 无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:2。 3.2:compile (default-compile) on project aopencommon: Compilation failure: Co mpilation failure: [ERROR] \\Users\\ds\\Desktop\\MYWORKSPACES2\\atime\\common-jar\\src\\main\\jav a\\com\\ax\\id\\atec_business_1\\ABunes.java:[46,8] cannot find sy mbol [ERROR] symbol : constructor Service(java.net.URL,javax.xml.namespace.QName,jav ax.xml.ws.WebServiceFeature[]) [ERROR] location: class javax.xml.ws.Service ............................................................ etc.. 3.2:compile (default-compile) on project aopencommon: Compilation failure: Compilation failure: [ERROR] \\Users\\ds\\Desktop\\MYWORKSPACES2\\atime\\common-jar\\src\\main\\jav a\\com\\ax\\id\\ atec_business_1\\ABunes.java:[46,8] 找不到符号 [ERROR] 符号:构造函数 Service(java.net.URL,javax.xml.namespace.QName,jav ax.xml.ws.WebServiceFeature[]) [ERROR] ] 位置:类 javax.xml.ws.Service ..................................... ..................... 等等..
http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 com.acm.ax aopenall pom 0.0.1-SNAPSHOT http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 com.acm.ax aopenall pom 0.0。 1-快照
<modules>
<module>abusjb-jar</module>
<module>abusear</module>
<module>aconejb-jar</module>
<module>aconear</module>
<module>common-jar</module>
<module>rerouteservlet-war</module>
<module>homevalejb-jar</module>
<module>homevalear</module>
<module>smallbusejb-jar</module>
<module>smallbusear</module>
<module>canbusejb-jar</module>
<module>canbusear</module>
<module>canconejb-jar</module>
<module>canconear</module>
<module>iscrejb-jar</module>
<module>iscrear</module>
<module>informaticaclientejb-jar</module>
<module>informaticaclientear</module>
<module>instantauditejb-jar</module>
<module>instantauditear</module>
<module>batchlookupservlets-war</module>
<module>batchlookupejb-jar</module>
<module>batchlookupear</module>
</modules>
below is from comman-jar project pom.xml下面是来自 comman-jar 项目 pom.xml
http://maven.apache.org/maven-v4_0_0.xsd"> aopenall com.acm.ax 0.0.1-SNAPSHOT 4.0.0 com.acm.ax aopencommon jar 0.0.1-SNAPSHOT aopencommon http://maven.apache.org/maven-v4_0_0.xsd"> aopenall com.acm.ax 0.0.1-SNAPSHOT 4.0.0 com.acm.ax aopencommon jar 0.0.1-SNAPSHOT aopencommon
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.jbossws</groupId>
<artifactId>jbossws-native-core</artifactId>
<version>3.1.1.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>provided</scope>
</dependency>
</dependencies>
try to compile with java 7 or use maven-compiler-plugin-2.1.1 instead尝试使用 java 7 编译或使用 maven-compiler-plugin-2.1.1 代替
Edit: add to your pom file to override the default compilation编辑:添加到您的 pom 文件以覆盖默认编译
<defaultOptions>
<extraargs>
<extraarg>-frontend</extraarg>
<extraarg>jaxws21</extraarg>
</extraargs>
https://stackoverflow.com/a/17651644/2593751 https://stackoverflow.com/a/17651644/2593751
查看您是否已经安装了 jdk,请转到: -> Java Build Path -> Libraries
如果没有,请下载并安装它并将其Add Library -> JRE System Library -> Alternate JRE: installed JREs -> Add -> Standard VM -> next -> Directory
到Add Library -> JRE System Library -> Alternate JRE: installed JREs -> Add -> Standard VM -> next -> Directory
在我的例子中,路径是:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64
For anyone coming here today: For me the issue was that the environment variable JAVA_HOME
was not set.对于今天来到这里的任何人:对我来说,问题是未设置环境变量JAVA_HOME
。 You have to set it to your sdk installation您必须将其设置为您的 sdk 安装
How to do that (assuming you have a jdk installed):如何做到这一点(假设您安装了 jdk):
JAVA_HOME
and set it's value accordingly - usually something like C:\\Program Files\\Java\\jdk1.8.0_131
设置或创建一个名为JAVA_HOME
的变量并相应地设置它的值 - 通常类似于C:\\Program Files\\Java\\jdk1.8.0_131
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.