switched to ant build

This commit is contained in:
7u83 2017-03-19 21:58:49 +01:00
parent cd2d0c65ff
commit 1006c20a0e
136 changed files with 282 additions and 287 deletions

114
build.xml Normal file
View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="AntSeSim" default="default" basedir=".">
<description>Builds, tests, and runs the project AntSeSim.</description>
<import file="nbproject/build-impl.xml"/>
<target name="-check-for-ivy">
<available property="have.ivy" resource="fr/jayasoft/ivy/ant/antlib.xml"/>
</target>
<target name="-ivy-define" depends="-check-for-ivy" unless="have.ivy">
<taskdef resource="fr/jayasoft/ivy/ant/antlib.xml" uri="antlib:fr.jayasoft.ivy.ant">
<classpath>
<fileset dir="${ivy.home}">
<include name="ivy*.jar"/>
<include name="lib/*.jar"/>
</fileset>
</classpath>
</taskdef>
</target>
<target name="-ivy-retrieve" depends="-ivy-define" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
<ivy:resolve/> <!-- Tell Ivy to resolve dependencies -->
<ivy:retrieve/> <!-- Load dependencies to the project -->
<pathconvert property="ivy.classpath.computed" dirsep="/" pathsep=":">
<path>
<fileset dir="lib" includes="*.jar"/>
</path>
<map from="${basedir}${file.separator}" to=""/>
</pathconvert>
<propertyfile file="nbproject/project.properties">
<entry operation="=" key="ivy.classpath" value="${ivy.classpath.computed}"/>
</propertyfile>
</target>
<target name="-pre-compile" depends="-ivy-retrieve"/>
<target name="-pre-compile-single" depends="-ivy-retrieve"/>
<target name="-post-clean">
<delete dir="lib"/>
</target>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="AntSeSim-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>

View File

@ -1,15 +0,0 @@
<?php
function doNothing(&$param){
echo "I am really doing nothing\n";
}
$params = array(
"hello" => "world"
);
for ($i=0; $i<count($params); $i++){
doNothing($params[$i]);
}

16
ivy.xml Normal file
View File

@ -0,0 +1,16 @@
<ivy-module version="2.0">
<info organisation="sesim" module="NewMDIApplication"/>
<dependencies>
<dependency org="commons-lang" name="commons-lang" rev="2.0"/>
<dependency org="commons-cli" name="commons-cli" rev="1.0"/>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency org="org.json" name="json" rev="20160810"/>
</dependencies>
</ivy-module>

18
ivysettings.xml Normal file
View File

@ -0,0 +1,18 @@
<ivysettings>
<settings defaultResolver="main" >
<property name="ivy.default.ivy.user.dir" value="${user.home}/.ivy2" />
<caches resolutionCacheDir="${user.home}/.ivy2/cache" defaultCacheDir="${user.home}/.ivy2/cache"/>
</settings>
<resolvers>
<chain name="main">
<url name="repo" m2compatible="true">
<artifact pattern="http://reposserver/artifactory/repo/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" />
<ivy pattern="http://reposerver/artifactory/repo/[organization]/[module]/[revision]/[module]-[revision](-[classifier]).pom" />
</url>
<ibiblio name="compass" m2compatible="true" root="http://repo.compass-project.org"></ibiblio>
<ibiblio name="ibiblio" m2compatible="true"></ibiblio>
</chain>
</resolvers>
</ivysettings>

3
manifest.mf Normal file
View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<netbeans.hint.license>bsd</netbeans.hint.license>
<org-netbeans-modules-whitelist.whitelist-oracle>false</org-netbeans-modules-whitelist.whitelist-oracle>
</properties>
</project-shared-configuration>

View File

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath gui.NewMDIApplication</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath gui.NewMDIApplication</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath gui.NewMDIApplication</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>build</actionName>
<packagings>
<packaging>*</packaging>
</packagings>
<goals>
<goal>webstart:jnlp-single</goal>
</goals>
<properties>
<jar.finalName>sesim</jar.finalName>
<createChecksum>true</createChecksum>
<updateReleaseInfo>true</updateReleaseInfo>
<jnlp.archive>sesimj</jnlp.archive>
<jnlp.canUnsign>true</jnlp.canUnsign>
</properties>
</action>
<action>
<actionName>rebuild</actionName>
<packagings>
<packaging>*</packaging>
</packagings>
<goals>
<goal>nbm:standalone-zip</goal>
</goals>
<properties>
<jar.finalName>sesim</jar.finalName>
<createChecksum>true</createChecksum>
<updateReleaseInfo>true</updateReleaseInfo>
<jnlp.archive>sesim</jnlp.archive>
<webstart.verbose>true</webstart.verbose>
<netbeans.branding.token>SeSim</netbeans.branding.token>
<project>SeSim</project>
</properties>
</action>
</actions>

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath gui.NewMDIApplication</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath gui.NewMDIApplication</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath gui.NewMDIApplication</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>

