Skip to content

Commit

Permalink
Merge pull request #8 from terry-norbraten/main
Browse files Browse the repository at this point in the history
Clean up items
  • Loading branch information
apease authored Nov 1, 2024
2 parents f35e973 + c5240ae commit fd9eff8
Show file tree
Hide file tree
Showing 10 changed files with 1,192 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml
run: ant
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ lib
.idea
*.iml
.ivy
/nbproject/private/
/MANIFEST.MF
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

48 changes: 32 additions & 16 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
name="SigmaUtils" default="all" basedir=".">

<property name="ivy.install.version" value="2.5.1"/>

<property name="ivy.home" value="${basedir}/.ivy"/>
<property name="ivy.jar.dir" value="${ivy.home}/lib"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>

<target name="download-ivy" unless="offline">
<target name="check.for.ivy.jar">
<available file="${ivy.jar.file}" property="ivy.present"/>
</target>

<target name="download-ivy" depends="check.for.ivy.jar" unless="ivy.present">
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
Expand All @@ -22,39 +24,40 @@
Ivy is in at least one of Ant's lib dir or the local lib dir. -->
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>

</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>

<property name="app.name" value="SigmaUtils"/>
<property name="app.name" value="sigmaUtils"/>
<property name="build.home" value="build"/>
<property name="build.classes" value="${build.home}/classes"/>
<property name="build.test.classes" value="${build.home}/test-classes"/>
<property name="build.lib" value="${build.home}/lib"/>
<!--<property name="build.lib" value="${build.home}/lib"/>-->
<property environment="env"/>

<property name="javac.release" value="11"/>

<target name="init" depends="init-ivy">
<echo>Java Version via Ant: ${ant.java.version}</echo>
<echo>Java Version System Prop: ${java.version}</echo>

<!-- avoid problems with package name changes by deleting everything -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${build.home}"/>
</delete>
<ivy:retrieve/>
</target>

<target name="compile" depends="init" description="Compile the project and place in ${build.classes}.">
<mkdir dir="${build.classes}"/>
<javac destdir="${build.classes}" debug="on" optimize="on" deprecation="on" includeantruntime="false"
classpathref="compile.classpath">
<javac destdir="${build.classes}"
debug="on"
optimize="on"
deprecation="on"
includeantruntime="false"
classpathref="compile.classpath"
release="${javac.release}">
<src refid="core.sourcepath"/>
</javac>
<copy todir="${build.lib}">
<!-- <copy todir="${build.lib}">
<fileset dir="${basedir}/lib"/>
</copy>
</copy>-->
</target>

<path id="core.sourcepath">
Expand All @@ -72,7 +75,7 @@
</path>

<path id="classpath.test">
<pathelement location="lib/junit-4.12.jar"/>
<pathelement location="lib/junit-4.13.2.jar"/>
<pathelement location="lib/hamcrest-core-1.3.jar"/>
<pathelement location="${build.classes}"/>
</path>
Expand All @@ -99,7 +102,7 @@
</target>

<!-- target name="all" depends="dist, api_doc" -->
<target name="all" depends="compile,test">
<target name="all" depends="clean,test">
<jar destfile="${basedir}/sigmaUtils.jar">
<fileset dir="${build.classes}"/>
</jar>
Expand All @@ -109,4 +112,17 @@
<echo>the system date/time is ${TODAY_US}</echo>
</target>

<target name="clean" description="Delete old build, lib contents">
<!-- avoid problems with package name changes by deleting everything -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${build.home}"/>
</delete>
<delete includeemptydirs="true" failonerror="false"> <!-- keep local ivy lib up to date -->
<fileset dir="${basedir}/lib"> <!-- keep ./lib -->
<include name="*.jar"/>
</fileset>
</delete>
<delete file="${app.name}.jar"/>
</target>

</project>
11 changes: 9 additions & 2 deletions ivy.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<ivy-module version="2.0">
<info organisation="org.ontologyportal" module="SigmaUtils"/>
<configurations>
<conf name="api" description="Provide API"/>
<conf name="test" extends="api" visibility="private" description="For testing our API"/>
</configurations>
<publications>
<artifact name="filter-api" type="jar" conf="api" ext="jar"/>
</publications>
<dependencies>
<dependency org="com.google.guava" name="guava" rev="19.0"/>
<dependency org="junit" name="junit" rev="4.12"/>
<dependency org="com.google.guava" name="guava" rev="19.0" conf="api->default"/>
<dependency org="junit" name="junit" rev="4.13.2" conf="test->default"/>
</dependencies>
</ivy-module>
95 changes: 95 additions & 0 deletions nbproject/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#app.name=sigmaUtils
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
#build.home=build
#build.classes=${build.home}/classes
#build.test.classes=${build.home}/test-classes
build.test.results.dir=${build.test.classes}/results
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
buildfile=nbproject/ide-targets.xml
# Uncomment to specify the preferred debugger connection transport:
debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.modulepath=\
${run.modulepath}
debug.test.classpath=\
${run.test.classpath}
debug.test.modulepath=\
${run.test.modulepath}
# Files in build.classes.dir which should be excluded from distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/${app.name}.jar
dist.javadoc.dir=${dist.dir}/doc/api
excludes=
file.reference.src-java=src/java
file.reference.unit-java=test/unit/java
includes=**
jar.compress=false
# Leverage Ivy here
javac.classpath=${ant.refid:compile.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.external.vm=true
#javac.release=11
javac.test.classpath=\
${javac.classpath}:\
${build.classes}:\
lib/hamcrest-core-1.3.jar:\
lib/junit-4.13.2.jar
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.html5=false
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=com.articulate.sigma.utils.StringUtil
manifest.mf=MANIFEST.MF
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.modulepath=\
${javac.modulepath}
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes}
run.test.modulepath=\
${javac.test.modulepath}
source.encoding=UTF-8
src.dir=${file.reference.src-java}
test.unit.dir=${file.reference.unit-java}

# Specific SigmaUtils props
impl.title=SigmaUtils
impl.vendor.id=edu.nps.cs
sumo.url=http://www.ontologyportal.org
nps=Naval Postgraduate School (NPS), Monterey, CA
cs.dept=Computer Science (CS) DEPT

product.Name=Sigma Utilities (${impl.title})
product.version.major=1
product.version.minor=0
product.version.patch=0
product.Version=${product.version.major}.${product.version.minor}.\
${product.version.patch}
spec.vendor=Adam Pease
project.license=LICENSE

reports.dir=${build.home}/reports
report.html=file:${basedir}/${reports.dir}/html/index.html
unit.test.suite=com.articulate.sigma.StringUtilTest
Loading

0 comments on commit fd9eff8

Please sign in to comment.