Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] newbe - basic m2e ant integration problem

Hi,
I am attempting to use ant to participate in to the eclipse build and I cant seem to get it working.

I expect to have ant in several phases some inrelated to eclipse and some co-operating

With the pom below I get no interaction.
I have read http://wiki.eclipse.org/M2E_plugin_execution_not_covered and I tbelieve that it is configured corerectly, but I must be missing something

I have tried with eclipse 3.7 and 4.2, and latest m2e


<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>mike</groupId>
  <artifactId>mike</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>mike</name>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>

                <executions>
                    <execution>
                        <id>ant-build</id>
                        <phase>process-resources</phase>
                        <configuration>
                            <target>
                                <echo message="process-resources 1 "/>
                                <echo message="process-resources 1 " file="${project.build.directory}/target/process-resources.txt"/>
                            </target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>ant-build</id>
                        <phase>compile</phase>
                        <configuration>
                            <target>
                                <echo message="compile 1 "/>
                                <echo message="compile 1 " file="${project.build.directory}/target/compile.txt"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant</artifactId>
                        <version>1.8.2</version>
                    </dependency>
                </dependencies>
            </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-antrun-plugin</artifactId>
                                        <versionRange>[1,7,)</versionRange>
                                        <goals>
                                            <goal>run</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnIncremental>true</runOnIncremental>
                                            <runOnConfiguration>true</runOnConfiguration>
                                        </execute>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

</project>


Back to the top