setup maven project
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
b47804c51a
commit
332973fedf
78
pom.xml
Normal file
78
pom.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?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>sig</groupId>
|
||||
<artifactId>ffxivai</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<name>ffxivai</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.1stleg</groupId>
|
||||
<artifactId>jnativehook</artifactId>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
||||
<plugins>
|
||||
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
7
run
7
run
@ -1,5 +1,2 @@
|
||||
javac --release 8 src/sig/*.java -d bin
|
||||
cd bin
|
||||
jar cfe ../ffxivai.jar sig.FFXIV sig
|
||||
cd ..
|
||||
java -cp bin sig/FFXIV
|
||||
mvn package
|
||||
java -cp target/ffxivai-1.0.jar main.java.sig.App
|
@ -1,4 +1,4 @@
|
||||
package sig;
|
||||
package main.java.sig;
|
||||
|
||||
import java.awt.AWTException;
|
||||
import java.awt.Robot;
|
||||
@ -6,15 +6,22 @@ import java.awt.GraphicsEnvironment;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
|
||||
public class FFXIV{
|
||||
import javax.swing.JFrame;
|
||||
|
||||
public class App{
|
||||
public static double FRAMETIME=0;
|
||||
public static Robot r;
|
||||
public static JFrame f;
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
r = new Robot();
|
||||
} catch (AWTException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
RunInitialAnalysis();
|
||||
f = new JFrame("FFXIV AI");
|
||||
}
|
||||
private static void RunInitialAnalysis() {
|
||||
long startTime = System.nanoTime();
|
||||
for (int i=0;i<60;i++) {
|
||||
try {
|
||||
@ -28,7 +35,6 @@ public class FFXIV{
|
||||
if (60/FRAMETIME<10) {
|
||||
System.out.println(" WARNING!! For best performance, it's highly recommended to use this on a computer that can compute at least 10 frames per second!");
|
||||
}
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
private static BufferedImage CaptureScreen() throws IOException {
|
||||
BufferedImage screenshot = r.createScreenCapture(GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds());
|
20
src/test/java/sig/AppTest.java
Normal file
20
src/test/java/sig/AppTest.java
Normal file
@ -0,0 +1,20 @@
|
||||
package sig;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
{
|
||||
/**
|
||||
* Rigorous Test :-)
|
||||
*/
|
||||
@Test
|
||||
public void shouldAnswerWithTrue()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
BIN
target/classes/main/java/sig/App.class
Normal file
BIN
target/classes/main/java/sig/App.class
Normal file
Binary file not shown.
BIN
target/ffxivai-1.0-SNAPSHOT.jar
Normal file
BIN
target/ffxivai-1.0-SNAPSHOT.jar
Normal file
Binary file not shown.
BIN
target/ffxivai-1.0.jar
Normal file
BIN
target/ffxivai-1.0.jar
Normal file
Binary file not shown.
4
target/maven-archiver/pom.properties
Normal file
4
target/maven-archiver/pom.properties
Normal file
@ -0,0 +1,4 @@
|
||||
#Created by Apache Maven 3.8.1
|
||||
groupId=sig
|
||||
artifactId=ffxivai
|
||||
version=1.0
|
@ -0,0 +1 @@
|
||||
main/java/sig/App.class
|
@ -0,0 +1 @@
|
||||
/workspace/ffxivai/src/main/java/sig/App.java
|
@ -0,0 +1 @@
|
||||
sig/AppTest.class
|
@ -0,0 +1 @@
|
||||
/workspace/ffxivai/src/test/java/sig/AppTest.java
|
@ -0,0 +1,3 @@
|
||||
# Created at 2021-10-05T00:35:45.115
|
||||
Picked up JAVA_TOOL_OPTIONS: -Xmx1879m
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Created at 2021-10-05T00:36:26.369
|
||||
Picked up JAVA_TOOL_OPTIONS: -Xmx1879m
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Created at 2021-10-05T00:38:01.858
|
||||
Picked up JAVA_TOOL_OPTIONS: -Xmx1879m
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Created at 2021-10-05T00:39:02.461
|
||||
Picked up JAVA_TOOL_OPTIONS: -Xmx1879m
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Created at 2021-10-05T00:39:23.864
|
||||
Picked up JAVA_TOOL_OPTIONS: -Xmx1879m
|
||||
|
@ -0,0 +1,3 @@
|
||||
# Created at 2021-10-05T00:41:13.741
|
||||
Picked up JAVA_TOOL_OPTIONS: -Xmx1879m
|
||||
|
62
target/surefire-reports/TEST-sig.AppTest.xml
Normal file
62
target/surefire-reports/TEST-sig.AppTest.xml
Normal file
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="sig.AppTest" time="0.025" tests="1" errors="0" skipped="0" failures="0">
|
||||
<properties>
|
||||
<property name="awt.toolkit" value="sun.awt.X11.XToolkit"/>
|
||||
<property name="java.specification.version" value="11"/>
|
||||
<property name="sun.cpu.isalist" value=""/>
|
||||
<property name="sun.jnu.encoding" value="UTF-8"/>
|
||||
<property name="java.class.path" value="/workspace/ffxivai/target/test-classes:/workspace/ffxivai/target/classes:/workspace/m2-repository/junit/junit/4.11/junit-4.11.jar:/workspace/m2-repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/workspace/m2-repository/com/1stleg/jnativehook/2.1.0/jnativehook-2.1.0.jar:"/>
|
||||
<property name="java.vm.vendor" value="Azul Systems, Inc."/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.vendor.url" value="http://www.azul.com/"/>
|
||||
<property name="user.timezone" value=""/>
|
||||
<property name="java.vm.specification.version" value="11"/>
|
||||
<property name="os.name" value="Linux"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="user.country" value="US"/>
|
||||
<property name="sun.boot.library.path" value="/home/gitpod/.sdkman/candidates/java/11.0.12.fx-zulu/lib"/>
|
||||
<property name="sun.java.command" value="/workspace/ffxivai/target/surefire/surefirebooter9651881617294522049.jar /workspace/ffxivai/target/surefire 2021-10-05T00-41-13_566-jvmRun1 surefire16651463831520907244tmp surefire_017591263050369366149tmp"/>
|
||||
<property name="jdk.debug" value="release"/>
|
||||
<property name="surefire.test.class.path" value="/workspace/ffxivai/target/test-classes:/workspace/ffxivai/target/classes:/workspace/m2-repository/junit/junit/4.11/junit-4.11.jar:/workspace/m2-repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/workspace/m2-repository/com/1stleg/jnativehook/2.1.0/jnativehook-2.1.0.jar:"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="user.home" value="/home/gitpod"/>
|
||||
<property name="user.language" value="en"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="java.version.date" value="2021-07-20"/>
|
||||
<property name="java.home" value="/home/gitpod/.sdkman/candidates/java/11.0.12.fx-zulu"/>
|
||||
<property name="file.separator" value="/"/>
|
||||
<property name="basedir" value="/workspace/ffxivai"/>
|
||||
<property name="java.vm.compressedOopsMode" value="32-bit"/>
|
||||
<property name="line.separator" value=" "/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="jdk.vendor.version" value="Zulu11.50+19-CA"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.X11GraphicsEnvironment"/>
|
||||
<property name="surefire.real.class.path" value="/workspace/ffxivai/target/surefire/surefirebooter9651881617294522049.jar"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="java.runtime.version" value="11.0.12+7-LTS"/>
|
||||
<property name="user.name" value="gitpod"/>
|
||||
<property name="path.separator" value=":"/>
|
||||
<property name="os.version" value="5.4.0-1051-gke"/>
|
||||
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
|
||||
<property name="file.encoding" value="UTF-8"/>
|
||||
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
|
||||
<property name="java.vendor.version" value="Zulu11.50+19-CA"/>
|
||||
<property name="localRepository" value="/workspace/m2-repository"/>
|
||||
<property name="java.vendor.url.bug" value="http://www.azul.com/support/"/>
|
||||
<property name="java.io.tmpdir" value="/tmp"/>
|
||||
<property name="java.version" value="11.0.12"/>
|
||||
<property name="user.dir" value="/workspace/ffxivai"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="java.awt.printerjob" value="sun.print.PSPrinterJob"/>
|
||||
<property name="sun.os.patch.level" value="unknown"/>
|
||||
<property name="java.library.path" value="/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.vendor" value="Azul Systems, Inc."/>
|
||||
<property name="java.vm.version" value="11.0.12+7-LTS"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="java.class.version" value="55.0"/>
|
||||
</properties>
|
||||
<testcase name="shouldAnswerWithTrue" classname="sig.AppTest" time="0.002"/>
|
||||
</testsuite>
|
4
target/surefire-reports/sig.AppTest.txt
Normal file
4
target/surefire-reports/sig.AppTest.txt
Normal file
@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: sig.AppTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 s - in sig.AppTest
|
BIN
target/test-classes/sig/AppTest.class
Normal file
BIN
target/test-classes/sig/AppTest.class
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user