From 94f5c22121b682835e9232bc87d708278ccde772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 27 Feb 2017 21:49:39 +0100 Subject: java : project : follow maven's std directory layout --- java/project/README | 1 + java/project/build.xml | 8 ++--- java/project/src/main/ch/asynk/Main.java | 22 -------------- java/project/src/main/ch/asynk/MyClass.java | 25 ---------------- java/project/src/main/ch/asynk/MyException.java | 11 ------- java/project/src/main/java/ch/asynk/Main.java | 22 ++++++++++++++ java/project/src/main/java/ch/asynk/MyClass.java | 25 ++++++++++++++++ .../src/main/java/ch/asynk/MyException.java | 11 +++++++ .../src/main/resources/Application.properties | 3 ++ java/project/src/main/resources/logback-test.xml | 34 ++++++++++++++++++++++ java/project/src/resources/Application.properties | 3 -- java/project/src/resources/logback-test.xml | 34 ---------------------- 12 files changed, 100 insertions(+), 99 deletions(-) create mode 100644 java/project/README delete mode 100644 java/project/src/main/ch/asynk/Main.java delete mode 100644 java/project/src/main/ch/asynk/MyClass.java delete mode 100644 java/project/src/main/ch/asynk/MyException.java create mode 100644 java/project/src/main/java/ch/asynk/Main.java create mode 100644 java/project/src/main/java/ch/asynk/MyClass.java create mode 100644 java/project/src/main/java/ch/asynk/MyException.java create mode 100644 java/project/src/main/resources/Application.properties create mode 100644 java/project/src/main/resources/logback-test.xml delete mode 100644 java/project/src/resources/Application.properties delete mode 100644 java/project/src/resources/logback-test.xml diff --git a/java/project/README b/java/project/README new file mode 100644 index 0000000..39331f1 --- /dev/null +++ b/java/project/README @@ -0,0 +1 @@ +http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html diff --git a/java/project/build.xml b/java/project/build.xml index 0134266..d2788ee 100644 --- a/java/project/build.xml +++ b/java/project/build.xml @@ -5,7 +5,7 @@ default="test"> - + @@ -13,7 +13,7 @@ - + @@ -120,7 +120,7 @@ - + @@ -130,7 +130,7 @@ - + diff --git a/java/project/src/main/ch/asynk/Main.java b/java/project/src/main/ch/asynk/Main.java deleted file mode 100644 index bb187bf..0000000 --- a/java/project/src/main/ch/asynk/Main.java +++ /dev/null @@ -1,22 +0,0 @@ -package ch.asynk; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class Main -{ - private static Logger logger = null; - - public static void main(String [] args ) - { - logger = LoggerFactory.getLogger(Main.class); - System.out.println("System.out"); - System.err.println("System.err"); - logger.trace("trace"); - logger.debug("debug"); - logger.info("info"); - logger.warn("warn"); - logger.error("error"); - System.exit(0); - } -} diff --git a/java/project/src/main/ch/asynk/MyClass.java b/java/project/src/main/ch/asynk/MyClass.java deleted file mode 100644 index 57ef46f..0000000 --- a/java/project/src/main/ch/asynk/MyClass.java +++ /dev/null @@ -1,25 +0,0 @@ -package ch.asynk; - -import lombok.Getter; - -public class MyClass -{ - static private String msg = "Hello World"; - - private @Getter int n; - - public MyClass() - { - n = 666; - } - - public void print() - { - System.err.println(msg); - } - - public void exception() throws MyException - { - throw new MyException("it's mine"); - } -} diff --git a/java/project/src/main/ch/asynk/MyException.java b/java/project/src/main/ch/asynk/MyException.java deleted file mode 100644 index 06203ae..0000000 --- a/java/project/src/main/ch/asynk/MyException.java +++ /dev/null @@ -1,11 +0,0 @@ -package ch.asynk; - -public class MyException extends Exception -{ - private static final long serialVersionUID = 01235; - - public MyException(String message) - { - super(message); - } -} diff --git a/java/project/src/main/java/ch/asynk/Main.java b/java/project/src/main/java/ch/asynk/Main.java new file mode 100644 index 0000000..bb187bf --- /dev/null +++ b/java/project/src/main/java/ch/asynk/Main.java @@ -0,0 +1,22 @@ +package ch.asynk; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Main +{ + private static Logger logger = null; + + public static void main(String [] args ) + { + logger = LoggerFactory.getLogger(Main.class); + System.out.println("System.out"); + System.err.println("System.err"); + logger.trace("trace"); + logger.debug("debug"); + logger.info("info"); + logger.warn("warn"); + logger.error("error"); + System.exit(0); + } +} diff --git a/java/project/src/main/java/ch/asynk/MyClass.java b/java/project/src/main/java/ch/asynk/MyClass.java new file mode 100644 index 0000000..57ef46f --- /dev/null +++ b/java/project/src/main/java/ch/asynk/MyClass.java @@ -0,0 +1,25 @@ +package ch.asynk; + +import lombok.Getter; + +public class MyClass +{ + static private String msg = "Hello World"; + + private @Getter int n; + + public MyClass() + { + n = 666; + } + + public void print() + { + System.err.println(msg); + } + + public void exception() throws MyException + { + throw new MyException("it's mine"); + } +} diff --git a/java/project/src/main/java/ch/asynk/MyException.java b/java/project/src/main/java/ch/asynk/MyException.java new file mode 100644 index 0000000..06203ae --- /dev/null +++ b/java/project/src/main/java/ch/asynk/MyException.java @@ -0,0 +1,11 @@ +package ch.asynk; + +public class MyException extends Exception +{ + private static final long serialVersionUID = 01235; + + public MyException(String message) + { + super(message); + } +} diff --git a/java/project/src/main/resources/Application.properties b/java/project/src/main/resources/Application.properties new file mode 100644 index 0000000..34430cd --- /dev/null +++ b/java/project/src/main/resources/Application.properties @@ -0,0 +1,3 @@ +app.logfile=MyApp.log +app.version=0.0.1 +app.env=DEV diff --git a/java/project/src/main/resources/logback-test.xml b/java/project/src/main/resources/logback-test.xml new file mode 100644 index 0000000..7f49e52 --- /dev/null +++ b/java/project/src/main/resources/logback-test.xml @@ -0,0 +1,34 @@ + + + MyApp + + + + + + + + + + + + + + + + ${LOG_PATTERN} + + + + + ${LOG_FILE} + + ${LOG_PATTERN} + + + + + + + + diff --git a/java/project/src/resources/Application.properties b/java/project/src/resources/Application.properties deleted file mode 100644 index 34430cd..0000000 --- a/java/project/src/resources/Application.properties +++ /dev/null @@ -1,3 +0,0 @@ -app.logfile=MyApp.log -app.version=0.0.1 -app.env=DEV diff --git a/java/project/src/resources/logback-test.xml b/java/project/src/resources/logback-test.xml deleted file mode 100644 index 7f49e52..0000000 --- a/java/project/src/resources/logback-test.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - MyApp - - - - - - - - - - - - - - - - ${LOG_PATTERN} - - - - - ${LOG_FILE} - - ${LOG_PATTERN} - - - - - - - - -- cgit v1.1-2-g2b99