소스 검색

Convert utils to standalone project

Change-Id: Ib1cb137bf6d19be61c2329fb3dfb9939a347090a
Reviewed-on: http://gerrit.dmdirc.com/2500
Reviewed-by: Chris Smith <chris@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
tags/0.7rc1
Greg Holmes 12 년 전
부모
커밋
55f257bc15

+ 9
- 2
.gitignore 파일 보기

@@ -1,3 +1,10 @@
1
-/build
1
+# DMDirc-utils .gitignore file
2
+
3
+/*.key
4
+/build/
2 5
 /dist
3
-/reports
6
+/lib/*.jar
7
+build-before-profiler.xml
8
+/nbproject/profiler-build-impl.xml
9
+/nbproject/genfiles.properties
10
+/nbproject/private

+ 46
- 0
build-ivy.xml 파일 보기

@@ -0,0 +1,46 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project name="DMDirc-ivy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
3
+    <description>Ivy utilities for DMDirc</description>
4
+
5
+    <property name="ivy.install.version" value="2.2.0"/>
6
+    <property name="ivy.cache.ttl.default" value="7d"/>
7
+
8
+    <target name="-init-lib-directory">
9
+        <mkdir dir="lib"/>
10
+    </target>
11
+
12
+    <target name="-init-ivy" depends="-init-lib-directory">
13
+        <path id="lib.classpath">
14
+           <fileset dir="lib" includes="*.jar"/>
15
+        </path>
16
+
17
+        <available classname="org.apache.ivy.ant.IvyConfigure"
18
+              property="ivy.available" classpathref="lib.classpath" />
19
+    </target>
20
+
21
+    <target name="-download-ivy" depends="-init-ivy" unless="ivy.available">
22
+        <echo message="Retrieving Ivy"/>
23
+        <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
24
+             dest="lib/ivy-${ivy.install.version}.jar"/>
25
+    </target>
26
+
27
+    <target name="-init-dependencies" depends="-download-ivy" unless="ivy.done">
28
+        <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="lib.classpath"/>
29
+        <ivy:settings file="etc/ivy/ivysettings.xml"/>
30
+        <ivy:retrieve symlink="true" pattern="lib/[artifact]-[revision].[ext]" />
31
+        <pathconvert property="lib.classpath.computed" dirsep="/" pathsep=":">
32
+            <path>
33
+                <fileset dir="lib" includes="*.jar"/>
34
+            </path>
35
+            <map from="${basedir}${file.separator}" to=""/>
36
+        </pathconvert>
37
+        <propertyfile file="nbproject/private/private.properties">
38
+            <entry operation="=" key="lib.classpath" value="${lib.classpath.computed}"/>
39
+        </propertyfile>
40
+        <property name="ivy.done" value="true"/>
41
+    </target>
42
+
43
+    <target name="-post-clean">
44
+        <delete dir="lib"/>
45
+    </target>
46
+</project>

+ 20
- 0
build-versioning.xml 파일 보기

@@ -0,0 +1,20 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project name="DMDirc-versioning" default="default" basedir=".">
3
+    <description>Adds automatic versioning information to DMDirc</description>
4
+
5
+    <available file=".git" property="is.git"/>
6
+
7
+    <target name="-init-version">
8
+        <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="lib.classpath"/>
9
+    </target>
10
+
11
+    <target name="-add-version" depends="-init-version, -add-git-version" />
12
+
13
+    <target name="-add-git-version" if="is.git">
14
+        <git-describe dir=".git" property="git.version" />
15
+        <manifest file="${manifest.file}">
16
+            <attribute name="Version" value="${git.version}" />
17
+        </manifest>
18
+    </target>
19
+
20
+</project>

+ 11
- 84
build.xml 파일 보기

@@ -1,91 +1,18 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<project name="DMDirc Util" default="default" basedir=".">
3
-    <description>Builds, packages and tests DMDirc utility classes.</description>
2
+<project name="DMDirc-Utils" default="default" basedir=".">
3
+    <description>Builds, tests, and runs the project.</description>
4 4
 
5
-    <property name="util.src" location="src"/>
6
-    <property name="util.test" location="test"/>
7
-    <property name="util.build" location="build"/>
8
-    <property name="util.build.main" location="${util.build}/classes"/>
9
-    <property name="util.build.test" location="${util.build}/test"/>
10
-    <property name="util.reports" location="reports"/>
11
-    <property name="util.lib" location="lib"/>
12
-    <property name="util.dist" location="dist"/>
5
+    <import file="nbproject/build-impl.xml"/>
6
+    <import file="build-ivy.xml"/>
7
+    <import file="build-versioning.xml"/>
13 8
 
14
-    <path id="util.classpath.test">
15
-        <pathelement path="${util.build.main}"/>
16
-        <fileset dir="${util.lib}" includes="*.jar"/>
17
-    </path>
18
-
19
-    <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="util.classpath.test"/>
20
-
21
-    <target name="-init-compile">
22
-       <mkdir dir="${util.build.main}"/>
23
-    </target>
24
-
25
-    <target name="-init-compile-tests">
26
-       <mkdir dir="${util.build.test}"/>
27
-    </target>
28
-
29
-    <target name="-init-jar">
30
-       <mkdir dir="${util.dist}"/>
31
-    </target>
32
-
33
-    <target name="-init-test">
34
-       <mkdir dir="${util.reports}"/>
35
-    </target>
36
-
37
-    <target name="-retrieve-versions">
38
-       <git-describe dir=".git" property="util.version.main" subdir="${util.src}" />
9
+    <target name="-pre-init" depends="-init-dependencies"/>
10
+    <target name="-post-compile" depends="-add-version"/>
11
+    <target name="-post-jar">
12
+        <delete file="${manifest.file}"/>
39 13
     </target>
40
-
41
-    <target name="compile" depends="-init-compile">
42
-       <javac srcdir="${util.src}" destdir="${util.build.main}"
43
-              includeantruntime="false"/>
44
-    </target>
45
-
46
-    <target name="compile-tests" depends="compile,-init-compile-tests">
47
-       <javac srcdir="${util.test}" destdir="${util.build.test}"
48
-              includeantruntime="false" classpathref="util.classpath.test">
49
-       </javac>
50
-
51
-       <copy todir="${util.build.test}">
52
-          <fileset dir="${util.test}">
53
-             <exclude name="**/*.java"/>
54
-          </fileset>
55
-       </copy>
56
-    </target>
57
-
58
-    <target name="test" depends="compile-tests,-init-test">
59
-       <junit printsummary="true">
60
-          <classpath>
61
-             <path refid="util.classpath.test"/>
62
-             <pathelement location="${util.build.test}"/>
63
-          </classpath>
64
-          <batchtest todir="${util.reports}">
65
-             <fileset dir="${util.build.test}" includes="**/*Test.class"/>
66
-             <formatter type="xml"/>
67
-          </batchtest>
68
-       </junit>
69
-
70
-       <junitreport todir="${util.reports}">
71
-          <fileset dir="${util.reports}" includes="TEST-*.xml"/>
72
-       </junitreport>
14
+    <target name="-post-test-run">
15
+        <delete file="${manifest.file}"/>
73 16
     </target>
