Skip to content

Commit 697fd66

Browse files
author
Justin Ryan
committed
Initial commit, working with Maven Central
0 parents  commit 697fd66

34 files changed

+933
-0
lines changed

.classpath

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
4+
<classpathentry kind="con" path="GROOVY_SUPPORT"/>
5+
<classpathentry exported="true" kind="con" path="com.springsource.sts.gradle.classpathcontainer"/>
6+
<classpathentry kind="con" path="com.springsource.sts.gradle.dsld.classpathcontainer"/>
7+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
8+
<classpathentry kind="output" path="bin"/>
9+
</classpath>

.gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Compiled source #
2+
###################
3+
*.com
4+
*.class
5+
*.dll
6+
*.exe
7+
*.o
8+
*.so
9+
10+
# Packages #
11+
############
12+
# it's better to unpack these files and commit the raw source
13+
# git has its own built in compression methods
14+
*.7z
15+
*.dmg
16+
*.gz
17+
*.iso
18+
*.jar
19+
*.rar
20+
*.tar
21+
*.zip
22+
23+
# Logs and databases #
24+
######################
25+
*.log
26+
27+
# OS generated files #
28+
######################
29+
.DS_Store*
30+
ehthumbs.db
31+
Icon?
32+
Thumbs.db
33+
34+
# Editor Files #
35+
################
36+
*~
37+
38+
# Gradle Files #
39+
################
40+
.gradle

.project

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>gradle-template</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>com.springsource.sts.gradle.core.nature</nature>
16+
<nature>org.eclipse.jdt.core.javanature</nature>
17+
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
18+
</natures>
19+
<filteredResources>
20+
<filter>
21+
<id>1332049227118</id>
22+
<name></name>
23+
<type>10</type>
24+
<matcher>
25+
<id>org.eclipse.ui.ide.orFilterMatcher</id>
26+
<arguments>
27+
<matcher>
28+
<id>org.eclipse.ui.ide.multiFilter</id>
29+
<arguments>1.0-projectRelativePath-equals-true-false-template-server</arguments>
30+
</matcher>
31+
<matcher>
32+
<id>org.eclipse.ui.ide.multiFilter</id>
33+
<arguments>1.0-projectRelativePath-equals-true-false-template-client</arguments>
34+
</matcher>
35+
</arguments>
36+
</matcher>
37+
</filter>
38+
</filteredResources>
39+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#com.springsource.sts.gradle.core.preferences.GradleImportPreferences
2+
#Sat Mar 17 22:40:13 PDT 2012
3+
enableAfterTasks=true
4+
afterTasks=afterEclipseImport;
5+
enableDependendencyManagement=true
6+
enableBeforeTasks=true
7+
projects=;template-client;template-server;
8+
enableDSLD=true
9+
beforeTasks=cleanEclipse;eclipse;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#com.springsource.sts.gradle.core.preferences.GradleProjectPreferences
2+
#Sat Mar 17 22:40:29 PDT 2012
3+
com.springsource.sts.gradle.rootprojectloc=
4+
com.springsource.sts.gradle.linkedresources=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#com.springsource.sts.gradle.core.actions.GradleRefreshPreferences
2+
#Sat Mar 17 22:40:27 PDT 2012
3+
enableAfterTasks=true
4+
afterTasks=afterEclipseImport;
5+
useHierarchicalNames=false
6+
enableBeforeTasks=true
7+
addResourceFilters=true
8+
enableDSLD=true
9+
beforeTasks=cleanEclipse;eclipse;

build.gradle

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Establish version and status
2+
ext.releaseVersion = '1.1.3' // TEMPLATE: Set to latest release
3+
ext.githubProjectName = rootProject.name // TEMPLATE: change to match github project, if it doesn't match project name
4+
5+
apply from: file('gradle/convention.gradle')
6+
apply from: file('gradle/maven.gradle')
7+
apply from: file('gradle/check.gradle')
8+
9+
subprojects
10+
{
11+
group = 'com.netflix'
12+
13+
repositories
14+
{
15+
mavenCentral()
16+
}
17+
18+
dependencies
19+
{
20+
compile 'javax.ws.rs:jsr311-api:1.1.1'
21+
compile 'com.sun.jersey:jersey-core:1.11'
22+
testCompile 'org.testng:testng:6.1.1'
23+
testCompile 'org.mockito:mockito-core:1.8.5'
24+
}
25+
}
26+
27+
project(':template-client')
28+
{
29+
dependencies
30+
{
31+
compile 'org.slf4j:slf4j-api:1.6.3'
32+
compile 'com.sun.jersey:jersey-client:1.11'
33+
}
34+
}
35+
36+
project(':template-server')
37+
{
38+
apply plugin: 'war'
39+
apply plugin: 'jetty'
40+
dependencies
41+
{
42+
compile 'com.sun.jersey:jersey-server:1.11'
43+
compile 'com.sun.jersey:jersey-servlet:1.11'
44+
compile project(':template-client')
45+
testCompile 'org.mockito:mockito-core:1.8.5'
46+
}
47+
}
48+

