Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[e4187e]: CheckstylePlugin / build.xml Maximize Restore History

Download this file

build.xml    173 lines (155 with data), 9.0 kB

  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
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<project name="CheckstylePlugin" default="compile" basedir=".">
<property environment="env" />
<property name="plugin.version" value="3.5.0" />
<property name="bin.dist.basedir" value="target/dist/bin" />
<property name="bin.dist.dir" value="${bin.dist.basedir}/com.atlassw.tools.eclipse.checkstyle_${plugin.version}" />
<property name="src.dist.basedir" value="target/dist/src" />
<property name="src.dist.dir" value="${src.dist.basedir}/com.atlassw.tools.eclipse.checkstyle_${plugin.version}-src" />
<property name="check.config" value="CheckConfig_Checkstyle.xml"/>
<property name="checkstyle.jar" value="checkstyle-all-3.5.jar" />
<property name="checkstyle-optional.jar" value="checkstyle-optional-3.5.jar" />
<property name="eclipse.core.resources.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.core.resources_2.1.1/resources.jar" />
<property name="eclipse.ui.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.ui_2.1.1/ui.jar" />
<property name="eclipse.swt.win32.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.swt.win32_2.1.3/ws/win32/swt.jar" />
<property name="eclipse.text.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.text_2.1.0/text.jar" />
<property name="eclipse.jdt.core.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.jdt.core_2.1.3/jdtcore.jar" />
<property name="eclipse.jface.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.jface_2.1.3/jface.jar" />
<property name="eclipse.jface.text.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.jface.text_2.1.0/jfacetext.jar" />
<property name="eclipse.ui.views.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.ui.views_2.1.3/views.jar" />
<property name="eclipse.ui.workbench.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.ui.workbench_2.1.3/workbench.jar" />
<property name="eclipse.ui.win32.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.ui.win32_2.1.0/workbenchwin32.jar" />
<property name="eclipse.ui.workbench.texteditor.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.ui.workbench.texteditor_2.1.3/texteditor.jar" />
<property name="eclipse.ui.editors.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.ui.editors_2.1.0/editors.jar" />
<property name="apache.xerces.api.jar" value="./xmlParserAPIs.jar" />
<property name="apache.xerces.impl.jar" value="./xercesImpl.jar" />
<property name="eclipse.core.runtime.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.core.runtime_2.1.1/runtime.jar" />
<property name="eclipse.core.boot.jar" value="${env.ECLIPSE_HOME}/plugins/org.eclipse.core.boot_2.1.3/boot.jar" />
<path id="build.classpath">
<pathelement location="${checkstyle.jar}" />
<pathelement location="${eclipse.core.resources.jar}" />
<pathelement location="${eclipse.ui.jar}" />
<pathelement location="${eclipse.swt.win32.jar}" />
<pathelement location="${eclipse.text.jar}" />
<pathelement location="${eclipse.jdt.core.jar}" />
<pathelement location="${eclipse.jface.jar}" />
<pathelement location="${eclipse.jface.text.jar}" />
<pathelement location="${eclipse.ui.views.jar}" />
<pathelement location="${eclipse.ui.workbench.jar}" />
<pathelement location="${eclipse.ui.win32.jar}" />
<pathelement location="${eclipse.ui.workbench.texteditor.jar}" />
<pathelement location="${eclipse.ui.editors.jar}" />
<pathelement location="${apache.xerces.api.jar}" />
<pathelement location="${apache.xerces.impl.jar}" />
<pathelement location="${eclipse.core.runtime.jar}" />
<pathelement location="${eclipse.core.boot.jar}" />
</path>
<!-- ==================================================== -->
<!-- COMPILE TARGET -->
<!-- ==================================================== -->
<target name="compile" description="Compiles the source code">
<mkdir dir="bin" />
<javac srcdir="src" destdir="bin" deprecation="on" classpathref="build.classpath"
debug="true" debuglevel="lines">
</javac>
</target>
<!-- ==================================================== -->
<!-- CLEAN TARGET -->
<!-- ==================================================== -->
<target name="clean" description="Cleans any directories and generated files">
<delete dir="target" failonerror="false" quiet="true" />
<delete includeemptydirs="true" failonerror="false" quiet="true">
<fileset dir="bin" includes="**" excludes="bin" />
</delete>
<mkdir dir="bin" />
</target>
<!-- ==================================================== -->
<!-- BUILD TARGET AREA -->
<!-- ==================================================== -->
<target name="build.target.area" description="Build the directory structure of the target area">
<mkdir dir="target" />
<mkdir dir="target/dist" />
</target>
<!-- ==================================================== -->
<!-- JAR TARGET -->
<!-- ==================================================== -->
<target name="jar.plugin" depends="build.target.area, compile" description="Jars up all the files that go into the plug-in jar file">
<copy
file="src/com/atlassw/tools/eclipse/checkstyle/config/classnames_v3.2.0_update.properties"
tofile="bin/com/atlassw/tools/eclipse/checkstyle/config/classnames_v3.2.0_update.properties" />
<copy file="src/CheckstyleMetadata.xml" todir="bin" />
<mkdir dir="${bin.dist.dir}" />
<jar destfile="${bin.dist.dir}/CheckstylePlugin.jar" basedir="bin" index="true" />
</target>
<!-- ==================================================== -->
<!-- DISTRIBUTION TARGET -->
<!-- ==================================================== -->
<target name="build.dist" depends="build.bindist, build.srcdist">
</target>
<!-- ==================================================== -->
<!-- BINARY DISTRIBUTION TARGET -->
<!-- ==================================================== -->
<target name="build.bindist" depends="build.target.area, jar.plugin"
description="Copies all the necessary files to the distribution directory">
<mkdir dir="${bin.dist.dir}" />
<copy file="${checkstyle.jar}" todir="${bin.dist.dir}" />
<copy file="${checkstyle-optional.jar}" todir="${bin.dist.dir}" />
<copy file="plugin.xml" todir="${bin.dist.dir}" />
<copy file="xercesImpl.jar" todir="${bin.dist.dir}" />
<copy file="xmlParserAPIs.jar" todir="${bin.dist.dir}" />
<copy file="toc.xml" todir="${bin.dist.dir}" />
<copy file="README.html" todir="${bin.dist.dir}" />
<copy file="DefaultChecks.xml" todir="${bin.dist.dir}" />
<copy todir="${bin.dist.dir}/doc">
<fileset dir="doc" />
</copy>
<copy todir="${bin.dist.dir}/license">
<fileset dir="license" />
</copy>
<delete file="${bin.dist.dir}.zip"/>
<zip destfile="${bin.dist.dir}.zip" basedir="${bin.dist.basedir}" update="false"/>
</target>
<!-- ==================================================== -->
<!-- SOURCE DISTRIBUTION TARGET -->
<!-- ==================================================== -->
<target name="build.srcdist" depends="build.target.area"
description="Copies all the necessary files to the distribution directory">
<mkdir dir="${src.dist.dir}" />
<copy file="${checkstyle.jar}" todir="${src.dist.dir}" />
<copy file="plugin.xml" todir="${src.dist.dir}" />
<copy file="xercesImpl.jar" todir="${bin.dist.dir}" />
<copy file="xmlParserAPIs.jar" todir="${bin.dist.dir}" />
<copy file="toc.xml" todir="${src.dist.dir}" />
<copy file="README.html" todir="${src.dist.dir}" />
<copy file="build.xml" todir="${src.dist.dir}" />
<copy todir="${src.dist.dir}/doc">
<fileset dir="doc" />
</copy>
<copy todir="${src.dist.dir}/license">
<fileset dir="license" />
</copy>
<copy todir="${src.dist.dir}/src">
<fileset dir="src" />
</copy>
<delete file="${src.dist.dir}.zip"/>
<zip destfile="${src.dist.dir}.zip" basedir="${src.dist.basedir}" />
</target>
<!-- ==================================================== -->
<!-- RUN CHECKSTYLE TARGET -->
<!-- ==================================================== -->
<target name="run.checkstyle" depends="compile, build.target.area">
<taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpath="${checkstyle.jar}"></taskdef>
<checkstyle config="${check.config}">
<fileset dir="src" includes="**/*.java"/>
<formatter type="plain" />
<formatter type="xml" toFile="target/cs_errors.xml" />
<classpath refid="build.classpath" />
</checkstyle>
</target>
<!-- ==================================================== -->
<!-- DEBUG TARGETS -->
<!-- ==================================================== -->
<target name="display.build.classpath" description="Displays the build classpath">
<property name="temp" refid="build.classpath" />
<echo message="Build classpath is ${temp}" />
</target>
</project>