Skip to content

Commit 28e7ce0

Browse files
committed
Initial
0 parents  commit 28e7ce0

File tree

20 files changed

+1097
-0
lines changed

20 files changed

+1097
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.classpath
2+
.project
3+
.settings
4+
generated-src
5+
build
6+
target
7+
bin
8+
temp
9+
.gradle

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
sudo: false
2+
language: java
3+
jdk:
4+
- oraclejdk8
5+
- oraclejdk7
6+
script:
7+
- ./build.sh
8+
after_script:
9+
- find -name TEST* -exec cat {} \;
10+
notifications:
11+
email: false

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
# Changelog
3+
## Unreleased
4+
### No issue
5+
**Initial**
6+
[ac4bb0a4224cc39](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/ac4bb0a4224cc39) Tomas Bjerre *2016-07-26 09:21:47*
7+

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Violation Comments to Bitbucket Server Lib [![Build Status](https://travis-ci.org/tomasbjerre/violation-comments-to-bitbucket-server-lib.svg?branch=master)](https://travis-ci.org/tomasbjerre/violation-comments-to-bitbucket-server-lib) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/se.bjurr.violations/violation-comments-to-bitbucket-server-lib/badge.svg)](https://maven-badges.herokuapp.com/maven-central/se.bjurr.violations/violation-comments-to-bitbucket-server-lib)
2+
3+
This is a library that adds violation comments from static code analysis to Bitbucket Server.
4+
5+
It uses [Violation Comments Lib](https://github.com/tomasbjerre/violation-comments-lib) and supports the same formats as [Violations Lib](https://github.com/tomasbjerre/violations-lib).
6+
7+
Very easy to use with a nice builder pattern
8+
```
9+
violationCommentsToBitbucketServerApi() //
10+
.withViolations(".*/findbugs/.*\\.xml$", FINDBUGS, rootFolder) //
11+
.withViolations(".*/checkstyle/.*\\.xml$", CHECKSTYLE, rootFolder) //
12+
.withUsername("username")
13+
.withPassword("password")
14+
.withProjectKey("projectKey")
15+
.withRepoSlug("repoSlug")
16+
.withPullRequestId("pullRequestId")
17+
.toPullRequest();
18+
```
19+
20+
## Usage
21+
This software can be used:
22+
* With a [Jenkins plugin](https://github.com/jenkinsci/violation-comments-to-stash-plugin).
23+
24+
## Developer instructions
25+
26+
To build the code, have a look at `.travis.yml`.
27+
28+
To do a release you need to do `./gradlew release` and release the artifact from [staging](https://oss.sonatype.org/#stagingRepositories). More information [here](http://central.sonatype.org/pages/releasing-the-deployment.html).

build.gradle

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
buildscript {
2+
repositories {
3+
jcenter()
4+
maven {
5+
url "https://plugins.gradle.org/m2/"
6+
}
7+
}
8+
dependencies {
9+
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
10+
classpath 'net.researchgate:gradle-release:2.2.2'
11+
classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.36"
12+
}
13+
}
14+
15+
apply plugin: 'java'
16+
apply plugin: 'maven'
17+
apply plugin: 'eclipse'
18+
apply plugin: 'signing'
19+
apply plugin: 'com.bmuschko.nexus'
20+
apply plugin: 'net.researchgate.release'
21+
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
22+
23+
task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
24+
filePath = "CHANGELOG.md";
25+
templateContent = """
26+
# Changelog
27+
{{#tags}}
28+
## {{name}}
29+
{{#issues}}
30+
{{#hasIssue}}
31+
{{#hasLink}}
32+
### {{name}} [{{issue}}]({{link}}) {{title}}
33+
{{/hasLink}}
34+
{{^hasLink}}
35+
### {{name}} {{issue}} {{title}}
36+
{{/hasLink}}
37+
{{/hasIssue}}
38+
{{^hasIssue}}
39+
### {{name}}
40+
{{/hasIssue}}
41+
{{#commits}}
42+
**{{{messageTitle}}}**
43+
{{#messageBodyItems}}
44+
* {{.}}
45+
{{/messageBodyItems}}
46+
[{{hash}}](https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/commit/{{hash}}) {{authorName}} *{{commitTime}}*
47+
{{/commits}}
48+
{{/issues}}
49+
{{/tags}}
50+
""";
51+
removeIssueFromMessage = true
52+
}
53+
54+
group = 'se.bjurr.violations'
55+
56+
sourceCompatibility = 1.7
57+
targetCompatibility = 1.7
58+
59+
repositories {
60+
jcenter()
61+
mavenLocal()
62+
mavenCentral()
63+
}
64+
65+
dependencies {
66+
compile 'se.bjurr.violations:violation-comments-lib:1.10'
67+
compile 'com.jayway.jsonpath:json-path:2.0.0'
68+
69+
testCompile 'junit:junit:4.12'
70+
testCompile 'org.assertj:assertj-core:2.3.0'
71+
testCompile ('org.assertj:assertj-core:2.5.0')
72+
}
73+
74+
eclipse {
75+
classpath {
76+
downloadSources = true
77+
downloadJavadoc = true
78+
}
79+
}
80+
81+
sourceSets {
82+
main.java.srcDirs = ['src/main/java' ]
83+
test.java.srcDirs = ['src/test/java' ]
84+
}
85+
86+
if (JavaVersion.current().isJava8Compatible()) {
87+
allprojects {
88+
tasks.withType(Javadoc) {
89+
options.addStringOption('Xdoclint:none', '-quiet')
90+
}
91+
}
92+
}
93+
94+
modifyPom {
95+
project {
96+
name 'Violation Comments to Bitbucket Server Lib'
97+
description 'Library that adds violation comments from static code analysis to Bitbucket Server.'
98+
url 'https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib'
99+
inceptionYear '2016'
100+
scm {
101+
url 'https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib'
102+
connection 'scm:https://[email protected]/tomasbjerre/violation-comments-to-bitbucket-server-lib.git'
103+
developerConnection 'scm:git://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib.git'
104+
}
105+
106+
licenses {
107+
license {
108+
name 'The Apache Software License, Version 2.0'
109+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
110+
distribution 'repo'
111+
}
112+
}
113+
114+
developers {
115+
developer {
116+
id 'tomasbjerre'
117+
name 'Tomas Bjerre'
118+
119+
}
120+
}
121+
}
122+
}
123+
124+
extraArchive {
125+
sources = true
126+
tests = true
127+
javadoc = true
128+
}
129+
130+
afterReleaseBuild.dependsOn {
131+
[install, uploadArchives]
132+
}

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
./gradlew clean gitChangelogTask eclipse build install -i

changelog.mustache

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Changelog
2+
3+
{{#tags}}
4+
## {{name}}
5+
{{#issues}}
6+
{{#hasIssue}}
7+
{{#hasLink}}
8+
### {{name}} [{{issue}}]({{link}}) {{title}}
9+
{{/hasLink}}
10+
{{^hasLink}}
11+
### {{name}} {{issue}} {{title}}
12+
{{/hasLink}}
13+
{{/hasIssue}}
14+
{{^hasIssue}}
15+
### {{name}}
16+
{{/hasIssue}}
17+
18+
{{#commits}}
19+
**{{{messageTitle}}}**
20+
21+
{{#messageBodyItems}}
22+
* {{.}}
23+
{{/messageBodyItems}}
24+
25+
[{{hash}}](https://github.com/tomasbjerre/violation-comments-to-github-lib/commit/{{hash}}) {{authorName}} *{{commitTime}}*
26+
27+
{{/commits}}
28+
29+
{{/issues}}
30+
{{/tags}}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = 1.0-SNAPSHOT

gradle/wrapper/gradle-wrapper.jar

52.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sun Oct 18 08:40:15 CEST 2015
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip

0 commit comments

Comments
 (0)