codequality/checkstyle.xml

+188
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
5+
6+
<module name="Checker">
7+
8+
<!-- Checks that a package-info.java file exists for each package. -->
9+
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
10+
<!--
11+
<module name="JavadocPackage">
12+
<property name="allowLegacy" value="true"/>
13+
</module>
14+
-->
15+
16+
<!-- Checks whether files end with a new line. -->
17+
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
18+
<module name="NewlineAtEndOfFile"/>
19+
20+
<!-- Checks that property files contain the same keys. -->
21+
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
22+
<module name="Translation"/>
23+
24+
<!-- Checks for Size Violations. -->
25+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
26+
<module name="FileLength"/>
27+
28+
<!-- Checks for whitespace -->
29+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
30+
<module name="FileTabCharacter"/>
31+
32+
<!-- Miscellaneous other checks. -->
33+
<!-- See http://checkstyle.sf.net/config_misc.html -->
34+
<module name="RegexpSingleline">
35+
<property name="format" value="\s+$"/>
36+
<property name="minimum" value="0"/>
37+
<property name="maximum" value="0"/>
38+
<property name="message" value="Line has trailing spaces."/>
39+
<property name="severity" value="info"/>
40+
</module>
41+
42+
<module name="TreeWalker">
43+
44+
<!-- Checks for Javadoc comments. -->
45+
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
46+
<module name="JavadocMethod">
47+
<property name="scope" value="package"/>
48+
<property name="allowMissingParamTags" value="true"/>
49+
<property name="allowMissingThrowsTags" value="true"/>
50+
<property name="allowMissingReturnTag" value="true"/>
51+
<property name="allowThrowsTagsForSubclasses" value="true"/>
52+
<property name="allowUndeclaredRTE" value="true"/>
53+
</module>
54+
<module name="JavadocType">
55+
<property name="scope" value="package"/>
56+
</module>
57+
<module name="JavadocVariable">
58+
<property name="scope" value="package"/>
59+
</module>
60+
<module name="JavadocStyle">
61+
<property name="checkEmptyJavadoc" value="true"/>
62+
</module>
63+
64+
<!-- Checks for Naming Conventions. -->
65+
<!-- See http://checkstyle.sf.net/config_naming.html -->
66+
<module name="ConstantName"/>
67+
<module name="LocalFinalVariableName"/>
68+
<module name="LocalVariableName"/>
69+
<module name="MemberName"/>
70+
<module name="MethodName"/>
71+
<module name="PackageName"/>
72+
<module name="ParameterName"/>
73+
<module name="StaticVariableName"/>
74+
<module name="TypeName"/>
75+
76+
<!-- Checks for imports -->
77+
<!-- See http://checkstyle.sf.net/config_import.html -->
78+
<module name="AvoidStarImport"/>
79+
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
80+
<module name="RedundantImport"/>
81+
<module name="UnusedImports"/>
82+
83+
84+
<!-- Checks for Size Violations. -->
85+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
86+
<module name="LineLength">
87+
<!-- what is a good max value? -->
88+
<property name="max" value="120"/>
89+
<!-- ignore lines like "$File: //depot/... $" -->
90+
<property name="ignorePattern" value="\$File.*\$"/>
91+
<property name="severity" value="info"/>
92+
</module>
93+
<module name="MethodLength"/>
94+
<module name="ParameterNumber"/>
95+
96+
97+
<!-- Checks for whitespace -->
98+
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
99+
<module name="EmptyForIteratorPad"/>
100+
<module name="GenericWhitespace"/>
101+
<module name="MethodParamPad"/>
102+
<module name="NoWhitespaceAfter"/>
103+
<module name="NoWhitespaceBefore"/>
104+
<module name="OperatorWrap"/>
105+
<module name="ParenPad"/>
106+
<module name="TypecastParenPad"/>
107+
<module name="WhitespaceAfter"/>
108+
<module name="WhitespaceAround"/>
109+
110+
<!-- Modifier Checks -->
111+
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
112+
<module name="ModifierOrder"/>
113+
<module name="RedundantModifier"/>
114+
115+
116+
<!-- Checks for blocks. You know, those {}'s -->
117+
<!-- See http://checkstyle.sf.net/config_blocks.html -->
118+
<module name="AvoidNestedBlocks"/>
119+
<module name="EmptyBlock">
120+
<property name="option" value="text"/>
121+
</module>
122+
<module name="LeftCurly"/>
123+
<module name="NeedBraces"/>
124+
<module name="RightCurly"/>
125+
126+
127+
<!-- Checks for common coding problems -->
128+
<!-- See http://checkstyle.sf.net/config_coding.html -->
129+
<!-- <module name="AvoidInlineConditionals"/> -->
130+
<module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
131+
<module name="EmptyStatement"/>
132+
<module name="EqualsHashCode"/>
133+
<module name="HiddenField">
134+
<property name="ignoreConstructorParameter" value="true"/>
135+
<property name="ignoreSetter" value="true"/>
136+
<property name="severity" value="warning"/>
137+
</module>
138+
<module name="IllegalInstantiation"/>
139+
<module name="InnerAssignment"/>
140+
<module name="MagicNumber">
141+
<property name="severity" value="warning"/>
142+
</module>
143+
<module name="MissingSwitchDefault"/>
144+
<!-- Problem with finding exception types... -->
145+
<module name="RedundantThrows">
146+
<property name="allowUnchecked" value="true"/>
147+
<property name="suppressLoadErrors" value="true"/>
148+
<property name="severity" value="info"/>
149+
</module>
150+
<module name="SimplifyBooleanExpression"/>
151+
<module name="SimplifyBooleanReturn"/>
152+
153+
<!-- Checks for class design -->
154+
<!-- See http://checkstyle.sf.net/config_design.html -->
155+
<!-- <module name="DesignForExtension"/> -->
156+
<module name="FinalClass"/>
157+
<module name="HideUtilityClassConstructor"/>
158+
<module name="InterfaceIsType"/>
159+
<module name="VisibilityModifier"/>
160+
161+
162+
<!-- Miscellaneous other checks. -->
163+
<!-- See http://checkstyle.sf.net/config_misc.html -->
164+
<module name="ArrayTypeStyle"/>
165+
<!-- <module name="FinalParameters"/> -->
166+
<module name="TodoComment">
167+
<property name="format" value="TODO"/>
168+
<property name="severity" value="info"/>
169+
</module>
170+
<module name="UpperEll"/>
171+
172+
<module name="FileContentsHolder"/> <!-- Required by comment suppression filters -->
173+
174+
</module>
175+
176+
<!-- Enable suppression comments -->
177+
<module name="SuppressionCommentFilter">
178+
<property name="offCommentFormat" value="CHECKSTYLE IGNORE\s+(\S+)"/>
179+
<property name="onCommentFormat" value="CHECKSTYLE END IGNORE\s+(\S+)"/>
180+
<property name="checkFormat" value="$1"/>
181+
</module>
182+
<module name="SuppressWithNearbyCommentFilter">
183+
<!-- Syntax is "SUPPRESS CHECKSTYLE name" -->
184+
<property name="commentFormat" value="SUPPRESS CHECKSTYLE (\w+)"/>
185+
<property name="checkFormat" value="$1"/>
186+
<property name="influenceFormat" value="1"/>
187+
</module>
188+
</module>

gradle/check.gradle

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
subprojects {
2+
// Checkstyle
3+
apply plugin: 'checkstyle'
4+
tasks.withType(Checkstyle) { ignoreFailures = true }
5+
checkstyle {
6+
ignoreFailures = true // Waiting on GRADLE-2163
7+
configFile = rootProject.file('codequality/checkstyle.xml')
8+
}
9+
10+
// FindBugs
11+
apply plugin: 'findbugs'
12+
13+
// PMD
14+
apply plugin: 'pmd'
15+
16+
}

0 commit comments

Comments
 (0)