且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

maven3 - maven-antrun-plugin - “无法创建任务或类型,如果”

更新时间:2022-06-15 21:46:33

1)在目标部分的ant任务之前添加此行:

1) Add this line before ant tasks in target section:

<taskdef resource="net/sf/antcontrib/antlib.xml" 
 classpathref="maven.plugin.classpath" />

2)将完全以下依赖项添加到插件中:

2) Add exactly the following dependencies to plugin:

                        <dependencies>
                        <dependency>
                            <groupId>ant-contrib</groupId>
                            <artifactId>ant-contrib</artifactId>
                            <version>1.0b3</version>
                            <exclusions>
                                <exclusion>
                                    <groupId>ant</groupId>
                                    <artifactId>ant</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.ant</groupId>
                            <artifactId>ant-nodeps</artifactId>
                            <version>1.8.1</version>
                        </dependency>
                    </dependencies>