74 17
 
75
-    <target name="jar" depends="compile,-init-jar,-retrieve-versions">
76
-       <jar destfile="${util.dist}/util.jar" basedir="${util.build.main}">
77
-          <manifest>
78
-             <section name="com.dmdirc.util">
79
-                <attribute name="Implementation-Title" value="Utility classes"/>
80
-                <attribute name="Implementation-Version" value="${util.version.main}"/>
81
-             </section>
82
-          </manifest>
83
-       </jar>
84
-    </target>
85
-
86
-    <target name="clean">
87
-       <delete dir="${util.build}"/>
88
-       <delete dir="${util.dist}"/>
89
-       <delete dir="${util.reports}"/>
90
-    </target>
91 18
 </project>

+ 17
- 0
etc/ivy/ivysettings.xml 파일 보기

@@ -0,0 +1,17 @@
1
+<ivysettings>
2
+    <settings defaultResolver="default"/>
3
+    <resolvers>
4
+        <ibiblio name="default" m2compatible="true"/>
5
+
6
+        <ibiblio name="jgit" root="http://download.eclipse.org/jgit/maven" m2compatible="true"/>
7
+
8
+        <url name="jgit-describe">
9
+            <ivy pattern="file:///${basedir}/etc/ivy/[module]/ivy.xml"/>
10
+            <artifact pattern="http://shanemcc.github.com/jgit-describe/releases/jgit-describe-[revision].jar"/>
11
+        </url>
12
+    </resolvers>
13
+    <modules>
14
+        <module organisation="com.github.shanemcc" name="jgit-describe" resolver="jgit-describe"/>
15
+        <module organisation="org.eclipse.jgit" name="*" resolver="jgit"/>
16
+    </modules>
17
+</ivysettings>

+ 6
- 0
etc/ivy/jgit-describe/ivy.xml 파일 보기

@@ -0,0 +1,6 @@
1
+<ivy-module version="2.0">
2
+    <info organisation="com.github.shanemcc" module="jgit-describe"/>
3
+    <dependencies>
4
+        <dependency org="org.eclipse.jgit" name="org.eclipse.jgit" rev="latest.integration" conf="default" />
5
+    </dependencies>
6
+</ivy-module>

+ 18
- 0
ivy.xml 파일 보기

