2016-05-03 4 views
0

Ich habe eine Feder mvc project.but Eclipse sts zeigt eine error.this Fehler zeigt für jedes Projekt, das ich erstelle. screenshotSpring Tool Suite Plugin Ausführung nicht abgedeckt Fehler

Fehler zeigt in diesem Tag von pom.xml

<plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>2.5.1</version> 
       <configuration> 
        <source>1.6</source> 
        <target>1.6</target> 
        <compilerArgument>-Xlint:all</compilerArgument> 
        <showWarnings>true</showWarnings> 
        <showDeprecation>true</showDeprecation> 
       </configuration> 
      </plugin> 

hier der Fehler ist. see image for clarify

Plugin execution not covered by lifecycle configuration: 
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile) 

CoreException: Could not calculate build plan: Plugin 

org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies 
could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: 
ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven- 
-plugin:pom:2.5.1 from https://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. Original error: Could not transfer 
artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to 
central (https://repo.maven.apache.org/maven2): Network is unreachable: connect 

Ich bin neu in beiden M. und maven.i'm nicht sicher ist, diese relevent zu sts oder maven.i versucht, einige so similler Frage, aber die sind auf andere Sache im Zusammenhang .however dieser Fehler immer noch coming.can Sie mir helfen, diesen Fehler zu beheben

Antwort

1

Achten Sie darauf, wie diese das Plugin-Label zwischen Build-Label zu setzen:

<build> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-compiler-plugin</artifactId> 
    <version>2.5.1</version> 
    <configuration> 
     <source>1.6</source> 
     <target>1.6</target> 
     <compilerArgument>-Xlint:all</compilerArgument> 
     <showWarnings>true</showWarnings> 
     <showDeprecation>true</showDeprecation> 
    </configuration> 
</build> 

, wenn Sie es so setzen und das Problem bleibt, so ist es offenbar eine Verbindung Problem. Stellen Sie sicher, dass Sie eine Internetverbindung haben oder wenn Sie sich hinter einem Proxy befinden, konfigurieren Sie setting.xml im m2-Verzeichnis wie folgt:

<proxies> 
    <proxy> 
     <active>true</active> 
     <protocol>http</protocol> 
      <username>user</username> 
     <password>password</password> 
     <host>200.55.156.179(for example)</host> 
     <port>3128(for example)</port> 
     </proxy> 

</proxies> 
Verwandte Themen