Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:

vbubble 2012-01-14 01:14:37

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project clothing: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files\Java\jre6\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[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




<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<warName>test</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install</id>
<phase>install</phase>
<goals>
<goal>sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

...全文
223467 点赞 收藏 27
写回复
27 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
mybest123liu 2014-10-09
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile (default-compile) on project andromeda-adapter-common: Compilation failure: Compilation failure: [ERROR] \Users\Administrator\workspace\andromeda-adapter\andromeda-adapter-common\src\main\java\com\eastcom\andromeda\adapter\common\builder\SessionBuilder.java:[61,27] 无法确定 <T>T 的类型参数;对于上限为 T,java.lang.Object 的类型变量 T,不存在唯一最大实例 [ERROR] 这个怎么解啊?
回复
云果儿 2014-08-21
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building elasticsearch 2.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven) @ elasticsearch --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) @ elasticsearch --- [INFO] [INFO] --- maven-antrun-plugin:1.7:run (default) @ elasticsearch --- [INFO] Executing tasks main: [echo] Using Java(TM) SE Runtime Environment 1.7.0_67-b01 Oracle Corporation [INFO] Executed tasks [INFO] [INFO] --- maven-antrun-plugin:1.7:run (invalid-patterns) @ elasticsearch --- [INFO] Executing tasks main: [INFO] Executed tasks [INFO] [INFO] --- buildnumber-maven-plugin:1.2:create (default) @ elasticsearch --- [INFO] Checking for local modifications: skipped. [INFO] Updating project files from SCM: skipped. [INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD" [INFO] Working directory: D:\EScode\elasticsearch-master\elasticsearch-master [INFO] Storing buildNumber: null at timestamp: 1408583275382 [INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD" [INFO] Working directory: D:\EScode\elasticsearch-master\elasticsearch-master [INFO] Storing buildScmBranch: UNKNOWN_BRANCH [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ elasticsearch --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 2 resources [INFO] Copying 5 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ elasticsearch --- [INFO] Compiling 3103 source files to D:\EScode\elasticsearch-master\elasticsearch-master\target\classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 37.825 s [INFO] Finished at: 2014-08-21T09:08:27+08:00 [INFO] Final Memory: 20M/332M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project elasticsearch: Compilation failure -> [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 怎么改啊?
回复
云果儿 2014-08-20
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project elasticsearch: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile failed: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 -> org.codehaus.plexus:plexus-compiler-api:jar:2.2: Failed to read artifact descriptor for org.codehaus.plexus:plexus-compiler-api:jar:2.2: Could not transfer artifact org.codehaus.plexus:plexus:pom:3.3.1 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [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/PluginResolutionException 这又是哪里的错?谁帮忙给看看
回复
云果儿 2014-08-20
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.2:create (default) on project elasticsearch: Execution default of goal org.codehaus.mojo:buildnumber-maven-plugin:1.2:create failed: Plugin org.codehaus.mojo:buildnumber-maven-plugin:1.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.codehaus.mojo:buildnumber-maven-plugin:jar:1.2 -> org.apache.maven.scm:maven-scm-provider-clearcase:jar:1.8: Failed to read artifact descriptor for org.apache.maven.scm:maven-scm-provider-clearcase:jar:1.8: Could not transfer artifact org.apache.maven.scm:maven-scm-provider-clearcase:pom:1.8 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [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/PluginResolutionException 各位大神给看看这是哪里的错?怎么改呀
回复
心如刀割 2014-08-06
把eclipse的jre目录改成jdk 的
回复
qq_16684807 2014-07-30
Failed to execute goal on project dmis-dao-oracle: Could not resolve dependencies for project com.wange.pdt.dmis:dmis-dao-oracle:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.oracle:ojdbc6:jar:11.2.0.1.0: Failed to read artifact descriptor for com.oracle:ojdbc6:jar:11.2.0.1.0: Could not transfer artifact com.oracle:ojdbc6:pom:11.2.0.1.0 from/to central (http://192.168.1.185:8081/nexus/content/groups/public/): Connect to 192.168.1.185:8081 [/192.168.1.185] failed: Connection refused: connect -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
回复
风火连城 2014-07-23
顶20楼!第一次打开新下载的eclipse,它会自动检测系统配置的jdk,然后将其自身要使用的jre指向安装目录下的jre(注意,是单独的jre,也就是安装jdk最后一步提示你安装的那个,我们一般会将其与jdk安装在同一目录,与jdk目录同级)。作为大部分程序员的开发习惯,一般都会将eclipse的jre重新设置,指向jdk的安装目录,然后eclipse会自动检测jdk下的jre。这次居然忘了设置了,也是失策。
回复
尘土飞一号 2014-07-22
8楼的说法ok,我用的1.6的jdk,按照他的方法ok了
回复
chaorenxx 2014-07-07
引用 18 楼 lk19930118 的回复:
亲,你这个问题解决了没?我也遇到同样的问题了,请教一下
三楼说的可以的,把eclipse中installed JRE改成JDK的目录就行了。
回复
lk19930118 2014-07-04
亲,你这个问题解决了没?我也遇到同样的问题了,请教一下
回复
仦石頭 2014-04-23
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.8:eclipse (default-cli) on project org.opennms.core.tasks: Unable to write to file: F:\Workspace\OpenNMS\Source\opennms\core\tasks\.settings\org.eclipse.jdt.core.prefs -> [Help 1] 大神么,这个怎么解决? 有没有QQ群啊,大家一起解决?
回复
eddie 2014-04-09
引用 15 楼 love121 的回复:
[quote=引用 14 楼 eddie_520 的回复:] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.2:shade (default-cli) on project autoTestingTool: Failed to create shaded artifact, project main artifact does not exist. -> [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/MojoExecutionException 谁能跟我说说怎么回事儿啊?受不鸟了~!
我也遇到这个问题解决不了!!!![/quote] 经过这几天研究,我解决了,两个原因:1,jar包与你手动导入的jar冲突了,其实看你的ide你就能看出来,maven的插件标红了。2,target下的jar包你删除之后再执行,就好了
回复
love121 2014-04-03
引用 14 楼 eddie_520 的回复:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.2:shade (default-cli) on project autoTestingTool: Failed to create shaded artifact, project main artifact does not exist. -> [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/MojoExecutionException 谁能跟我说说怎么回事儿啊?受不鸟了~!
我也遇到这个问题解决不了!!!!
回复
eddie 2014-03-21
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.2:shade (default-cli) on project autoTestingTool: Failed to create shaded artifact, project main artifact does not exist. -> [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/MojoExecutionException 谁能跟我说说怎么回事儿啊?受不鸟了~!
回复
eddie 2014-03-21
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.2:shade (default) on project autoTestingTool: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:2.2:shade for parameter Main-Class: Cannot find 'MainClass' in class org.apache.maven.plugins.shade.resource.ManifestResourceTransformer -> [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/PluginConfigurationException 谁能跟我说说怎么回事儿啊?受不鸟了~!
回复
wyx100 2014-03-13
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project sshe: Compilation failure [ERROR] Failure executing javac, but could not parse the error: [ERROR] javac: invalid target release: 1.7 [ERROR] Usage: javac <options> <source files> [ERROR] use -help for a list of possible options [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]
回复
wyx100 2014-03-10
JDk版本的问题 升级到1.7以上
回复
H-先生 2013-11-04
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:mave
n-android-plugin:2.8.4:generate-sources (default-generate-sources) on project an
droid-quickstart: Execution default-generate-sources of goal com.jayway.maven.pl
ugins.android.generation2:maven-android-plugin:2.8.4:generate-sources failed: In
valid SDK: Platform/API level 7 not available. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio
nException
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.yourcompany.android</groupId>
    <artifactId>android-quickstart</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>apk</packaging>
    <name>android-quickstart</name>

    <dependencies>
        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>android</artifactId>
            <version>2.1.2</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>maven-android-plugin</artifactId>
                <version>2.8.4</version>
                <configuration>
                    <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
                    <assetsDirectory>${project.basedir}/assets</assetsDirectory>
                    <resourceDirectory>${project.basedir}/res</resourceDirectory>
                    <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
                    <sdk>
                        <!-- Platform 8 is Android 2.2 -->
                        <platform>8</platform>
                    </sdk>
                    <deleteConflictingFiles>true</deleteConflictingFiles>
                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
                </configuration>
                <extensions>true</extensions>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
回复
xl_anne 2013-07-25
我run as -->maven install时出现的是下面的问题: [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ FTS --- [INFO] Packaging webapp [INFO] Assembling webapp [FTS] in [F:\Project\Workspaces\eclipse\FTS\target\FTS] [INFO] Processing war project [INFO] Copying webapp resources [F:\Project\Workspaces\eclipse\FTS\src\main\webapp] [INFO] Webapp assembled in [148049 msecs] [INFO] Building war: F:\Project\Workspaces\eclipse\FTS\target\FTS.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7:31.434s [INFO] Finished at: Thu Jul 25 16:54:05 CST 2013 [INFO] Final Memory: 12M/30M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project FTS: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: invalid entry size -> [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/PluginExecutionException 请问有知道是怎么回事的吗?
回复
shadow_walkor 2013-07-16
到reference里指定jre(是jdk的jre)
回复
发帖
Web开发应用服务器
创建于2007-09-28

5567

社区成员

Web开发应用服务器相关讨论专区
申请成为版主
帖子事件
创建了帖子
2012-01-14 01:14
社区公告
暂无公告