Update of /cvsroot/mocklib/mocklib2/bldfiles
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31048/bldfiles
Modified Files:
directory.properties ant.properties build.xml
Log Message:
add findbugs, checkstyle to mocklib.
Index: ant.properties
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/bldfiles/ant.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ant.properties 27 Jun 2005 03:40:32 -0000 1.2
--- ant.properties 19 Feb 2006 19:20:50 -0000 1.3
***************
*** 9,12 ****
--- 9,19 ----
#version info may be retrieved using java -jar ${name}.jar -version
+ imports =[bundle.emptystring]
+ exports =[bundle.emptystring]
+ impl.pattern =biz/**,com/**,net/**
+ #The packages to make private
+
+ build.source=5
+
manifest.mainclass = TOOLS.JAVA.Main
#The class that is run when java -jar xxxx.jar is run
***************
*** 14,21 ****
manifest.vendor = http://mocklib.sourceforge.net
manifest.builder = Dean Hiller
copyright = Copyright © 2000 Dean Hiller All Rights Reserved.
javadoc.title = Build Template
! javadoc.bottom = xxxx<br> \
<a href=http://sourceforge.net> \
<IMG src=http://sourceforge.net/sflogo.php?group_id=113040 width=210 height=62 border=0 alt=SourceForge Logo> \
--- 21,30 ----
manifest.vendor = http://mocklib.sourceforge.net
manifest.builder = Dean Hiller
+ manifest.description = A Library that creates mockobjects with one line of code that simulate any interface
+ manifest.icon =
copyright = Copyright © 2000 Dean Hiller All Rights Reserved.
javadoc.title = Build Template
! javadoc.bottom = A Library that creates mockobjects that simulate any interface<br> \
<a href=http://sourceforge.net> \
<IMG src=http://sourceforge.net/sflogo.php?group_id=113040 width=210 height=62 border=0 alt=SourceForge Logo> \
Index: build.xml
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/bldfiles/build.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** build.xml 21 Dec 2005 21:04:41 -0000 1.9
--- build.xml 19 Feb 2006 19:20:50 -0000 1.10
***************
*** 31,55 ****
***********************************************************************
-->
- <!--property name="checkstyle.location" location="${tool.dir}/checkstyle"/>
- <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
- <classpath>
- <fileset dir="${checkstyle.location}">
- <include name="**/*.jar"/>
- </fileset>
- </classpath>
- </taskdef-->
<property name="junit.location" location="${tool.dir}/ant-junit"/>
! <path id="junit.lib">
! <pathelement path="${junit.location}/ant-junit.jar"/>
! <pathelement path="${junit.location}/junit.jar"/>
! </path>
<property name="antcontrib.location" location="${tool.dir}/ant-contrib"/>
! <path id="antcontrib.lib">
<fileset dir="${antcontrib.location}">
! <include name="**/*.jar"/>
! </fileset>
! </path>
<!-- directory that contains emma.jar and emma_ant.jar: -->
--- 31,47 ----
***********************************************************************
-->
<property name="junit.location" location="${tool.dir}/ant-junit"/>
! <path id="junit.lib">
! <pathelement path="${junit.location}/ant-junit.jar"/>
! <pathelement path="${junit.location}/junit.jar"/>
! </path>
<property name="antcontrib.location" location="${tool.dir}/ant-contrib"/>
! <path id="antcontrib.lib">
<fileset dir="${antcontrib.location}">
! <include name="**/*.jar"/>
! </fileset>
! </path>
<!-- directory that contains emma.jar and emma_ant.jar: -->
***************
*** 60,64 ****
</fileset>
</path>
!
<!--
***********************************************************************
--- 52,71 ----
</fileset>
</path>
!
! <property name="findbugs.dir" value="${tool.dir}/findbugs" />
! <path id="findbugs.lib" >
! <fileset dir="${findbugs.dir}/lib">
! <include name="**/*.jar"/>
! </fileset>
! </path>
!
! <property name="checkstyle.dir" value="${tool.dir}/checkstyle" />
!
! <property name="osgi.location" location="${tool.dir}/ant-osgi"/>
! <path id="osgi.ant.lib">
! <fileset dir="${osgi.location}">
! <include name="**/*.jar"/>
! </fileset>
! </path>
<!--
***********************************************************************
***************
*** 66,73 ****
***********************************************************************
-->
<!-- all Third Party jars and tool jars this module needs to compile -->
<path id="lib.jars">
! <fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
--- 73,86 ----
***********************************************************************
-->
+ <path id="lib.include">
+ <fileset dir="${lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
<!-- all Third Party jars and tool jars this module needs to compile -->
<path id="lib.jars">
! <path refid="lib.include"/>
! <fileset dir="${libexclude}">
<include name="**/*.jar"/>
</fileset>
***************
*** 99,110 ****
-->
<target name="taskdefs">
! <tstamp/>
<!-- Override this property to build official release -->
! <property name="version" value="Developer-Build"/>
<echo message="***************************USING THIS ANT************************"/>
<echo message="ant.home=${ant.home}"/>
<echo message="*****************************************************************"/>
- <echo message="basedir=${basedir}"/>
<!--Just a convenient pathconvert to debug paths above by converting to string and printing -->
--- 112,126 ----
-->
<target name="taskdefs">
! <tstamp>
! <format property="manifest.date"
! pattern ="EE MMMM d yyyy, HH:mm:ss"
! locale ="en"/>
! </tstamp>
<!-- Override this property to build official release -->
! <property name="version" value="Developer-Build"/>
<echo message="***************************USING THIS ANT************************"/>
<echo message="ant.home=${ant.home}"/>
<echo message="*****************************************************************"/>
<!--Just a convenient pathconvert to debug paths above by converting to string and printing -->
***************
*** 115,118 ****
--- 131,149 ----
<taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="antcontrib.lib"/>
<taskdef resource="emma_ant.properties" classpathref="emma.lib" />
+
+ <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
+ <!-- for some reason, I can't use resource="checkstyletask.properties" as it fails here-->
+ <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+ <classpath>
+ <fileset dir="${checkstyle.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </classpath>
+ </taskdef>
+
+ <taskdef name="bundleinfo" classname="org.knopflerfish.ant.taskdefs.bundle.BundleInfoTask" classpathref="osgi.ant.lib"/>
+ <taskdef name="bundlemanifest" classname="org.knopflerfish.ant.taskdefs.bundle.BundleManifestTask" classpathref="osgi.ant.lib"/>
+ <taskdef name="bundlehtml" classname="org.knopflerfish.ant.taskdefs.bundle.BundleHTMLExtractorTask" classpathref="osgi.ant.lib"/>
+ <taskdef name="bundleobr" classname="org.knopflerfish.ant.taskdefs.bundle.OBRExtractorTask" classpathref="osgi.ant.lib"/>
</target>
***************
*** 128,131 ****
--- 159,163 ----
<mkdir dir="${javacode}"/>
<mkdir dir="${lib}"/>
+ <mkdir dir="${libexclude}"/>
<mkdir dir="${staging.in}"/>
<mkdir dir="${properties}"/>
***************
*** 230,270 ****
<!--
***********************************************************************
MANIFEST TARGET
***********************************************************************
-->
! <target name="manifest" depends="create-src" description="Generate manifest">
<mkdir dir="${manifest}"/>
! <!--generate classpath to add to manifest using all jars in lib and main jar-->
! <pathconvert dirsep="/" pathsep=" " property="temp.classpath" refid="lib.jars" setonempty="true">
! <!--The map takes away the beginning of the path just leaving the jar file name -->
! <map from="${full.lib.path}${file.separator}" to=""/>
! </pathconvert>
! <property name="temp.classpath" value=""/>
! <property name="manifest.classpath" value="${jar.name} junit.jar ${temp.classpath}"/>
!
! <echo message="manifest.builder=${manifest.builder}"/>
! <echo message="manifest.classpath=${manifest.classpath}"/>
! <!--generate a manifest-->
! <manifest file="${manifest}/MANIFEST.MF">
! <attribute name="Built-By" value="${manifest.builder}"/>
! <attribute name="Main-Class" value="biz.xsoftware.manifest.ManifestInfo"/>
! <attribute name="Class-Path" value="${manifest.classpath}"/>
! <!--attribute name="Specification-Title" value="${spec.title}"/>
! <attribute name="Specification-Version" value="${spec.version}"/>
! <attribute name="Specification-Vendor" value="${spec.vendor}"/-->
! <attribute name="Implementation-Title" value="${manifest.title}"/>
! <attribute name="Implementation-Version" value="${version} ${TODAY}"/>
! <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
! <!-- non-standard manifest attributes -->
! <attribute name="SubMain-Class" value="${manifest.mainclass}"/>
! <attribute name="JarVersion" value="${version} ${TODAY}"/>
! <!--section name="common/class1.class">
! <attribute name="Sealed" value="false"/>
! </section-->
! </manifest>
! </target>
<!--
--- 262,362 ----
<!--
***********************************************************************
+ OSGI specific stuff
+ ***********************************************************************
+ -->
+ <target name="key1" if="exports" depends="compile">
+ <property name="export" value="Export-Package"/>
+ </target>
+ <target name="key2" unless="exports" depends="key1">
+ <property name="export" value="No-Export-Package"/>
+ </target>
+
+ <!--
+ ***********************************************************************
MANIFEST TARGET
***********************************************************************
-->
! <target name="manifest" depends="key2">
<mkdir dir="${manifest}"/>
! <property name="bundle.uuid" value="biz.xsoftware:${name}:${version}:all"/>
! <property name="ee.check.foundation" value="false"/>
! <property name="bundle.emptystring" value="[bundle.emptystring]"/>
! <!--generate classpath to add to manifest using all jars in lib and main jar-->
! <pathconvert dirsep="/" pathsep="," property="osgi.classpath" refid="lib.include" setonempty="true">
! <!--The map takes away the beginning of the path just leaving the jar file name -->
! <map from="${full.lib.path}${file.separator}" to=""/>
! </pathconvert>
! <property name="bundle.classpath" value=".,${osgi.classpath}"/>
!
! <echo message="bundle.classpath=${bundle.classpath}"/>
!
! <!-- the following is for osgi pojo's. You don't need to depend on osgi
! to use it, but the manifest has to have some entries!!! -->
! <bundleinfo exports = "export.package"
! checkFoundationEE = "${ee.check.foundation}">
! <fileset dir="${build}" includes="${api.pattern}"/>
! </bundleinfo>
!
! <bundleinfo activator = "bundle.activator"
! imports = "import.package"
! stdimports = "${ignore.imports}"
! checkFoundationEE = "${ee.check.foundation}">
! <fileset dir="${build}" includes="${impl.pattern}"/>
! </bundleinfo>
!
! <echo message="export=${export}"/>
!
! <bundlemanifest file = "${manifest}/MANIFEST.MF">
! <attribute name="Bundle-Name" value="${name}"/>
! <attribute name="Bundle-SymbolicName" value="${name}"/>
! <attribute name="Bundle-Version" value="${version}"/>
! <attribute name="Bundle-Description" value="${manifest.description}"/>
! <attribute name="Bundle-Vendor" value="${manifest.vendor}"/>
! <attribute name="Bundle-DocURL" value="${manifest.vendor}"/>
! <attribute name="Bundle-ContactAddress" value="${manifest.vendor}"/>
! <attribute name="Service-Component" value="descriptors/metadata.xml"/>
! <attribute name="Bundle-Category" value="${bundle.emptystring}"/>
! <attribute name="Bundle-Config" value="${bundle.emptystring}"/>
! <attribute name="Bundle-Classpath" value="${bundle.classpath}"/>
! <attribute name="Export-Service" value="${bundle.emptystring}"/>
! <attribute name="Import-Service" value="${bundle.emptystring}"/>
!
! <attribute name="${export}" value="${exports}"/>
! <attribute name="Import-Package" value="${imports}"/>
! <attribute name="Bundle-UUID" value="${bundle.uuid}"/>
! <attribute name="Built-From" value="${manifest.builder}"/>
! <attribute name="Build-Date" value="${manifest.date}"/>
! <attribute name="Application-Icon" value="${manifest.icon}"/>
! <attribute name="Bundle-SubversionURL" value="${manifest.vendor}"/>
! <attribute name="Bundle-APIVendor" value="${manifest.vendor}"/>
!
! <attribute name="Built-By" value="${manifest.builder}"/>
! <attribute name="Main-Class" value="biz.xsoftware.manifest.ManifestInfo"/>
! <attribute name="Class-Path" value="${manifest.classpath}"/>
! <!--
! <attribute name="Specification-Title" value="${spec.title}"/>
! <attribute name="Specification-Version" value="${spec.version}"/>
! <attribute name="Specification-Vendor" value="${spec.vendor}"/>
! -->
!
! <attribute name="Implementation-Title" value="${manifest.title}"/>
! <attribute name="Implementation-Version" value="${version} ${TODAY}"/>
! <attribute name="Implementation-Vendor" value="${manifest.vendor}"/>
!
! <!-- non-standard manifest attributes -->
! <attribute name="SubMain-Class" value="${manifest.mainclass}"/>
! <attribute name="JarVersion" value="${version} ${TODAY}"/>
!
! <!--
! <section name="common/class1.class">
! <attribute name="Sealed" value="false"/>
! </section>
! -->
! </bundlemanifest>
!
! </target>
<!--
***************
*** 282,286 ****
</copy>
- <mkdir dir="${jardist}"/>
<!-- Put all implementation classes from ${build} into the jar file -->
<jar jarfile="${jardist}/${jar.name}" basedir="${build}" manifest="${manifest}/MANIFEST.MF"/>
--- 374,377 ----
***************
*** 464,474 ****
<!-- after all tests are run, this makes the build fail-->
<fail if="is.test.fail"/>
!
! <!-- emma is not playing nice so we must feed it the absolute path of
! the report directory, otherwise if run from another directory, it
! puts it relative to that instead of relative to base dir -->
<property name="report.tmp" location="${codecov.report}"/>
-
- <echo message="HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"/>
<echo message="report=${report.tmp}"/>
--- 555,562 ----
<!-- after all tests are run, this makes the build fail-->
<fail if="is.test.fail"/>
!
! <!--autobuilds will not work without this while normal build will
! because for some reason basedir was not being used property-->
<property name="report.tmp" location="${codecov.report}"/>
<echo message="report=${report.tmp}"/>
***************
*** 480,484 ****
<txt outfile="${report.tmp}/coverage.txt" />
! <html outfile="${report.tmp}/coverage.html" />
</report>
</emma>
--- 568,572 ----
<txt outfile="${report.tmp}/coverage.txt" />
! <html outfile="${report.tmp}/index.html" />
</report>
</emma>
***************
*** 486,512 ****
</target>
<!--
***********************************************************************
! RELEASE TARGET
***********************************************************************
-->
! <target name="release" depends="testall" description="Builds official release">
! <ant antfile="${config}/release.xml" inheritRefs="true"/>
</target>
<!--
***********************************************************************
! CHECKSTYLE TARGET
***********************************************************************
-->
! <target name="checkstyle" depends="create-src" description="Runs checkstyle against the code">
! <!-- for some odd reason, this property is relative to conf directory -->
! <property name="checkstyle.header.file" value="${checkstyle.location}/vmaster.header"/>
! <checkstyle config="${checkstyle.location}/checkstyle_checks.xml">
! <fileset dir="${javacode}" includes="**/*.java"/>
! <formatter type="plain" toFile="checkstyle.log"/>
! </checkstyle>
</target>
-
<!--
***********************************************************************
--- 574,627 ----
</target>
+ <!--
+ ***********************************************************************
+ FINDBUGS TARGET
+ ***********************************************************************
+ -->
+ <target name="findbugs" depends="jar">
+ <mkdir dir="${findbugs.report}"/>
+ <findbugs home="${findbugs.dir}"
+ output="html"
+ outputFile="${findbugs.report}/index.html">
+ <class location="${jardist}/${jar.name}"/>
+ </findbugs>
+ </target>
+ <!--
+ ***********************************************************************
+ CHECKSTYLE TARGET
+ ***********************************************************************
+ -->
+ <target name="checkstyle" depends="create-src" description="Runs checkstyle against the code">
+ <mkdir dir="${checkstyle.report}"/>
+ <checkstyle config="${checkstyle.dir}/config.xml">
+ <fileset dir="${javacode}" includes="**/*.java"/>
+ <formatter type="plain" toFile="${checkstyle.report}/index.html"/>
+ </checkstyle>
+ </target>
+
+ <!--
+ ***********************************************************************
+ ALL TARGET
+ ***********************************************************************
+ -->
+ <target name="all" depends="testall,checkstyle,findbugs,javadoc">
+
+ </target>
<!--
***********************************************************************
! AUTOBUILD TARGET
***********************************************************************
-->
! <target name="autobuild" depends="all">
</target>
<!--
***********************************************************************
! RELEASE TARGET
***********************************************************************
-->
! <target name="release" depends="all" description="Builds official release">
! <ant antfile="${config}/release.xml" inheritRefs="true"/>
</target>
<!--
***********************************************************************
Index: directory.properties
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/bldfiles/directory.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** directory.properties 1 Jan 2006 00:20:50 -0000 1.2
--- directory.properties 19 Feb 2006 19:20:50 -0000 1.3
***************
*** 30,37 ****
#contains the release that gets released to the world
! allcodecov =${generated}/codecoverage
! codecov.report =${allcodecov}/report
#contains the code coverage reports of what the unit tests
#covered
codecov.temp =${allcodecov}/misc
codecov.classes =${allcodecov}/instrumented-classes
--- 30,43 ----
#contains the release that gets released to the world
! reports =${generated}/reports
! codecov.report =${reports}/codecoverage
#contains the code coverage reports of what the unit tests
#covered
+ findbugs.report =${reports}/findbugs
+ checkstyle.report=${reports}/checkstyle
+ javadoc =${reports}/javadoc
+ #contains the javadoc of biz.xsoftware.api
+
+ allcodecov =${generated}/codecoverage
codecov.temp =${allcodecov}/misc
codecov.classes =${allcodecov}/instrumented-classes
***************
*** 40,46 ****
codecov.jar =${allcodecov}/instrumented-jar
- javadoc =${generated}/javadoc
- #contains the javadoc of biz.xsoftware.api
-
junit.results =${generated}/test_results
#contains junit test results
--- 46,49 ----
***************
*** 91,96 ****
lib =${input}/lib
! #contains all *.jar needed to run the app
#does not contain *.jars needed to compile the app(such as junit.jar)
staging.in =${input}/staging
--- 94,103 ----
lib =${input}/lib
! #contains all *.jar needed to run the app and that need to be deployed with the app
#does not contain *.jars needed to compile the app(such as junit.jar)
+ libexclude =${input}/libexclude
+ #contains all the *.jar that are not needed to run the app. They are for testing or
+ #would already be deployed as services in the framework as in the case of an osgi logging
+ #service for example
staging.in =${input}/staging
***************
*** 131,133 ****
#output = build.log
#uncomment this to activate the logging
-
--- 138,139 ----
|