Maven fails to parse POMs at jenkins

在进行构建时出现以下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Started by user anonymous
Building in workspace /Users/Melon/.jenkins/jobs/first/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://git.coding.net/melongit/jdbcCoreframework.git # timeout=10
Fetching upstream changes from https://git.coding.net/melongit/jdbcCoreframework.git
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.username melongit # timeout=10
> git config --local credential.helper store --file=/Users/Melon/Documents/Tomcat7/temp/git2101628945155958281.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress https://git.coding.net/melongit/jdbcCoreframework.git +refs/heads/*:refs/remotes/origin/*
> git config --local --remove-section credential # timeout=10
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 0bd218173e74065806712e4dd656c911fc1e26bf (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0bd218173e74065806712e4dd656c911fc1e26bf
> git rev-list 0bd218173e74065806712e4dd656c911fc1e26bf # timeout=10
Parsing POMs
ERROR: Failed to parse POMs
hudson.maven.MavenEmbedderException: 1 problem was encountered while building the effective settings
[FATAL] Non-readable settings /Users/Melon/.m2: /Users/Melon/.m2 (Is a directory) @ /Users/Melon/.m2
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:128)
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:109)
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:136)
at hudson.maven.MavenUtil.createEmbedder(MavenUtil.java:212)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1285)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1088)
at hudson.FilePath.act(FilePath.java:991)
at hudson.FilePath.act(FilePath.java:969)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:950)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:677)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.maven.MavenEmbedderException: 1 problem was encountered while building the effective settings
[FATAL] Non-readable settings /Users/Melon/.m2: /Users/Melon/.m2 (Is a directory) @ /Users/Melon/.m2
at hudson.maven.MavenEmbedder.getSettings(MavenEmbedder.java:261)
at hudson.maven.MavenEmbedder.buildMavenExecutionRequest(MavenEmbedder.java:157)
at hudson.maven.MavenEmbedder.<init>(MavenEmbedder.java:120)
... 14 more
Caused by: org.apache.maven.settings.building.SettingsBuildingException: 1 problem was encountered while building the effective settings
[FATAL] Non-readable settings /Users/Melon/.m2: /Users/Melon/.m2 (Is a directory) @ /Users/Melon/.m2
at org.apache.maven.settings.building.DefaultSettingsBuilder.build(DefaultSettingsBuilder.java:116)
at hudson.maven.MavenEmbedder.getSettings(MavenEmbedder.java:259)
... 16 more
Finished: FAILURE

Mehr lesen

Hibernate Validator

Hibernate Validator是JSR-303的一个实现。在FormBean里添加Hibernate Validator的注解,与定义一个校验类的做法相比。注解更加简洁、灵活。

注解说明

Bean Validation 中内置的 constraint

Mehr lesen

去除Spring @ResponseBody产生的大量Accept-Charset

Spring MVC使用@ResponseBody后会产生很大的响应头(Accept-Charset会达到4K+),原因在于默认情况下StringHttpMessageConverter.writeInternal()会将所有可用字符集回写到response响应头中:

Mehr lesen

Java集合使用Tips

1.数组转ArrayList

ArrayList<String> arrayList = new ArrayList<String>(Arrays.asList(arr));

Mehr lesen

CentOS 6.5 kernel至3.10

  1. rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

Mehr lesen

自定义Maven Archetype来快速搭建自己的项目结构

自定义Maven Archetype主要是使用命令archetype:create-from-project来快速生成archetype

1.首先使用eclipse创建一个maven项目

比如选择org.apache.maven.archetypes:maven-archetype-webapp为原型,然后添加groupId和artifactId信息后点finish创建项目。

Mehr lesen

AES对Restful接口进行简单的数据校验之移动篇(iOS&Android)

随着Restful的普及,越来越多的项目开始使用这种形式来进行接口的编写。Restful本身是无状态的,所以我们要对接口进行一些安全的校验,这可以从两个维度来考虑这个问题,1.防止接口数据被恶意重刷造成资源和数据的浪费 2.对用户进行权限校验来防止数据被恶心篡改

1.首先来说第一种情况: (主要是防止重放攻击)

Mehr lesen

Shiro

Keywords:Subject、SecurityManager、Realm

依赖关系

    Mehr lesen

    在Spring+FreeMarker中使用Shiro的Tag标签

    目前Freemarker对Shrio的标签还不支持,不过已经有人贡献出来第三方面解决方案,如下:

    1、下载shiro-freemarker-tags

    GitHub地址:https://github.com/jagregory/shiro-freemarker-tags
    可以先看一下他的说明文档,有一个初步的了解。

    Mehr lesen

    一些开源项目推荐

    早上打开邮件就受到了开源中国的邮件,是一个目前互联网公司开源项目的导航页 http://www.oschina.net/company , 去里面把所有的开源项目都大致看了下,找到了几个我比较感兴趣的,在这儿mark下。

      Mehr lesen