From a8889f2233ed42ee15a4e1f5ec31071a72738bde Mon Sep 17 00:00:00 2001 From: Gregor Riegler Date: Fri, 19 Apr 2013 15:42:48 +0200 Subject: [PATCH] Import Maven Skeleton Project. Make Cook and Waiter executable by Maven plugin --- .classpath | 36 ++++++++++++++ .gitignore | 6 +-- .project | 23 +++++++++ .settings/org.eclipse.core.resources.prefs | 6 +++ .settings/org.eclipse.jdt.core.prefs | 5 ++ .settings/org.eclipse.m2e.core.prefs | 4 ++ README.md | 8 ++++ pom.xml | 47 +++++++++++++++++++ .../ac/tuwien/sbc/valesriegler/cook/Cook.java | 18 +++++++ .../sbc/valesriegler/waiter/Waiter.java | 19 ++++++++ 10 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 .settings/org.eclipse.m2e.core.prefs create mode 100644 README.md create mode 100644 pom.xml create mode 100644 src/main/java/at/ac/tuwien/sbc/valesriegler/cook/Cook.java create mode 100644 src/main/java/at/ac/tuwien/sbc/valesriegler/waiter/Waiter.java diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..534b5e5 --- /dev/null +++ b/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore index 4b4256a..175d85b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,9 @@ ### Android development ### #local.properties -.classpath -.project -.settings/* +#.classpath +#.project +#.settings/* #gen/* #bin/* target/* diff --git a/.project b/.project new file mode 100644 index 0000000..29f98dc --- /dev/null +++ b/.project @@ -0,0 +1,23 @@ + + + vales-riegler + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..29abf99 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..60105c1 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/README.md b/README.md new file mode 100644 index 0000000..b893ac9 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +Space Based Computing SS 2013 +================== + +### How to start a Waiter with Id 1 + mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.waiter.Waiter" -Dexec.args="1" + +### How to start a Cook with Id 1 + mvn exec:java -Dexec.mainClass="at.ac.tuwien.sbc.valesriegler.cook.Cook" -Dexec.args="1" \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..cfb056a --- /dev/null +++ b/pom.xml @@ -0,0 +1,47 @@ + + 4.0.0 + at.ac.tuwien.sbc + vales-riegler + 0.0.1-SNAPSHOT + + + UTF-8 + + + + + org.slf4j + slf4j-api + 1.6.6 + + + ch.qos.logback + logback-classic + 1.0.7 + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + + + + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + + + + + + + \ No newline at end of file diff --git a/src/main/java/at/ac/tuwien/sbc/valesriegler/cook/Cook.java b/src/main/java/at/ac/tuwien/sbc/valesriegler/cook/Cook.java new file mode 100644 index 0000000..56c7a90 --- /dev/null +++ b/src/main/java/at/ac/tuwien/sbc/valesriegler/cook/Cook.java @@ -0,0 +1,18 @@ +package at.ac.tuwien.sbc.valesriegler.cook; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Cook { + private static final Logger log = LoggerFactory.getLogger(Cook.class); + + public static void main(String[] args) { + if (args.length != 1) { + throw new IllegalArgumentException("Cook needs exactly one parameter: ID"); + } + + int id = Integer.parseInt(args[0]); + log.info("I AM A COOK WITH ID {}", id); + } + +} diff --git a/src/main/java/at/ac/tuwien/sbc/valesriegler/waiter/Waiter.java b/src/main/java/at/ac/tuwien/sbc/valesriegler/waiter/Waiter.java new file mode 100644 index 0000000..4562a27 --- /dev/null +++ b/src/main/java/at/ac/tuwien/sbc/valesriegler/waiter/Waiter.java @@ -0,0 +1,19 @@ +package at.ac.tuwien.sbc.valesriegler.waiter; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Waiter { + private static final Logger log = LoggerFactory.getLogger(Waiter.class); + + public static void main(String[] args) { + if(args.length != 1) { + throw new IllegalArgumentException("Waiter needs exactly one parameter: ID"); + } + + int id = Integer.parseInt(args[0]); + log.info("I AM A WAITER WITH ID {}", id); + + } + +} -- 2.43.0