I constructed basic scaffolding.
parent
5898a9c318
commit
0252245893
|
@ -0,0 +1,53 @@
|
||||||
|
<?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. --><project name="MobiReader" default="default" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
|
||||||
|
<description>Builds, tests, and runs the project MobiReader.</description>
|
||||||
|
<import file="nbproject/build-impl.xml"/>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
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. Those of them relevant for JavaFX project 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-test: called before javac compilation of JUnit tests
|
||||||
|
-post-compile-test: called after javac compilation of JUnit tests
|
||||||
|
-pre-jfx-jar: called before FX SDK specific <fx:jar> task
|
||||||
|
-post-jfx-jar: called after FX SDK specific <fx:jar> task
|
||||||
|
-pre-jfx-deploy: called before FX SDK specific <fx:deploy> task
|
||||||
|
-post-jfx-deploy: called after FX SDK specific <fx:deploy> task
|
||||||
|
-pre-jfx-native: called just after -pre-jfx-deploy if <fx:deploy> runs in native packaging mode
|
||||||
|
-post-jfx-native: called just after -post-jfx-deploy if <fx:deploy> runs in native packaging mode
|
||||||
|
-post-clean: called after cleaning build products
|
||||||
|
|
||||||
|
(Targets beginning with '-' are not intended to be called on their own.)
|
||||||
|
|
||||||
|
Example of inserting a HTML postprocessor after javaFX SDK deployment:
|
||||||
|
|
||||||
|
<target name="-post-jfx-deploy">
|
||||||
|
<basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
|
||||||
|
<property name="jfx.deployment.html" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.html"/>
|
||||||
|
<custompostprocess>
|
||||||
|
<fileset dir="${jfx.deployment.html}"/>
|
||||||
|
</custompostprocess>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
Example of calling an Ant task from JavaFX SDK. Note that access to JavaFX SDK Ant tasks must be
|
||||||
|
initialized; to ensure this is done add the dependence on -check-jfx-sdk-version target:
|
||||||
|
|
||||||
|
<target name="-post-jfx-jar" depends="-check-jfx-sdk-version">
|
||||||
|
<echo message="Calling jar task from JavaFX SDK"/>
|
||||||
|
<fx:jar ...>
|
||||||
|
...
|
||||||
|
</fx:jar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
For more details about JavaFX SDK Ant tasks go to
|
||||||
|
http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm
|
||||||
|
|
||||||
|
For list of available properties check the files
|
||||||
|
nbproject/build-impl.xml and nbproject/jfx-impl.xml.
|
||||||
|
|
||||||
|
-->
|
||||||
|
</project>
|
|
@ -0,0 +1,3 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
X-COMMENT: Main-Class will be added automatically by build
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
||||||
|
# Do not modify this property in this configuration. It can be re-generated.
|
||||||
|
$label=Run as WebStart
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Do not modify this property in this configuration. It can be re-generated.
|
||||||
|
$label=Run in Browser
|
|
@ -0,0 +1,8 @@
|
||||||
|
build.xml.data.CRC32=14d4ff44
|
||||||
|
build.xml.script.CRC32=df09ec1e
|
||||||
|
build.xml.stylesheet.CRC32=28e38971@1.56.1.46
|
||||||
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
|
nbproject/build-impl.xml.data.CRC32=14d4ff44
|
||||||
|
nbproject/build-impl.xml.script.CRC32=52668f5e
|
||||||
|
nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,109 @@
|
||||||
|
annotation.processing.enabled=true
|
||||||
|
annotation.processing.enabled.in.editor=false
|
||||||
|
annotation.processing.processor.options=
|
||||||
|
annotation.processing.processors.list=
|
||||||
|
annotation.processing.run.all.processors=true
|
||||||
|
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
||||||
|
application.title=MobiReader
|
||||||
|
application.vendor=att
|
||||||
|
build.classes.dir=${build.dir}/classes
|
||||||
|
build.classes.excludes=**/*.java,**/*.form
|
||||||
|
# This directory is removed when the project is cleaned:
|
||||||
|
build.dir=build
|
||||||
|
build.generated.dir=${build.dir}/generated
|
||||||
|
build.generated.sources.dir=${build.dir}/generated-sources
|
||||||
|
# Only compile against the classpath explicitly listed here:
|
||||||
|
build.sysclasspath=ignore
|
||||||
|
build.test.classes.dir=${build.dir}/test/classes
|
||||||
|
build.test.results.dir=${build.dir}/test/results
|
||||||
|
compile.on.save=true
|
||||||
|
compile.on.save.unsupported.javafx=true
|
||||||
|
# Uncomment to specify the preferred debugger connection transport:
|
||||||
|
#debug.transport=dt_socket
|
||||||
|
debug.classpath=\
|
||||||
|
${run.classpath}
|
||||||
|
debug.test.classpath=\
|
||||||
|
${run.test.classpath}
|
||||||
|
# This directory is removed when the project is cleaned:
|
||||||
|
dist.dir=dist
|
||||||
|
dist.jar=${dist.dir}/MobiReader.jar
|
||||||
|
dist.javadoc.dir=${dist.dir}/javadoc
|
||||||
|
endorsed.classpath=
|
||||||
|
excludes=
|
||||||
|
includes=**
|
||||||
|
# Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects
|
||||||
|
jar.archive.disabled=true
|
||||||
|
jar.compress=false
|
||||||
|
javac.classpath=\
|
||||||
|
${javafx.runtime}/lib/jfxrt.jar:\
|
||||||
|
${javafx.runtime}/lib/deploy.jar:\
|
||||||
|
${javafx.runtime}/lib/javaws.jar:\
|
||||||
|
${javafx.runtime}/lib/plugin.jar
|
||||||
|
# Space-separated list of extra javac options
|
||||||
|
javac.compilerargs=
|
||||||
|
javac.deprecation=false
|
||||||
|
javac.processorpath=\
|
||||||
|
${javac.classpath}
|
||||||
|
javac.source=1.7
|
||||||
|
javac.target=1.7
|
||||||
|
javac.test.classpath=\
|
||||||
|
${javac.classpath}:\
|
||||||
|
${build.classes.dir}:\
|
||||||
|
${libs.junit_4.classpath}
|
||||||
|
javac.test.processorpath=\
|
||||||
|
${javac.test.classpath}
|
||||||
|
javadoc.additionalparam=
|
||||||
|
javadoc.author=false
|
||||||
|
javadoc.encoding=${source.encoding}
|
||||||
|
javadoc.noindex=false
|
||||||
|
javadoc.nonavbar=false
|
||||||
|
javadoc.notree=false
|
||||||
|
javadoc.private=false
|
||||||
|
javadoc.splitindex=true
|
||||||
|
javadoc.use=true
|
||||||
|
javadoc.version=false
|
||||||
|
javadoc.windowtitle=
|
||||||
|
javafx.binarycss=false
|
||||||
|
javafx.deploy.allowoffline=true
|
||||||
|
# If true, application update mode is set to 'background', if false, update mode is set to 'eager'
|
||||||
|
javafx.deploy.backgroundupdate=false
|
||||||
|
javafx.deploy.embedJNLP=true
|
||||||
|
javafx.deploy.includeDT=true
|
||||||
|
# Set true to prevent creation of temporary copy of deployment artifacts before each run (disables concurrent runs)
|
||||||
|
javafx.disable.concurrent.runs=false
|
||||||
|
# Set true to enable multiple concurrent runs of the same WebStart or Run-in-Browser project
|
||||||
|
javafx.enable.concurrent.external.runs=false
|
||||||
|
# This is a JavaFX project
|
||||||
|
javafx.enabled=true
|
||||||
|
javafx.fallback.class=com.javafx.main.NoJavaFXFallback
|
||||||
|
# Main class for JavaFX
|
||||||
|
javafx.main.class=mobireader.MobiReader
|
||||||
|
javafx.preloader.class=
|
||||||
|
# This project does not use Preloader
|
||||||
|
javafx.preloader.enabled=false
|
||||||
|
javafx.preloader.jar.filename=
|
||||||
|
javafx.preloader.jar.path=
|
||||||
|
javafx.preloader.project.path=
|
||||||
|
javafx.preloader.type=none
|
||||||
|
# Set true for GlassFish only. Rebases manifest classpaths of JARs in lib dir. Not usable with signed JARs.
|
||||||
|
javafx.rebase.libs=false
|
||||||
|
javafx.run.height=600
|
||||||
|
javafx.run.width=800
|
||||||
|
javafx.runtime=${platforms.Default_JavaFX_Platform.javafx.runtime.home}
|
||||||
|
javafx.sdk=${platforms.Default_JavaFX_Platform.javafx.sdk.home}
|
||||||
|
# Pre-JavaFX 2.0 WebStart is deactivated in JavaFX 2.0+ projects
|
||||||
|
jnlp.enabled=false
|
||||||
|
# Main class for Java launcher
|
||||||
|
main.class=com.javafx.main.Main
|
||||||
|
manifest.file=manifest.mf
|
||||||
|
meta.inf.dir=${src.dir}/META-INF
|
||||||
|
platform.active=Default_JavaFX_Platform
|
||||||
|
run.classpath=\
|
||||||
|
${dist.jar}:\
|
||||||
|
${javac.classpath}
|
||||||
|
run.test.classpath=\
|
||||||
|
${javac.test.classpath}:\
|
||||||
|
${build.test.classes.dir}
|
||||||
|
source.encoding=UTF-8
|
||||||
|
src.dir=src
|
||||||
|
test.src.dir=test
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
|
<type>org.netbeans.modules.java.j2seproject</type>
|
||||||
|
<configuration>
|
||||||
|
<buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1">
|
||||||
|
<extension file="jfx-impl.xml" id="jfx">
|
||||||
|
<dependency dependsOn="-check-javafx" target="-init-check"/>
|
||||||
|
<dependency dependsOn="-jfx-copylibs" target="-post-jar"/>
|
||||||
|
<dependency dependsOn="-rebase-libs" target="-post-jar"/>
|
||||||
|
<dependency dependsOn="jfx-deployment" target="-post-jar"/>
|
||||||
|
<dependency dependsOn="jar" target="debug"/>
|
||||||
|
<dependency dependsOn="-jfx-copylibs" target="jar"/>
|
||||||
|
<dependency dependsOn="-rebase-libs" target="jar"/>
|
||||||
|
<dependency dependsOn="jar" target="profile"/>
|
||||||
|
<dependency dependsOn="jar" target="run"/>
|
||||||
|
</extension>
|
||||||
|
</buildExtensions>
|
||||||
|
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
|
<name>MobiReader</name>
|
||||||
|
<explicit-platform explicit-source-supported="true"/>
|
||||||
|
<source-roots>
|
||||||
|
<root id="src.dir"/>
|
||||||
|
</source-roots>
|
||||||
|
<test-roots>
|
||||||
|
<root id="test.src.dir"/>
|
||||||
|
</test-roots>
|
||||||
|
</data>
|
||||||
|
</configuration>
|
||||||
|
</project>
|
|
@ -0,0 +1,38 @@
|
||||||
|
package mobireader;
|
||||||
|
|
||||||
|
import javafx.application.Application;
|
||||||
|
import javafx.event.ActionEvent;
|
||||||
|
import javafx.event.EventHandler;
|
||||||
|
import javafx.scene.Scene;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.layout.StackPane;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
|
|
||||||
|
public class MobiReader extends Application {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void start(Stage primaryStage) {
|
||||||
|
Button btn = new Button();
|
||||||
|
btn.setText("Display help");
|
||||||
|
btn.setOnAction(new EventHandler<ActionEvent>() {
|
||||||
|
@Override
|
||||||
|
public void handle(ActionEvent event) {
|
||||||
|
System.out.println("Read the docs! Trololo.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
StackPane root = new StackPane();
|
||||||
|
root.getChildren().add(btn);
|
||||||
|
|
||||||
|
Scene scene = new Scene(root, 300, 250);
|
||||||
|
|
||||||
|
primaryStage.setTitle("Hello World!");
|
||||||
|
primaryStage.setScene(scene);
|
||||||
|
primaryStage.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
launch(args);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
package tests;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.AfterClass;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
import org.junit.Test;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|
||||||
|
public class UnzippingJUnitTest {
|
||||||
|
|
||||||
|
public UnzippingJUnitTest() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpClass() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownClass() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void tearDown() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBullshit() {
|
||||||
|
assertEquals("10 equals 11", 10, 11);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTruth() {
|
||||||
|
assertEquals("10 does not equal 10", 10, 10);
|
||||||
|
}
|
||||||
|
// TODO add test methods here.
|
||||||
|
// The methods must be annotated with annotation @Test. For example:
|
||||||
|
//
|
||||||
|
// @Test
|
||||||
|
// public void hello() {}
|
||||||
|
}
|
Loading…
Reference in New Issue