maven常见问题解决

问题1:导入项目提示  Cannot change version of project facet Dynamic Web Module to 2.5linux


解决方案:web

     在工程目录下有一个.settings文件夹,打开org.eclipse.wst.common.project.facet.core.xml,作以下修改:apache

     将这一行的version改成2.5 就能够了 <installed facet="jst.web" version="2.5"/>windows



问题2: “Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误eclipse


解决方案:maven

    eclipse maven   ide

    在项目的pom.xml的<build></build>标签中加入:   ui

        <plugins>  spa

            <plugin>  xml

                <groupId>org.apache.maven.plugins</groupId>  

                <artifactId>maven-compiler-plugin</artifactId>  

                <version>2.3.2</version>  

                <configuration>  

                    <source>1.6</source>  

                    <target>1.6</target>  

                </configuration>  

            </plugin>  

        </plugins>  

  

保存,项目构建完成后在项目文件夹上点右键,选择Maven->Update Project Configuration,问题解决。


问题3:导入项目报Maven error “Failure to transfer…”

解决方案:删除掉全部下载失败的包

linux:

find ~/.m2  -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;

windows:

cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i
相关文章
相关标签/搜索