88
pom.xml
View File

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.cauwersin</groupId>
<artifactId>SeSim</artifactId>
<version>0.01</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20160810</version>
</dependency>
<dependency>
<groupId>net.java.linoleum</groupId>
<artifactId>jlfgr</artifactId>
<version>1_0</version>
</dependency>
<dependency>
<groupId>com.github.arnabk</groupId>
<artifactId>pgslookandfeel</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>keytool-api-1.7</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.jdesktop</groupId>
<artifactId>beansbinding</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>unknown.binary</groupId>
<artifactId>AbsoluteLayout</artifactId>
<version>SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<version>1.0-beta-7</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<name>SeSim</name>
<repositories>
<repository>
<id>unknown-jars-temp-repo</id>
<name>A temporary repository created by NetBeans for libraries and jars it could not identify. Please replace the dependencies in this repository with correct ones and delete this repository.</name>
<url>file:${project.basedir}/lib</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<version>1.0-beta-7</version>
<artifactId>webstart-maven-plugin</artifactId>
<configuration>
<jnlp>
<mainClass>com.cauwersin.SeSim.gui.NewMDIApplication</mainClass>
</jnlp>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -340,7 +340,7 @@
<Component class="javax.swing.JButton" name="stopButton">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/toolbarButtonGraphics/general/Stop24.gif"/>
<Image iconType="3" name="/resources/icons/stop.gif"/>
</Property>
<Property name="text" type="java.lang.String" value="Stop"/>
<Property name="focusable" type="boolean" value="false"/>
@ -359,7 +359,7 @@
</FontInfo>
</Property>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/run.gif"/>
<Image iconType="3" name="/resources/icons/run.gif"/>
</Property>
<Property name="text" type="java.lang.String" value="Run sim!"/>
<Property name="toolTipText" type="java.lang.String" value="Run the simmulation"/>
@ -374,7 +374,7 @@
<Component class="javax.swing.JButton" name="jButton2">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/pause.gif"/>
<Image iconType="3" name="/resources/icons/pause.gif"/>
</Property>
<Property name="text" type="java.lang.String" value="Pause"/>
<Property name="focusable" type="boolean" value="false"/>

View File

@ -210,7 +210,7 @@ public class NewMDIApplication extends javax.swing.JFrame {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(640, 480));
stopButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/toolbarButtonGraphics/general/Stop24.gif"))); // NOI18N
stopButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/icons/stop.gif"))); // NOI18N
stopButton.setText("Stop");
stopButton.setFocusable(false);
stopButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
@ -222,7 +222,7 @@ public class NewMDIApplication extends javax.swing.JFrame {
});
runButton.setFont(runButton.getFont());
runButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/run.gif"))); // NOI18N
runButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/icons/run.gif"))); // NOI18N
runButton.setText("Run sim!");
runButton.setToolTipText("Run the simmulation");
runButton.setFocusable(false);
@ -234,7 +234,7 @@ public class NewMDIApplication extends javax.swing.JFrame {
}
});
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/pause.gif"))); // NOI18N
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/icons/pause.gif"))); // NOI18N
jButton2.setText("Pause");
jButton2.setFocusable(false);
jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

35
src/gui/Statistics.form Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder/>
</Border>
</Property>
</Properties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="380" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="280" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Form>

67
src/gui/Statistics.java Normal file
View File

@ -0,0 +1,67 @@
/*
* Copyright (c) 2017, 7u83 <7u83@mail.ru>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package gui;
/**
*
* @author 7u83 <7u83@mail.ru>
*/
public class Statistics extends javax.swing.JPanel {
/**
* Creates new form Statistics
*/
public Statistics() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setBorder(javax.swing.BorderFactory.createTitledBorder(""));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 380, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 280, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}

View File

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 272 B

View File

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 247 B

View File

Before

Width:  |  Height:  |  Size: 777 B

After

Width:  |  Height:  |  Size: 777 B

Some files were not shown because too many files have changed in this diff Show More