@@ -0,0 +1,18 @@
1
+<ivy-module version="2.0">
2
+    <info organisation="com.dmdirc" module="utils"/>
3
+
4
+    <configurations>
5
+        <conf name="build" description="Everything needed to build"/>
6
+        <conf name="compile" description="Everything needed to compile"/>
7
+        <conf name="test" description="Everything needed to test"/>
8
+        <conf name="default" extends="build,compile,test"/>
9
+    </configurations>
10
+
11
+    <dependencies defaultconfmapping="*->default">
12
+        <dependency org="com.github.shanemcc" name="jgit-describe" rev="0.2" conf="build" />
13
+        <dependency org="junit" name="junit" rev="4.+" conf="test" />
14
+        <dependency org="org.mockito" name="mockito-all" rev="1.+" conf="test" />
15
+
16
+        <exclude org="ant" module="ant"/>
17
+    </dependencies>
18
+</ivy-module>

BIN
lib/jgit-describe-0.2.jar 파일 보기


BIN
lib/junit-4.8.1.jar 파일 보기


BIN
lib/mockito-all-1.8.2.jar 파일 보기


+ 0
- 0
lib/nblibraries.properties 파일 보기


BIN
lib/org.eclipse.jgit-1.3.0-SNAPSHOT.jar 파일 보기


+ 1078
- 0
nbproject/build-impl.xml
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 74
- 0
nbproject/project.properties 파일 보기

@@ -0,0 +1,74 @@
1
+#Sat, 19 May 2012 23:51:24 +0100
2
+annotation.processing.enabled=true
3
+annotation.processing.enabled.in.editor=true
4
+annotation.processing.processors.list=
5
+annotation.processing.run.all.processors=true
6
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
7
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
8
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=4
9
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=4
10
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=8
11
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=80
12
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
13
+auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
14
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.allowConvertToStarImport=false
15
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.countForUsingStaticStarImport=1
16
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=com.dmdirc;com.google;com.palantir;java;javax;lombok;net.miginfocom;org;*;static *
17
+auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.separateStaticImports=true
18
+application.title=DMDirc-Utils
19
+application.vendor=DMDirc
20
+build.classes.dir=${build.dir}/classes
21
+build.classes.excludes=**/*.java,**/*.form
22
+# This directory is removed when the project is cleaned:
23
+build.dir=build
24
+build.generated.dir=${build.dir}/generated
25
+build.generated.sources.dir=${build.dir}/generated-sources
26
+# Only compile against the classpath explicitly listed here:
27
+build.sysclasspath=ignore
28
+build.test.classes.dir=${build.dir}/test/classes
29
+build.test.results.dir=${build.dir}/test/results
30
+# Uncomment to specify the preferred debugger connection transport:
31
+#debug.transport=dt_socket
32
+debug.classpath=${run.classpath}
33
+debug.test.classpath=${run.test.classpath}
34
+# This directory is removed when the project is cleaned:
35
+dist.dir=dist
36
+dist.jar=${dist.dir}/DMDirc-Utils.jar
37
+dist.javadoc.dir=${dist.dir}/javadoc
38
+endorsed.classpath=
39
+excludes=
40
+includes=**
41
+jar.compress=false
42
+javac.classpath=${lib.classpath}
43
+# Space-separated list of extra javac options
44
+javac.compilerargs=
45
+javac.deprecation=true
46
+javac.processorpath=${javac.classpath}
47
+javac.source=1.6
48
+javac.target=1.6
49
+javac.test.classpath=${javac.classpath}\:${build.classes.dir}
50
+javac.test.processorpath=${javac.test.classpath}
51
+javadoc.additionalparam=
52
+javadoc.author=false
53
+javadoc.encoding=${source.encoding}
54
+javadoc.noindex=false
55
+javadoc.nonavbar=false
56
+javadoc.notree=false
57
+javadoc.private=false
58
+javadoc.splitindex=true
59
+javadoc.use=true
60
+javadoc.version=false
61
+javadoc.windowtitle=
62
+manifest.file=manifest.mf
63
+meta.inf.dir=${src.dir}/META-INF
64
+mkdist.disabled=true
65
+platform.active=default_platform
66
+run.classpath=${javac.classpath}\:${build.classes.dir}
67
+# Space-separated list of JVM arguments used when running the project
68
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
69
+# or test-sys-prop.name=value to set system properties for unit tests):
70
+run.jvmargs=
71
+run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
72
+source.encoding=UTF-8
73
+src.dir=src
74
+test.src.dir=test

+ 18
- 0
nbproject/project.xml 파일 보기

@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://www.netbeans.org/ns/project/1">
3
+    <type>org.netbeans.modules.java.j2seproject</type>
4
+    <configuration>
5
+        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
6
+            <name>DMDirc-Utils</name>
7
+            <source-roots>
8
+                <root id="src.dir"/>
9
+            </source-roots>
10
+            <test-roots>
11
+                <root id="test.src.dir"/>
12
+            </test-roots>
13
+        </data>
14
+        <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
15
+            <definitions>./lib/nblibraries.properties</definitions>
16
+        </libraries>
17
+    </configuration>
18
+</project>

Loading…
취소
저장