David
David

Reputation: 14953

Why won't maven-antrun-plugin run?

I'm having trouble getting the antrun plugin to run.

I have this configuration in my pom:

<project>
    ...
    <build>
        ...
        <plugins>       
            ...
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals><goal>run</goal></goals>
                        <configuration>
                            <target>
                                <echo message="Hello, maven"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

When I run mvn:compile it runs but all I see in the logs about the antrun plugin is this:

[INFO] --- maven-antrun-plugin:1.4:run (default) @ datasite-cms ---
project.artifactId
[INFO] Executing tasks
[INFO] Executed tasks

Why isn't the plugin actually doing anything?

Upvotes: 0

Views: 3659

Answers (1)

khmarbaise
khmarbaise

Reputation: 97349

Please use an uptodate version of the maven-antrun-plugin if you really need to use maven-antrun-plugin.

The older versions have using the configuration tag: tasks instead of target. But stop using such ancient versions of Maven plugins.

Upvotes: 3

Related Questions