Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a NetBeans freeform project #7

Merged
merged 10 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@ jobs:

steps:
- name: checkout TPTP-ANTLR
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: checkout SigmaUtils
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'ontologyportal/SigmaUtils'
# repository: 'terry-norbraten/SigmaUtils'
ref: 'main'

- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ lib

build/
tptp.jar
/nbproject/private/
43 changes: 30 additions & 13 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
name="TPTP" 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"/>

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

<target name="download-ivy" unless="offline">
<property name="javac.release" value="11"/>

<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 @@ -29,7 +33,6 @@
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"/>
Expand All @@ -40,24 +43,25 @@
<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>
<ant antfile="../SigmaUtils/build.xml" inheritAll="false" target="all"/>
<copy todir="${basedir}/lib" file="../SigmaUtils/sigmaUtils.jar"/>
<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 Down Expand Up @@ -103,7 +107,7 @@
</target>

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

<target name="clean" description="Delete old build, lib, dist aritifacts">
<delete includeemptydirs="true" failonerror="false">
<!-- avoid problems with package name changes by deleting everything -->
<fileset dir="${build.home}"/>
</delete>
<delete file="tptp.jar"/>
<delete includeemptydirs="true" failonerror="false"> <!-- keep local ivy lib up to date -->
<fileset dir="${basedir}/lib"> <!-- keep ./lib -->
<include name="*.jar"/>
</fileset>
</delete>
</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="TPTP-ANTRL"/>
<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="org.antlr" name="antlr4" rev="4.9.3"/>
<dependency org="junit" name="junit" rev="4.12"/>
<dependency org="org.antlr" name="antlr4" rev="4.9.3" conf="api->default"/>
<dependency org="junit" name="junit" rev="4.13.2" conf="test->default"/>
</dependencies>
</ivy-module>
84 changes: 84 additions & 0 deletions nbproject/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.ant.freeform</type>
<configuration>
<general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
<!-- Do not use Project Properties customizer when editing this file manually.
To prevent the customizer from showing, create nbproject/project.properties file and enter
auxiliary.show.customizer=false
property there. Adding
auxiliary.show.customizer.message=<message>
will show your customized message when someone attempts to open the customizer. -->
<name>TPTP</name>
<properties/>
<folders>
<source-folder>
<label>src/java</label>
<type>java</type>
<location>src/java</location>
</source-folder>
<source-folder>
<label>test/src/main/java</label>
<type>java</type>
<location>test/src/main/java</location>
</source-folder>
</folders>
<ide-actions>
<action name="build">
<target>all</target>
</action>
<action name="test">
<target>test</target>
</action>
<action name="rebuild">
<target>compile</target>
</action>
</ide-actions>
<export>
<type>folder</type>
<location>build/classes</location>
<build-target>compile</build-target>
</export>
<export>
<type>folder</type>
<location>build/test-classes/tptp_parser</location>
<build-target>compile</build-target>
</export>
<view>
<items>
<source-folder style="packages">
<label>src/java</label>
<location>src/java</location>
</source-folder>
<source-folder style="packages">
<label>test/src/main/java</label>
<location>test/src/main/java</location>
</source-folder>
<source-file>
<location>build.xml</location>
</source-file>
</items>
<context-menu>
<ide-action name="build"/>
<ide-action name="rebuild"/>
<ide-action name="test"/>
</context-menu>
</view>
</general-data>
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/5">
<compilation-unit>
<package-root>src/java</package-root>
<classpath mode="compile">lib/antlr-runtime-3.5.2.jar:lib/antlr4-4.9.3.jar:lib/antlr4-runtime-4.9.3.jar:lib/icu4j-69.1.jar:lib/javax.json-1.0.4.jar:lib/org.abego.treelayout.core-1.0.3.jar:lib/sigmaUtils.jar:lib/ST4-4.3.1.jar</classpath>
<built-to>build/classes</built-to>
<source-level>11</source-level>
</compilation-unit>
<compilation-unit>
<package-root>test/src/main/java</package-root>
<unit-tests/>
<classpath mode="compile">build/classes:lib/antlr-runtime-3.5.2.jar:lib/antlr4-4.9.3.jar:lib/antlr4-runtime-4.9.3.jar:lib/hamcrest-core-1.3.jar:lib/icu4j-69.1.jar:lib/javax.json-1.0.4.jar:lib/junit-4.13.2.jar:lib/org.abego.treelayout.core-1.0.3.jar:lib/sigmaUtils.jar:lib/ST4-4.3.1.jar</classpath>
<built-to>build/test-classes/tptp_parser</built-to>
<source-level>11</source-level>
</compilation-unit>
</java-data>
</configuration>
</project>