SORU
2 Ocak 2012, PAZARTESİ


maven bağımlılık-eklentisi (gol "kopyala-bağımlılıklar", "açmak") m2e tarafından desteklenmiyor

Oldukça basit bir Maven projesi var:

<project>
    <dependencies>
        ...
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
                        </configuration>    
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Ancak, m2eclipse aşağıdaki hatayı alıyorum:

Description Resource    Path    Location    Type
maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e. pom.xml  /jasperreports-test line 60 Maven Project Build Lifecycle Mapping Problem

Neden m2eclipse değil eğer umrunda ben "destek" bu görev? Maven mı, umursadığım tek şey bu. Nasıl projemde bu hata gitmesini alabilir miyim?

CEVAP
6 Ocak 2012, Cuma


Bilinen bir sorun gibi görünüyor. Bu görmezden m2e söyleyin.

Seçenek 1: pom.xml

<build/> etiket içinde: aşağıdaki ekleyin

<pluginManagement>
<plugins>
    <!-- Ignore/Execute plugin execution -->
    <plugin>
        <groupId>org.eclipse.m2e</groupId>
        <artifactId>lifecycle-mapping</artifactId>
        <version>1.0.0</version>
        <configuration>
            <lifecycleMappingMetadata>
                <pluginExecutions>
                    <!-- copy-dependency plugin -->
                    <pluginExecution>
                        <pluginExecutionFilter>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <versionRange>[1.0.0,)</versionRange>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                        </pluginExecutionFilter>
                        <action>
                            <ignore />
                        </action>
                    </pluginExecution>
                </pluginExecutions>
            </lifecycleMappingMetadata>
        </configuration>
    </plugin>
   </plugins></pluginManagement>

Maven yapmak gerekir... ->Bu proje üzerinde Proje Yapılandırma güncelleştirme.

Daha fazla okuma: http://wiki.eclipse.org/M2E_plugin_execution_not_covered#m2e_maven_plugin_coverage_status

Seçenek 2: Küresel Tutulması Geçersiz Kılar

POM dosyalarınızı değiştirme önlemek için, aygıtı Eclipse ayarları ile tüm çalışma alanı için uygulanabilir görmezden.

Bu diskte bir yere kaydedin: https://gist.github.com/maksimov/8906462

Eclipse/Preferences/Maven/Lifecycle Mappings Bu dosya ve TAMAM ' ı tıklatın:

Eclipse Settings

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Bokeh

    Bokeh

    9 HAZİRAN 2014
  • Gimpology.com Video Tutorials

    Gimpology.co

    3 ŞUBAT 2008
  • Hey Nadine

    Hey Nadine

    24 Kasım 2006