Spring mvc template project maven plugin bug

In my eclipse, I created a new project as a project New → Other-> Spring → Spring Template Project → Spring MVC.

In pom, I get below error:

A few annotations found on this line: - The execution of the plugin does not extend to the configuration of the life cycle: org.apache.maven.plugins: maven-compiler-plugin: 2.5.1: compile (execution: default- compilation, phase: compilation) - CoreException : failed to calculate assembly plan: plugin org.apache.maven.plugins: maven-compiler-plugin: 2.5.1 or one of its dependencies could not be resolved: could not read the artifact descriptor for org.apache.maven.plugins: maven- compiler-plugin: jar: 2.5.1: ArtifactResolutionException: failure to transfer org.apache.maven.plugins: maven-compiler-plugin: pom: 2.5.1 from
repo.maven.apache.org/maven2 has been cached in the local repository, the permission will not be retried until the refresh interval of the central item has expired or is not forced to be updated. Original error: Unable to transfer artifact to org.apache.maven.plugins: maven- compiler-plugin: pom: 2.5.1 from / to central repo.maven.apache.org/maven2): null for repo.maven.apache.org / maven2 / org / apache / maven / plugins / Maven-compiler plugin / 2.5.1 / Maven-compiler-plugin-2.5.1.pom - The execution of the plugin does not extend to the life cycle configuration: org.apache.maven.plugins: maven -compiler-plugin: 2.5.1: testCompile (execution: default- testCompile, phase: test compilation) - CoreException: failed to calculate assembly plan: plugin org.apache.maven.plugins: maven-compiler-plugin: 2.5.1 or one of its dependencies could not be resolved: could not read the descriptor artifact for org.apache.maven.plugins: maven-compiler-plugin: jar: 2.5.1: ArtifactResolutionException: failed to transfer artifact org.apache.maven.plugins: maven-compiler-plugin: pom: 2.5.1 from / to central (repo.maven.apache.org/maven2): null repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.5.1/maven-compiler-plugin-2.5. 1.pom

I deleted the repository folder and Maven -> Update Project. But nothing happened.

The error appears in the tag below:

<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> 
+4
source share
4 answers

I found that the problem is setting settings.xml

when I connected to the network of my company and updated the settings.xml parameters for my company repository, then it works. May I ask what is the default setting for tags, in which case I can make my sample application (not a single company works?). In my settings.xml, I updated the following tags:

 <server> <id>myID</id> <username>myuser</username> <password>myPassword</password> </server> <mirrors> <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> </mirrors> <profile> <id>nexus</id> <repositories> <repository> <id>central</id> <url>http://central</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> 

What is the configuration of the above tags to run / create a web application?

0
source

If anyone else has this problem, this was resolved in my case by choosing Maven -> Update Project

+11
source

I ran into the same problem. I have many corporate projects, and we have our own internal maven repo and settings.xml.

But when I wanted to create a common project, it threw me these errors. I work on Mac, so in eclipse> preferences> maven> User Settings I changed the path to point to / usr / local / apache -maven / apache-maven-3.2.1 / conf / settings.xml which is global pointing to ~ / .m2 / settings.xml, which is our local company.

Change the settings and right-click on the project and do "Maven → Update Project"

Hope this helps

+1
source

It worked by updating the project: Right-click on the project -> Maven ->

0
source

All Articles