Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Uninteresting lifecycle phases are built???

Well,

frontend-maven-plugin has the lifecycle-mapping-metadata.xml but to emulate the problem

For example, the test phase should not be taken into account by m2e but it is. You can see it fail on configuration and incremental build.

<?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>org.bitstrings.m2e</groupId>
    <artifactId>m2e-lifecycle-test</artifactId>
    <version>1.0.0-SNAPSHOT</version>

    <packaging>jar</packaging>

    <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-antrun-plugin</artifactId>
                                        <versionRange>[0.0.0,)</versionRange>
                                        <goals>
                                            <goal>run</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnConfiguration>true</runOnConfiguration>
                                            <runOnIncremental>true</runOnIncremental>
                                        </execute>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <echo>COMPILE EXECUTED!</echo>
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <echo>SHOULD NOT BE EXECUTED!</echo>
                                <fail />
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>           
        </plugins>
    </build>

</project>




On 2019-03-16 1:19 a.m., Fred Bricon wrote:
That sounds wrong. Do you have a sample project reproducing this behavior?

On Sat, Mar 16, 2019 at 12:36 AM Pino Silvaggio <pino.silvaggio@xxxxxxxxx> wrote:

Hello people,

I have a situation where I use the "frontend-maven-plugin" (https://github.com/eirslett/frontend-maven-plugin)
and it's binded on different phases depending on the work to be done.

For example, yarn build is on the compile phase and yarn test is on the test phase.

But this is where it gets weird. The yarn test is executed by the m2e in MavenBuilderImpl ???

It takes a very long time since it runs all the unit tests.

Why? This is not an interesting phase for m2e. Furthermore, I have noticed it runs other uninteresting phases
like package,install and deploy.

Can someone explain to me how this is a good behavior?


_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/m2e-dev


--
"Have you tried turning it off and on again" - The IT Crowd
And if that fails, then http://goo.gl/tnBgH5

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/m2e-dev

Attachment: m2e-lifecycle-test.tar.gz
Description: application/gzip


Back to the top