Artefact n'a pas encore été empaqueté - maven-dependency-plugin

Quand je construire un multi module maven du projet(à l'aide de mvn clean compile) où une dépendance(partie de la construction du réacteur) est copié dans un autre à l'aide de la dépendance:copier, puis maven se plaint avec l'erreur ci-dessous.

Artifact has not been packaged yet. When used on reactor artifact, copy should be executed after packaging: see MDEP-187 is thrown

Ce qui est parfaitement correct, Maven ne pouvez pas copier les dépendants pot car il n'a pas été encore empaqueté et de la dépendance doit être résolue dans le projet local, et non à partir du référentiel.

Permet de dire que le projet est copié dans le projet B à l'aide de la dépendance:copie de l'objectif.

Maintenant, si je peux importer les projets dans eclipse,avec le cycle de vie de la cartographie établie d'une manière telle que le maven-jar-plugin est exécuté sur Un projet(ce qui signifie que A est emballé), toujours le projet B se plaint avec la même erreur. Comment puis-je me débarrasser de cette.Je ne peux pas ignorer la dépendance:copie de la m2e cycle de vie comme c'est une phase cruciale dans la construction.

ProjectA pom du fichier :

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>projecta</artifactId>
    <packaging>jar</packaging>

    <parent>
        <groupId>com.coderplus.tests</groupId>
        <artifactId>projectparent</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-jar-plugin</artifactId>
                                        <versionRange>[2.4,)</versionRange>
                                        <goals>
                                            <goal>jar</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

Projet B pom du fichier

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>projectb</artifactId>
    <packaging>jar</packaging>


    <parent>
        <groupId>com.coderplus.tests</groupId>
        <artifactId>projectparent</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <execution>
                        <id>copy-plugins</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>projecta</artifactId>
                                    <version>${project.version}</version>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/classes/jars</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <versionRange>[2.8,)</versionRange>
                                        <goals>
                                            <goal>copy-dependecies</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute/>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

et le Parent pom habillage, ces 2 modules

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.coderplus.tests</groupId>
    <artifactId>projectparent</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <modules>
        <module>projecta</module>
        <module>projectb</module>
    </modules>
</project>

J'ai besoin d'un Projetb pot pour contenir ProjectA du pot dans le pots répertoire(Cela est requis par une classe personnalisée-chargeur cadre d'un home-grown cadre)

source d'informationauteur coderplus