setup maven project

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
Nic0Nic0Nii 3 years ago
parent b47804c51a
commit 332973fedf
  1. 78
      pom.xml
  2. 7
      run
  3. 12
      src/main/java/sig/App.java
  4. 20
      src/test/java/sig/AppTest.java
  5. BIN
      target/classes/main/java/sig/App.class
  6. BIN
      target/ffxivai-1.0-SNAPSHOT.jar
  7. BIN
      target/ffxivai-1.0.jar
  8. 4
      target/maven-archiver/pom.properties
  9. 1
      target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  10. 1
      target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  11. 1
      target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
  12. 1
      target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
  13. 3
      target/surefire-reports/2021-10-05T00-35-44_836.dumpstream
  14. 3
      target/surefire-reports/2021-10-05T00-36-26_156.dumpstream
  15. 3
      target/surefire-reports/2021-10-05T00-38-01_660.dumpstream
  16. 3
      target/surefire-reports/2021-10-05T00-39-02_258.dumpstream
  17. 3
      target/surefire-reports/2021-10-05T00-39-23_633.dumpstream
  18. 3
      target/surefire-reports/2021-10-05T00-41-13_566.dumpstream
  19. 62
      target/surefire-reports/TEST-sig.AppTest.xml
  20. 4
      target/surefire-reports/sig.AppTest.txt
  21. BIN
      target/test-classes/sig/AppTest.class

@ -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

@ -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());

@ -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 );
}
}

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
#Created by Apache Maven 3.8.1
groupId=sig
artifactId=ffxivai
version=1.0

@ -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

@ -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="&#10;"/>
<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>

@ -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
Loading…
Cancel
Save