持续集成 Eclipse 中应用 maven 时,POM 中的文件总是提示出错!!!求解答!

夏之岚 · 2015年06月23日 · 最后由 hello 回复于 2017年02月17日 · 1307 次阅读

Eclipse 中应用 maven 构建 java 工程

POM.XML
<!-- 制定属性 -->>
  <properties>
          <juint.version>3.8.1</juint.version>
          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
          <jdk.version>1.8.0_40</jdk.version>
  </properties>
  <build>
      <plugins>
          <!-- 制定JDK编译版本 -->
          <plugin>     //此处出现错误
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>3.3.3</version>
              <configuration>
                  <source>${jdk.version}</source>
                  <target>${jdk.version}</target>
                  <showWarnings>true</showWarnings>
              </configuration>            
          </plugin>
      </plugins>
  </build>>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


错误提示:
Multiple annotations found at this line:
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-
compiler-plugin:3.3.3:compile (execution: default-compile, phase: compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-
compiler-plugin:3.3.3:testCompile (execution: default-testCompile, phase: test-compile)
- CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-
compiler-plugin:3.3.3 or one of its dependencies could not be resolved: Failure to find
org.apache.maven.plugins:maven-compiler-plugin:jar:3.3.3 in http://repo.maven.apache.org/maven2
was cached in the local repository, resolution will not be reattempted until the update interval of
central has elapsed or updates are forced

共收到 4 条回复 时间 点赞

updates are forced 强制更新

怎么强制更新啊?更新什么东西啊?

#2 楼 @test20150331

-U,--update-snapshots                  Forces a check for missing
                                        releases and updated snapshots on
                                        remote repositories

这个问题解决了没?

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册