maven中央仓库地址pom.xml配置 java
<!-- 设定主仓库,按设定顺序进行查找。 -->
<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>git
1.Maven构建失败github
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ( default -compile) on project oecp: Compilation failure web
2.解决方法:spring
3.至少我是这么干的:使用本身的jdkapache
[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)json
[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)api
[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)mybatis
[ERROR] 错误: 读取C:\Users\user\.m2\repository\org\mybatis\mybatis\3.2.2\mybatis-3.2.2.jar时出错; 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指定版本为之前存在的版原本使用
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 时出错误:
解决办法是:
1、
由于你的Compiler 是jdk1.5,只要把它改成 1.6
方法:
1. window ->preferences... -> java -> Compiler
2. Compiler compliance level : 6.0
2、 把项目的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])
配置 你的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