每次我在eclipse中更改我的pom.xml时都会收到错误消息.
Build errors for myapp; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project web: Compilation failure
Unable to locate the Javac Compiler in:
C:\Program Files (x86)\Java\jre6\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable
Run Code Online (Sandbox Code Playgroud)
我已经设置了JAVA_HOME环境变量.它是:JAVA_HOME = D:\ Java\jdk1.6.0_23
谢谢.
我正在使用Eclipse Luna.我正在做一个Maven项目.当我尝试在weblogic的应用程序服务器上运行我的应用程序时,抛出异常并显示以下消息:
weblogic.application.ModuleException: [HTTP:101027][WebAppModule(_auto_generated_ear_:MyAppName)] Document root: "D:\MGelbana\workspace\my-app-name\target\m2e-wtp\web-resources" does not exist.
Run Code Online (Sandbox Code Playgroud)
我查看了项目的部署程序集配置,发现以下错误消息: Cannot find entry: "/target/m2e-wtp/web-resources"

所以我认为Luna的默认Maven安装不是我需要卸载的,我从这个URL安装了M2E-WTP(http://download.eclipse.org/m2e-wtp/releases/luna/)但我相信我最终得到了相同的版本和相同的选项.
据我所知,这个插件可以选择生成这个文件夹/target/m2e-wtp/web-resources,帮助Eclipse将应用程序部署到应用程序服务器中(Run on server选项)
(这是我的最终目标,但是我遇到了使用它所需的依赖项来部署应用程序的问题.如果我通过
Installmaven项目生成应用程序的WAR文件并手动部署生成的WAR,那么应用程序可以工作,但我需要能够使用Eclipse在应用程序服务器上调试\运行它.)
但是/target/m2e-wtp/web-resources没有创建这个文件夹(即)!
在Eclipse中 Maven > Java EE Integration > WAR project preferences > Maven archiver generated files under the build directory (I checked this option)
在特定于项目的选项中,我只有一个Maven菜单和一个生命周期映射子菜单,与maven归档文件生成文件无关!
那么如何指导maven输出WTP相关文件呢?

我试图在eclipse m2e插件中搜索maven install和maven build之间的差异(如果你右击项目然后点击"run as",你会看到它们),我仍然找不到它们的好解释(我看了一下官方文件).有人可以帮忙吗?从我目前的理解:
此外,当您在线检出存储库时,您是否经常进行maven安装(安装所有内容,包括依赖项)以运行代码?
我有一个eclipse项目结构,看起来像这样:
eclipse
project a
project b
Run Code Online (Sandbox Code Playgroud)
所有这些项目都是Maven项目.项目B是Eclipse WTP项目,包含项目A作为依赖项.我正在使用m2eclipse插件.
当我将Project B部署到Tomcat(全部来自Eclipse中)时,它总是抛出错误,说它无法从Project A中找到类.我可以解决这个问题的唯一方法是在Eclipse中关闭 Project A并执行mvn install命令,所以在这一点上,项目A被视为任何其他依赖项.
我希望不必再次重新打开,然后每当我对其进行更改时关闭项目A(这在此阶段经常发生).
我已经尝试将Project A添加到Project B的Build Path中,但是这似乎并没有成功.同样,它只有在我在eclipse中关闭项目时才有效,所以它被视为普通的maven依赖.
仅供参考我正在使用Helios版Eclipse.项目B是一个Spring项目,所以Tomcat在导入所有bean等时自然会失败.
有没有人有什么建议?非常感谢.
我正在尝试Install New Software使用sonatype链接通过菜单nad 为Eclipse(Galileo)安装Maven集成
并得到以下错误:
无法完成安装,因为找不到一个或多个必需的项目.
正在安装软件:Maven的集成为Eclipse(必填)0.12.0.20101115-1102(org.maven.ide.eclipse.feature.feature.group 0.12.0.20101115-1102)
缺少要求:Maven的集成为Eclipse(必填)0.12.0.20101115- 1102
(org.maven.ide.eclipse.feature.feature.group 0.12.0.20101115-1102)要求"org.eclipse.emf.ecore.edit 0.0.0",但未能找到
试图搜索丢失的捆绑.但没有成功.:(
有帮助吗?
在我的新项目中,我无法在项目属性中看到Deployment Assembly链接.在我的其他项目中,以相同的方式配置(据我所见).
我在facets中有动态web模块和java.我安装了m2eclipse并调用了菜单选项"更新项目配置".我正在运行eclipse 3.7 EE版.我也有谷歌eclipse插件.
我想知道的是如何显示部署程序集选项,以便我可以配置通过WTP将哪些资源推送到本地服务器.
我的.project文件:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>shortbread</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
</natures>
</projectDescription>
Run Code Online (Sandbox Code Playgroud) 我使用M2e + Eclipse + Maven,我想知道它们之间的区别:
任何人都可以建议吗?
我已经使用m2eclipse 2年左右,现在已经切换到m2e.
不幸的是,这已经破坏了我的一些功能.
在许多项目中,我生成了Java代码,通常是通过库项目中的主类生成的.这是一个典型的设置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>generateDTOs</id>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<classpathScope>test</classpathScope>
<mainClass>com.somecompany.SomeCodeGenerator</mainClass>
<arguments>
<argument>${project.build.directory}/generated-sources/foo</argument>
<argument>${project.basedir}/path/to/a/config/file</argument>
<argument>more arguments</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>addDtoSourceFolder</id>
<goals>
<goal>add-source</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/foo</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
以前,我只需要使用eclipse作为maven项目导入该项目,代码将自动执行并将源文件夹添加到eclipse项目中.
现在,m2e已经为buildhelper插件安装了一个"连接器",因此创建了源文件夹,但我必须通过执行手动触发代码生成Run As > Maven > generate-sources.这真的很烦人,我想maven构建响应pom.xml更改Project > Clean ...,SVN更新,Eclipse启动等,就像以前一样.
我能做些什么让m2e像m2eclipse一样工作?
我正在尝试使用Eclipse Indigo和Tomcat服务器建立一个基本的hello world项目.我用一个简单的servlet创建了一个动态项目.测试了servlet并且工作正常.然后我启用了Maven支持并添加了logback到我的pom.我在servlet的doGet方法中放了一个日志语句.当运行servlet时,它抱怨它找不到任何绑定,因为没有将logback jar复制到Eclipse tomcat实例中.我希望在这里的某处发现罐子:
${workspace}\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\
如何让Eclipse正常使用WTP/Maven?我也试过安装m2e-wtp连接器没有区别.
我正在尝试通过Marketplace在Eclipse Helios中安装Maven集成插件,但我收到"无法满足依赖"错误:
Cannot complete the install because one or more required items could not be found.
Software being installed: m2e - Maven Integration for Eclipse 1.4.0.20130601-0317 (org.eclipse.m2e.feature.feature.group 1.4.0.20130601-0317)
Missing requirement: async-http-client 1.6.5.20130531-2315 (com.ning.async-http-client 1.6.5.20130531-2315) requires 'package org.slf4j 1.6.2' but it could not be found
Cannot satisfy dependency:
From: Maven Archetype Common Bundle 1.4.0.20130531-2315 (org.eclipse.m2e.archetype.common 1.4.0.20130531-2315)
To: bundle org.eclipse.m2e.maven.runtime [1.4.0,1.5.0)
Cannot satisfy dependency:
From: m2e - Maven Integration for Eclipse 1.4.0.20130601-0317 (org.eclipse.m2e.feature.feature.group 1.4.0.20130601-0317)
To: org.eclipse.m2e.archetype.common [1.4.0.20130531-2315]
Cannot satisfy dependency:
From: Embedded …Run Code Online (Sandbox Code Playgroud) m2eclipse ×10
maven ×9
eclipse ×8
java ×5
m2e ×4
tomcat ×2
eclipse-wtp ×1
m2e-wtp ×1
maven-3 ×1
maven-plugin ×1