Aristotle
发布于 2023-03-18 / 19 阅读 / 0 评论 / 0 点赞

maven查看变量和有效的pom

maven查看变量和有效的pom

maven 打印变量${project.build.finalName}

mvn help:evaluate -Dexpression=project.build.finalName

mvn help:effective-pom maven查看有效的pom

 <!--变量打印插件 mvn antrun:run-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <target>
                        <echo message="hello ant, from Maven!" />
                        <echo>Maybe this will work?</echo>
                        <echo>${project.build.directory}</echo>
                    </target>
                </configuration>
            </plugin>
mvn antrun:run