maven中遇到的问题,报错

 

maven中央仓库地址pom.xml配置

<!-- 设定主仓库,按设定顺序进行查找。 -->
<repositories>

<!-- 如有Nexus私服, 取消注释并指向正确的服务器地址.
<repository>
<id>nexus-repos</id>
<name>Team Nexus Repository</name>
<url>http://127.0.0.1:8888/nexus/content/groups/public</url>
</repository> -->

<repository>
            <id>oschina-repos</id>
            <name>Oschina Releases</name>
            <url>http://maven.oschina.net/content/groups/public</url>
        </repository>
        
        <repository>
            <id>java-repos</id>
            <name>Java Repository</name>
            <url>http://download.java.net/maven/2/</url>
        </repository>
        
        <repository>
            <id>springsource-repos</id>
            <name>SpringSource Repository</name>
            <url>http://repo.spring.io/release/</url>
        </repository>
        
<repository>
<id>central-repos</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
</repository>

<repository>
<id>central-repos2</id>
<name>Central Repository 2</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>

<repository>
<id>activiti-repos</id>
<name>Activiti Repository</name>
<url>https://maven.alfresco.com/nexus/content/groups/public</url>
</repository>

<repository>
<id>activiti-repos2</id>
<name>Activiti Repository 2</name>
<url>https://app.camunda.com/nexus/content/groups/public</url>
</repository>

<repository> 
<id>thinkgem-repos</id> 
<name>ThinkGem Repository</name>
<url>http://git.oschina.net/thinkgem/repos/raw/master</url>
</repository>

<repository> 
<id>thinkgem-repos2</id> 
<name>ThinkGem Repository 2</name>
<url>https://raw.github.com/thinkgem/repository/master</url>
</repository>

</repositories>

 

解决Failed to execute goal org.apache.maven.plugins

 

1.Maven构建失败

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ( default -compile) on project oecp: Compilation failure 

 

2.解决方法:

115201_XXuq_1866807.png

 

3.至少我是这么干的:使用自己的jdk

 

 

 

 

[ERROR] 错误: 读取C:\Users\user\.m2\repository\org\springframework\spring-beans\4.0.9.RELEASE\spring-beans-4.0.9.RELEASE.jar时出错; invalid LOC header (bad signature)

[ERROR] 错误: 读取C:\Users\user\.m2\repository\org\springframework\spring-orm\4.0.9.RELEASE\spring-orm-4.0.9.RELEASE.jar时出错; invalid LOC header (bad signature)

[ERROR] 错误: 读取C:\Users\user\.m2\repository\org\springframework\spring-jdbc\4.0.9.RELEASE\spring-jdbc-4.0.9.RELEASE.jar时出错; invalid CEN header (bad signature)

[ERROR] 错误: 读取C:\Users\user\.m2\repository\org\aspectj\aspectjrt\1.7.4\aspectjrt-1.7.4.jar时出错; invalid LOC header (bad signature)

[ERROR] 错误: 读取C:\Users\user\.m2\repository\org\aspectj\aspectjweaver\1.7.4\aspectjweaver-1.7.4.jar时出错; invalid LOC header (bad signature)

[ERROR] 错误: 读取C:\Users\user\.m2\repository\org\mybatis\mybatis\3.2.2\mybatis-3.2.2.jar时出错; invalid LOC header (bad signature)

 

 

maven提示invalid LOC header (bad signature)的解决办法

 

今天执行mvn test的时候提示:

错误:读取 /home/subaochen/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar 时出错;invalid LOC header (bad signature)

解决的办法是把提示的文件删掉让maven重新下载就解决了,或者删除后,pom.xml指定版本为以前存在的版本来使用

 

 

 

 

The method of type must override a superclass method解决方式

he method intercept(Invocation) of type PaginationInterceptor must override a superclass method

 

今天做struts2上传文件的时候出现了这个问题:

 

The method execute() of type UploadAction must override or implement a supertype method


@Override 时出错误:


解决办法是:

一、                                                                     
因为你的Compiler 是jdk1.5,只要把它改为 1.6

方法: 

1. window ->preferences... -> java -> Compiler

2. Compiler compliance level : 6.0

二、 把项目的JRE变成6.0的
项目右键->build path->configure build path->java Compiler(左边那排中) ->在右边的Compiler compliance level 修改版本为6.0                                                                                                                                     

三。 并且检查类名上是否继承了ActionSupport  

 

org.springframework.http.converter.json.MappingJacksonHttpMessageConverter (in EnvironmentClassLoader[web-app:production/webapp/default/auto])

 

maven项目如何生成war文件

 

配置 你的pom.xml文件,在你的overview视窗里 配置 packaging为 war 然后
然后点击 pom.xml右键,run  as 选择 install 或是 package
如果项目没问题,配置没问题
就会在项目的target 的目录里生成 war文件

 

mvn install时报错error;

 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project ik-analyzer: Compilation failure

解决方法:将项目导入eclipse中设置jdk后,在项目中install,不要在目录中直接编译

 

error:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin

到.m2中删除对应目录c

 

 

 

 

 

 

 

 

 

 

 

转载于:https://my.oschina.net/iioschina/blog/778473

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值