maven,pom.xml里配置了插件,是怎么使用的?

jack_jones 发布于 2014/09/01 22:16
阅读 6K+
收藏 0

初学maven,问个基础问题

pom.xml部分信息

  <build>
    <finalName>TestSpringBoot</finalName>
    <pluginManagement>
 <plugins>
  <plugin>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-maven-plugin</artifactId>
  </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <tasks>
            <echo>Test.....................</echo>
            </tasks>
          </configuration>
        </plugin>
 </plugins>
 </pluginManagement>
  </build>

maven-compiler-plugin插件,应该输出一行信息Test......

应该怎么执行这个插件啊?

我运行了mvn compile,输出

[WARNING] 
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'snapshotPolicy' (position: START_TAG seen ...</layout>\n          <snapshotPolicy>... @262:27)  @ /home/my/.m2/settings.xml, line 262, column 27
[WARNING] 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building TestSpringBoot Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestSpringBoot ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ TestSpringBoot ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.330 s
[INFO] Finished at: 2014-09-01T22:14:30+08:00
[INFO] Final Memory: 9M/144M
[INFO] ------------------------------------------------------------------------


没有test.......,怎么回事

另外,前三行的警告是啥意思

加载中
0
jessehwong
jessehwong
这个插件的 configuration 里并没有 <tasks> 这个配置呀,当然没有 Test 输出啦~你是不是把这插件和 antrun 插件搞混了?
返回顶部
顶部