标签: m2e

使用maven-clean包时,xml源文件不包含在类路径中

所以看起来Maven包默认设置为编译但不复制java类路径中的xml文件,除非它们已经存在.在Eclipse中,我创建了最简单的测试,一个默认的spring mvc模板应用程序.java源代码中只有两个文件,一个java控制器和一个虚拟xml文件.pom是:

<?xml version="1.0" encoding="UTF-8"?>
<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.test</groupId>
    <artifactId>test</artifactId>
    <name>abc</name>
    <packaging>war</packaging>
    <version>1.0.0-BUILD-SNAPSHOT</version>
    <properties>
        <java-version>1.6</java-version>
        <org.springframework-version>3.0.6.RELEASE</org.springframework-version>
        <org.aspectj-version>1.6.9</org.aspectj-version>
        <org.slf4j-version>1.5.10</org.slf4j-version>
    </properties>
    <dependencies>
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework-version}</version>
            <exclusions>
                <!-- Exclude Commons Logging in favor of SLF4j -->
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                 </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework-version}</version>
        </dependency>

        <!-- AspectJ -->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${org.aspectj-version}</version>
        </dependency>   

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${org.slf4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${org.slf4j-version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency> …
Run Code Online (Sandbox Code Playgroud)

eclipse maven m2e

21
推荐指数
2
解决办法
2万
查看次数

为什么Eclipse在启动运行配置时以"验证启动属性..."状态挂起57%?

在最近从Ant转换为Maven之后,在Eclipse准备启动项目的同时,在Maven之前立即启动的运行配置会占用过多的时间并消耗异常数量的资源.

Eclipse显示此状态消息:

Verifying launch attributes...
Run Code Online (Sandbox Code Playgroud)

完成57%后,Eclipse会在最终启动运行配置之前挂起几分钟.一旦启动,该项目运行良好,没有问题.

我发现这篇博客文章建议清理本地工作区,但这并没有解决问题,特别是考虑到作者正在使用Git而我不是.

我只使用最新的m2e maven插件,最新版本的Eclipse.

是什么导致Eclipse在启动这些运行配置时阻止,以及如何解决它?

java eclipse maven m2e

21
推荐指数
2
解决办法
7815
查看次数

m2e:使用exec-maven-plugin生成代码

我已经使用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一样工作?

java eclipse m2eclipse maven m2e

20
推荐指数
1
解决办法
1万
查看次数

m2e-subclipse连接器在哪里使用svn 1.8.x,subclise 1.10?

我读到m2e的生产商已停止生产m2e连接器,用于超过svn 1.7的任何东西.而底格里斯显然已经采取措施维持m2e-subclipse连接器.

Q1.
我的问题是,使用svn 1.8.x的eclipse更新URL在哪里?

据我所知,svn 1.8.x接口是在subclipse 1.10中实现的.但更新url在哪里更新eclipse以使用m2e和subclipse 1.10?

Q2.
否则,有没有替代在eclipse中使用maven访问svn 1.8.x?

java eclipse subclipse maven m2e

20
推荐指数
2
解决办法
2万
查看次数

无法安装eclipse插件"m2e connector for build-helper-maven-plugin 0.15.0.201109290002"

我只是试着用我的gwt 2.4应用程序从helios转移到maven.所以我开始按照此处的步骤操作:http: //code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven

但在第3步 - 安装功能"m2e连接器为build-helper-maven-plugin"我从Eclipse得到一个错误:

Cannot complete the install because one or more required items could not be found.
  Software being installed: m2e connector for build-helper-maven-plugin     0.15.0.201109290002 (org.sonatype.m2e.buildhelper.feature.feature.group 0.15.0.201109290002)
  Missing requirement: m2e connector for build-helper-maven-plugin 0.15.0.201109290002 (org.sonatype.m2e.buildhelper 0.15.0.201109290002) requires 'bundle org.eclipse.m2e.jdt [1.1.0,1.2.0)' but it could not be found
  Cannot satisfy dependency:
    From: m2e connector for build-helper-maven-plugin 0.15.0.201109290002 (org.sonatype.m2e.buildhelper.feature.feature.group 0.15.0.201109290002)
    To: org.sonatype.m2e.buildhelper [0.15.0.201109290002]
Run Code Online (Sandbox Code Playgroud)

是否有解决方法或我做错了什么?

eclipse gwt maven eclipse-indigo m2e

19
推荐指数
2
解决办法
3万
查看次数

无法为Juno的EGit安装Maven SCM Handler

我通过Help-> Check for updates菜单将我的eclipse indigo更新为juno.我注意到我有更新的egit(2.x)和jgit(2.x)与我当前的安装(1.3.x)发生冲突,所以我删除了所有的egit插件(eigt,jgit,egit-mylyn和Maven SCM Handler对于EGit).然后我尝试安装上面的egit插件,并能够安装egit和jgit但无法安装Maite SCM Handler for EGit.
我尝试更新grvia m2e marketplace并得到以下错误:

由于依赖性冲突,无法完成安装.
正在安装的软件:用于EGit的Maven SCM Handler 0.14.0.201110251725(org.sonatype.m2e.egit.feature.feature.group 0.14.0.201110251725)
当前安装的软件:Eclipse EGit 2.0.0.201206130900-r(org.eclipse.egit.feature. group 2.0.0.201206130900-r)
一次只能安装以下一项:
Git Team Provider Core 2.0.0.201206130900-r(org.eclipse.egit.core 2.0.0.201206130900-r)
Git Team Provider Core(Incubation)0.8. 4(org.eclipse.egit.core 0.8.4)
Git Team Provider Core 1.1.0.201109151100-r(org.eclipse.egit.core 1.1.0.201109151100-r)
Git Team Provider Core 1.3.0.201202151440-r(org.eclipse. egit.core 1.3.0.201202151440-r)
Git Team Provider Core(Incubation)0.11.1(org.eclipse.egit.core 0.11.1)
Git Team Provider Core(Incubation)0.9.1(org.eclipse.egit.core 0.9) .1)
Git Team Provider Core 1.0.0.201106090707-r(org.eclipse.egit.core 1.0.0.201106090707-r)
无法满足依赖性:
来自:Eclipse EGit 2.0.0.201206130900-r(org.eclipse.egit.feature.group 2.0) .0.201206130900 -r)
To:org.eclipse.egit.core [2.0.0.201206130900-r]
无法满足依赖性:
From:Maite SCM …

eclipse egit m2e eclipse-juno

19
推荐指数
2
解决办法
1万
查看次数

Jacoco Maven插件 - 生命周期配置不包含插件执行

我是Maven的新手,想要使用Jacoco Maven插件来构建我的项目.

我已经建立了一个示例项目,其中TestNG是唯一的依赖项.

这是pom.xml的一部分:

<dependencies>
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.8</version>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.6.2.201302030002</version>
            <executions>
                <execution>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>report</id>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

我得到这个错误:

生命周期配置未涵盖的插件执行:org.jacoco:jacoco-maven- plugin:0.6.2.201302030002:prepare-agent(执行:默认,阶段:初始化)

我究竟做错了什么 ?干杯

m2eclipse maven m2e jacoco

19
推荐指数
3
解决办法
3万
查看次数

如何在Eclipse Helios中安装Maven集成插件?

我正在尝试通过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)

eclipse m2eclipse maven m2e

19
推荐指数
2
解决办法
4万
查看次数

ActionBarSherlock + maven + eclipse:在工作区中找不到依赖项

我已经更新到最新版本的ADT插件,我遇到了这个问题,解决了更新m2e-android eclipse插件.现在,我可以通过控制台编译我的项目,但不能用eclipse编译.这是pom.xmleclipse中文件引发的异常:

dependency=[com.actionbarsherlock:library:apklib:4.1.0:compile] not found in workspace

在以前的ADT/m2e-android版本中,我能够毫无问题地构建控制台和eclipse.

有谁知道如何解决这个问题?也许我的pom.xml错了?

谢谢你的时间.


目前使用:

  • Eclipse经典3.7.2(Juno问题仍然存在)
  • ADT 20.0.3
  • m2e-android 0.42
  • android-maven-plugin 3.3.0
  • maven 3.0.4
  • m2e 1.1.0(作为m2e-android 0.42中的依赖项包含)

pom.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<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.jelies</groupId>
    <artifactId>my-project</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>apk</packaging>

    <dependencies>
        <dependency>
            <groupId>android</groupId>
            <artifactId>android</artifactId>
            <version>4.1_r2</version>
            <scope>provided</scope>
        </dependency>

        <!-- some unrelated dependencies -->

        <dependency>
            <groupId>com.actionbarsherlock</groupId>
            <artifactId>library</artifactId>
            <version>4.1.0</version>
            <type>apklib</type>
        </dependency>

    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.4</version> …
Run Code Online (Sandbox Code Playgroud)

eclipse android maven m2e actionbarsherlock

18
推荐指数
1
解决办法
9242
查看次数

org.codehaus.plexus.archiver.jar.Manifest.merge(org.codehaus.plexus.archiver.jar.Manifest)

日食中这个被遗忘的错误不会消亡.我已经尝试了这里和其他地方提到的所有东西来摆脱它,但它不会消失,现在我不能在eclipse中使用web服务实用程序,因为它抱怨这个"问题",这显然不是真的一个问题,但它是m2e,这在很大程度上是有用的.

首先,错误消息,如果你可以调用它,是不是非常有帮助.无论哪个组件产生,你能产生更有意义的东西吗?

无论如何,我已经尝试删除eclipse中的问题,但它们只会回来.我已经重新制作了poms并将maven-ear-plugin的版本更新到2.3.2,但都没有用(严肃的说,这不是试图绕过真正的问题吗?).我已经尝试创建和更新lifecylcle-mapping-metadata.xml文件以忽略org.codehaus.plexus - > plexus-archiver - >清单目标.什么都行不通.

究竟是什么导致了这个消息,以及诊断根本原因然后解决它的正确方法是什么?任何见解都将受到最高度的赞赏.

eclipse pom.xml maven m2e

18
推荐指数
1
解决办法
2万
查看次数