+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Build_History/data.json b/Build_History/data.json
new file mode 100644
index 00000000..2550e8a8
--- /dev/null
+++ b/Build_History/data.json
@@ -0,0 +1 @@
+[{"log":"[INFO] Scanning for projects... [INFO] [INFO] ----------------------< DD2480-Group-15:gs-maven >---------------------- [INFO] Building gs-maven 0.1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gs-maven --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ gs-maven --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ gs-maven --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ gs-maven --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ gs-maven --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running server.TestServer Calling dummyFunction [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 s - in server.TestServer [INFO] [INFO] Results: [INFO] [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ gs-maven --- [INFO] Building jar: /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/gs-maven-0.1.0.jar [INFO] [INFO] --- maven-shade-plugin:3.2.4:shade (default) @ gs-maven --- [INFO] Including org.eclipse.jetty:jetty-server:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including javax.servlet:servlet-api:jar:2.5 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-continuation:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-http:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-io:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-util:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.json:json:jar:20201115 in the shaded jar. [WARNING] gs-maven-0.1.0.jar, jetty-continuation-7.0.2.v20100331.jar, jetty-http-7.0.2.v20100331.jar, jetty-io-7.0.2.v20100331.jar, jetty-server-7.0.2.v20100331.jar, jetty-util-7.0.2.v20100331.jar, json-20201115.jar, servlet-api-2.5.jar define 1 overlapping resource: [WARNING] - META-INF/MANIFEST.MF [WARNING] jetty-continuation-7.0.2.v20100331.jar, jetty-http-7.0.2.v20100331.jar, jetty-io-7.0.2.v20100331.jar, jetty-server-7.0.2.v20100331.jar, jetty-util-7.0.2.v20100331.jar define 1 overlapping resource: [WARNING] - about.html [WARNING] maven-shade-plugin has detected that some class files are [WARNING] present in two or more JARs. When this happens, only one [WARNING] single version of the class is copied to the uber jar. [WARNING] Usually this is not harmful and you can skip these warnings, [WARNING] otherwise try to manually exclude artifacts based on [WARNING] mvn dependency:tree -Ddetail=true and the above output. [WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/ [INFO] Replacing original artifact with shaded artifact. [INFO] Replacing /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/gs-maven-0.1.0.jar with /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/gs-maven-0.1.0-shaded.jar [INFO] Dependency-reduced POM written at: /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/dependency-reduced-pom.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.660 s [INFO] Finished at: 2021-02-17T18:52:54+01:00 [INFO] ------------------------------------------------------------------------ ","SHA":"cd578476aaae3f8d5c23d6ab2e87ef93601ef6e7","Date":"2021-02-17T18:52:54+01:00"},{"log":"[INFO] Scanning for projects... [INFO] [INFO] ----------------------< DD2480-Group-15:gs-maven >---------------------- [INFO] Building gs-maven 0.1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gs-maven --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ gs-maven --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ gs-maven --- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ gs-maven --- [INFO] Changes detected - recompiling the module! [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 1 source file to /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ gs-maven --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running server.TestServer Calling dummyFunction [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s - in server.TestServer [INFO] [INFO] Results: [INFO] [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ gs-maven --- [INFO] Building jar: /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/gs-maven-0.1.0.jar [INFO] [INFO] --- maven-shade-plugin:3.2.4:shade (default) @ gs-maven --- [INFO] Including org.eclipse.jetty:jetty-server:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including javax.servlet:servlet-api:jar:2.5 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-continuation:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-http:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-io:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.eclipse.jetty:jetty-util:jar:7.0.2.v20100331 in the shaded jar. [INFO] Including org.json:json:jar:20201115 in the shaded jar. [WARNING] gs-maven-0.1.0.jar, jetty-continuation-7.0.2.v20100331.jar, jetty-http-7.0.2.v20100331.jar, jetty-io-7.0.2.v20100331.jar, jetty-server-7.0.2.v20100331.jar, jetty-util-7.0.2.v20100331.jar, json-20201115.jar, servlet-api-2.5.jar define 1 overlapping resource: [WARNING] - META-INF/MANIFEST.MF [WARNING] jetty-continuation-7.0.2.v20100331.jar, jetty-http-7.0.2.v20100331.jar, jetty-io-7.0.2.v20100331.jar, jetty-server-7.0.2.v20100331.jar, jetty-util-7.0.2.v20100331.jar define 1 overlapping resource: [WARNING] - about.html [WARNING] maven-shade-plugin has detected that some class files are [WARNING] present in two or more JARs. When this happens, only one [WARNING] single version of the class is copied to the uber jar. [WARNING] Usually this is not harmful and you can skip these warnings, [WARNING] otherwise try to manually exclude artifacts based on [WARNING] mvn dependency:tree -Ddetail=true and the above output. [WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/ [INFO] Replacing original artifact with shaded artifact. [INFO] Replacing /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/gs-maven-0.1.0.jar with /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/target/gs-maven-0.1.0-shaded.jar [INFO] Dependency-reduced POM written at: /Users/zehuag/IdeaProjects/historymy/ci-server/cloned-repo/dependency-reduced-pom.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.582 s [INFO] Finished at: 2021-02-17T18:53:54+01:00 [INFO] ------------------------------------------------------------------------ ","SHA":"ee22fad706519f89b6bce12be35ff04c0f859be9","Date":"2021-02-17T18:53:54+01:00"},{"log":"WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [\u001b[1;34mINFO\u001b[m] Scanning for projects... [\u001b[1;33mWARNING\u001b[m] [\u001b[1;33mWARNING\u001b[m] Some problems were encountered while building the effective model for DD2480-Group-15:gs-maven:jar:0.1.0 [\u001b[1;33mWARNING\u001b[m] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 104, column 21 [\u001b[1;33mWARNING\u001b[m] [\u001b[1;33mWARNING\u001b[m] It is highly recommended to fix these problems because they threaten the stability of your build. [\u001b[1;33mWARNING\u001b[m] [\u001b[1;33mWARNING\u001b[m] For this reason, future Maven versions might no longer support building such malformed projects. [\u001b[1;33mWARNING\u001b[m] [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m----------------------< \u001b[0;36mDD2480-Group-15:gs-maven\u001b[0;1m >----------------------\u001b[m [\u001b[1;34mINFO\u001b[m] \u001b[1mBuilding gs-maven 0.1.0\u001b[m [\u001b[1;34mINFO\u001b[m] \u001b[1m--------------------------------[ jar ]---------------------------------\u001b[m [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m--- \u001b[0;32mmaven-resources-plugin:2.6:resources\u001b[m \u001b[1m(default-resources)\u001b[m @ \u001b[36mgs-maven\u001b[0;1m ---\u001b[m [\u001b[1;33mWARNING\u001b[m] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [\u001b[1;34mINFO\u001b[m] skip non existing resourceDirectory /home/philip/kth-courses/se21/ci-server/cloned-repo/src/main/resources [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m--- \u001b[0;32mmaven-compiler-plugin:3.1:compile\u001b[m \u001b[1m(default-compile)\u001b[m @ \u001b[36mgs-maven\u001b[0;1m ---\u001b[m [\u001b[1;34mINFO\u001b[m] Changes detected - recompiling the module! [\u001b[1;33mWARNING\u001b[m] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [\u001b[1;34mINFO\u001b[m] Compiling 1 source file to /home/philip/kth-courses/se21/ci-server/cloned-repo/target/classes [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m--- \u001b[0;32mmaven-resources-plugin:2.6:testResources\u001b[m \u001b[1m(default-testResources)\u001b[m @ \u001b[36mgs-maven\u001b[0;1m ---\u001b[m [\u001b[1;33mWARNING\u001b[m] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [\u001b[1;34mINFO\u001b[m] skip non existing resourceDirectory /home/philip/kth-courses/se21/ci-server/cloned-repo/src/test/resources [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m--- \u001b[0;32mmaven-compiler-plugin:3.1:testCompile\u001b[m \u001b[1m(default-testCompile)\u001b[m @ \u001b[36mgs-maven\u001b[0;1m ---\u001b[m [\u001b[1;34mINFO\u001b[m] Changes detected - recompiling the module! [\u001b[1;33mWARNING\u001b[m] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [\u001b[1;34mINFO\u001b[m] Compiling 1 source file to /home/philip/kth-courses/se21/ci-server/cloned-repo/target/test-classes [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m--- \u001b[0;32mmaven-surefire-plugin:2.22.0:test\u001b[m \u001b[1m(default-test)\u001b[m @ \u001b[36mgs-maven\u001b[0;1m ---\u001b[m [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] ------------------------------------------------------- [\u001b[1;34mINFO\u001b[m] T E S T S [\u001b[1;34mINFO\u001b[m] ------------------------------------------------------- [\u001b[1;34mINFO\u001b[m] Running server.\u001b[1mTestServer\u001b[m Getting repository URL [\u001b[1;34mINFO\u001b[m] \u001b[1;32mTests run: \u001b[0;1;32m3\u001b[m, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 s - in server.\u001b[1mTestServer\u001b[m [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] Results: [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1;32mTests run: 3, Failures: 0, Errors: 0, Skipped: 0\u001b[m [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m--- \u001b[0;32mmaven-jar-plugin:2.4:jar\u001b[m \u001b[1m(default-jar)\u001b[m @ \u001b[36mgs-maven\u001b[0;1m ---\u001b[m [\u001b[1;34mINFO\u001b[m] Building jar: /home/philip/kth-courses/se21/ci-server/cloned-repo/target/gs-maven-0.1.0.jar [\u001b[1;34mINFO\u001b[m] [\u001b[1;34mINFO\u001b[m] \u001b[1m--- \u001b[0;32mmaven-shade-plugin:3.2.4:shade\u001b[m \u001b[1m(default)\u001b[m @ \u001b[36mgs-maven\u001b[0;1m ---\u001b[m [\u001b[1;34mINFO\u001b[m] Including org.eclipse.jetty:jetty-server:jar:7.0.2.v20100331 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including javax.servlet:servlet-api:jar:2.5 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.eclipse.jetty:jetty-continuation:jar:7.0.2.v20100331 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.eclipse.jetty:jetty-http:jar:7.0.2.v20100331 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.eclipse.jetty:jetty-io:jar:7.0.2.v20100331 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.eclipse.jetty:jetty-util:jar:7.0.2.v20100331 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.json:json:jar:20201115 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including commons-io:commons-io:jar:2.6 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.apache.httpcomponents:httpclient:jar:4.5.13 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.apache.httpcomponents:httpcore:jar:4.4.13 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including commons-logging:commons-logging:jar:1.2 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including commons-codec:commons-codec:jar:1.11 in the shaded jar. [\u001b[1;34mINFO\u001b[m] Including org.jsoup:jsoup:jar:1.10.2 in the shaded jar. [\u001b[1;33mWARNING\u001b[m] commons-codec-1.11.jar, commons-io-2.6.jar, commons-logging-1.2.jar, gs-maven-0.1.0.jar, httpclient-4.5.13.jar, httpcore-4.4.13.jar, jetty-continuation-7.0.2.v20100331.jar, jetty-http-7.0.2.v20100331.jar, jetty-io-7.0.2.v20100331.jar, jetty-server-7.0.2.v20100331.jar, jetty-util-7.0.2.v20100331.jar, json-20201115.jar, jsoup-1.10.2.jar, servlet-api-2.5.jar define 1 overlapping resource: [\u001b[1;33mWARNING\u001b[m] - META-INF/MANIFEST.MF [\u001b[1;33mWARNING\u001b[m] jetty-continuation-7.0.2.v20100331.jar, jetty-http-7.0.2.v20100331.jar, jetty-io-7.0.2.v20100331.jar, jetty-server-7.0.2.v20100331.jar, jetty-util-7.0.2.v20100331.jar define 1 overlapping resource: [\u001b[1;33mWARNING\u001b[m] - about.html [\u001b[1;33mWARNING\u001b[m] commons-codec-1.11.jar, commons-io-2.6.jar, commons-logging-1.2.jar define 2 overlapping resources: [\u001b[1;33mWARNING\u001b[m] - META-INF/LICENSE.txt [\u001b[1;33mWARNING\u001b[m] - META-INF/NOTICE.txt [\u001b[1;33mWARNING\u001b[m] httpclient-4.5.13.jar, httpcore-4.4.13.jar define 2 overlapping resources: [\u001b[1;33mWARNING\u001b[m] - META-INF/DEPENDENCIES [\u001b[1;33mWARNING\u001b[m] - META-INF/NOTICE [\u001b[1;33mWARNING\u001b[m] httpclient-4.5.13.jar, httpcore-4.4.13.jar, jsoup-1.10.2.jar define 1 overlapping resource: [\u001b[1;33mWARNING\u001b[m] - META-INF/LICENSE [\u001b[1;33mWARNING\u001b[m] maven-shade-plugin has detected that some class files are [\u001b[1;33mWARNING\u001b[m] present in two or more JARs. When this happens, only one [\u001b[1;33mWARNING\u001b[m] single version of the class is copied to the uber jar. [\u001b[1;33mWARNING\u001b[m] Usually this is not harmful and you can skip these warnings, [\u001b[1;33mWARNING\u001b[m] otherwise try to manually exclude artifacts based on [\u001b[1;33mWARNING\u001b[m] mvn dependency:tree -Ddetail=true and the above output. [\u001b[1;33mWARNING\u001b[m] See http://maven.apache.org/plugins/maven-shade-plugin/ [\u001b[1;34mINFO\u001b[m] Replacing original artifact with shaded artifact. [\u001b[1;34mINFO\u001b[m] Replacing /home/philip/kth-courses/se21/ci-server/cloned-repo/target/gs-maven-0.1.0.jar with /home/philip/kth-courses/se21/ci-server/cloned-repo/target/gs-maven-0.1.0-shaded.jar [\u001b[1;34mINFO\u001b[m] Dependency-reduced POM written at: /home/philip/kth-courses/se21/ci-server/cloned-repo/dependency-reduced-pom.xml [\u001b[1;34mINFO\u001b[m] \u001b[1m------------------------------------------------------------------------\u001b[m [\u001b[1;34mINFO\u001b[m] \u001b[1;32mBUILD SUCCESS\u001b[m [\u001b[1;34mINFO\u001b[m] \u001b[1m------------------------------------------------------------------------\u001b[m [\u001b[1;34mINFO\u001b[m] Total time: 5.270 s [\u001b[1;34mINFO\u001b[m] Finished at: 2021-02-17T21:20:36+01:00 [\u001b[1;34mINFO\u001b[m] \u001b[1m------------------------------------------------------------------------\u001b[m ","SHA":"641ae048a4c1c83096d1031c3037ebf015a3b591","Date":"2021-02-17T21:20:36+01:00"}]
\ No newline at end of file
diff --git a/ContinuousIntegrationServer.java b/ContinuousIntegrationServer.java
deleted file mode 100644
index 9adb2ff0..00000000
--- a/ContinuousIntegrationServer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletException;
-
-import java.io.IOException;
-
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.Request;
-import org.eclipse.jetty.server.handler.AbstractHandler;
-
-/**
- Skeleton of a ContinuousIntegrationServer which acts as webhook
- See the Jetty documentation for API documentation of those classes.
-*/
-public class ContinuousIntegrationServer extends AbstractHandler
-{
- public void handle(String target,
- Request baseRequest,
- HttpServletRequest request,
- HttpServletResponse response)
- throws IOException, ServletException
- {
- response.setContentType("text/html;charset=utf-8");
- response.setStatus(HttpServletResponse.SC_OK);
- baseRequest.setHandled(true);
-
- System.out.println(target);
-
- // here you do all the continuous integration tasks
- // for example
- // 1st clone your repository
- // 2nd compile the code
-
- response.getWriter().println("CI job done");
- }
-
- // used to start the CI server in command line
- public static void main(String[] args) throws Exception
- {
- Server server = new Server(8080);
- server.setHandler(new ContinuousIntegrationServer());
- server.start();
- server.join();
- }
-}
diff --git a/README.md b/README.md
index e2848cfe..cece0516 100644
--- a/README.md
+++ b/README.md
@@ -1,52 +1,54 @@
-The smallest Java Continuous Integration server for Github
+A small Java Continuous Integration server.
===========================================================
+This is a simple server for Continuous Integration development. It is meant to be called as webhook by Github. The HTTP part of it is based on Jetty. Maven is used to build and test, and notifications to the repository are sent through the GitHub status API. The server keeps a history of the past builds and log files attached to them.
-Here is a tiny CI server skeleton implemented in Java for educational purposes. It is meant to be called as webhook by Github. The HTTP part of it is based on Jetty.
+## Contributions
+**Philip Andersson (CSCphilp):** Maven handling, JSON handling, bug fixes, docs
-We assume here that you have a standard Linux machine (eg with Ubuntu), with Java installed.
+**Zehua Guo (gzh0528):** Cloning, building and testing the repository, Build History
+
+**Jonatan Yao Håkansson (jonte450):** Testing,Notifify function helped together with Kalle
+
+**Elisabet Lövkvist (SQUEEEE):** Documentation, code skeleton for server functions, tests
+
+**Kalle Meurman (Wizkas0):** Cloning the repo, sending notification to GitHub
+
+## How to run:
+We assume here that you have a standard Linux machine (eg with Ubuntu), with Java and Maven installed. After checking out the repository, build it in the root directory using the following command:
-We first checkout this repository:
```
-git clone https://github.com/monperrus/smallest-java-ci
-cd smallest-java-ci
+mvn package
```
-We then download the required dependencies:
+Then start the server on your local machine:
```
-JETTY_VERSION=7.0.2.v20100331
-wget -U none https://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all/$JETTY_VERSION/jetty-all-$JETTY_VERSION.jar
-wget -U none https://repo1.maven.org/maven2/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
-#For linux users:
-curl -LO --tlsv1 https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
-unzip ngrok-stable-linux-amd64.zip
-#For Mac user:
-curl -LO --tlsv1 https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip
-unzip ngrok-stable-darwin-386.zip
+java -jar target/gs-maven-0.1.0.jar
```
+## Using Ngrok to connect the server to GitHub
+The server can be made visible on the Internet by using [Ngrok](https://ngrok.com/).
+
+### Download Ngrok
+First you need to download it:
-We compile the skeleton the continuous integration server:
```
-javac -cp servlet-api-2.5.jar:jetty-all-$JETTY_VERSION.jar ContinuousIntegrationServer.java
+curl -LO --tlsv1 https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
+unzip ngrok-stable-linux-amd64.zip
```
+### Run Ngrok and connect to GitHub
-We run the server on the machine, and we may make it visible on the Internet thanks to [Ngrok](https://ngrok.com/):
+The public url can be found by running the following commnand in a separate terminal window to the one running the server (in the same folder as Ngrok was downloaded):
```
-# open a first terminal window
-JETTY_VERSION=7.0.2.v20100331
-java -cp .:servlet-api-2.5.jar:jetty-all-$JETTY_VERSION.jar ContinuousIntegrationServer
-
# open a second terminal window
# this gives you the public URL of your CI server to set in Github
# copy-paste the forwarding URL "Forwarding http://8929b010.ngrok.io -> localhost:8080"
# note that this url is short-lived, and is reset everytime you run ngrok
./ngrok http 8080
-
```
-
-We configure our Github repository:
+Copy the url looking like [number sequence].ngrok.io, then go to the GitHub repository you want to the server to monitor.
* go to `Settings >> Webhooks`, click on `Add webhook`.
-* paste the forwarding URL (eg `http://8929b010.ngrok.io`) in field `Payload URL`) and send click on `Add webhook`. In the simplest setting, nothing more is required.
+* paste the forwarding URL (eg `http://8929b010.ngrok.io`) in field `Payload URL`) and send click on `Add webhook`.
+* **Set the content type to application/json**
We test that everything works:
@@ -56,7 +58,7 @@ We test that everything works:
* observe the result, in two ways:
* locally: in the console of your first terminal window, observe the requested URL printed on the console
* on github: go to `Settings >> Webhooks` in your repo, click on your newly created webhook, scroll down to "Recent Deliveries", click on the last delivery and the on the `Response tab`, you'll see the output of your server `CI job done`
- * on ngrok: raise the terminal window with Ngrok, and you'll also the see URLs requested by Github
+ * on ngrok: raise the terminal window with Ngrok, and you'll also the see URLs requested by Github.
We shutdown everything:
@@ -65,4 +67,7 @@ We shutdown everything:
* delete the webhook in the webhook configuration page.
Notes:
-* by default, Github delivers a `push` JSON payloard, documented here: , this information can be used to get interesting information about the commit that has just been pushed.
+* by default, Github delivers a `push` JSON payload, documented here: , this information can be used to get interesting information about the commit that has just been pushed.
+
+### View history of past builds
+The history data is stored in data.json. To see the history, you can click the html file called History.html in the Build_History folder. The html page contains a list of URLs. By clicking each of them, you will see the log of that build.
diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html
new file mode 100644
index 00000000..a1268d09
--- /dev/null
+++ b/docs/allclasses-index.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+All Classes (gs-maven 0.1.0 API)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
Package
+
Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:
+
+
Interfaces
+
Classes
+
Enums
+
Exceptions
+
Errors
+
Annotation Types
+
+
+
+
Class or Interface
+
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+
Class Inheritance Diagram
+
Direct Subclasses
+
All Known Subinterfaces
+
All Known Implementing Classes
+
Class or Interface Declaration
+
Class or Interface Description
+
+
+
+
Nested Class Summary
+
Field Summary
+
Property Summary
+
Constructor Summary
+
Method Summary
+
+
+
+
Field Details
+
Property Details
+
Constructor Details
+
Method Details
+
+
The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+
+
+
Annotation Type
+
Each annotation type has its own separate page with the following sections:
+
+
Annotation Type Declaration
+
Annotation Type Description
+
Required Element Summary
+
Optional Element Summary
+
Element Details
+
+
+
+
Enum
+
Each enum has its own separate page with the following sections:
+
+
Enum Declaration
+
Enum Description
+
Enum Constant Summary
+
Enum Constant Details
+
+
+
+
Use
+
Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its "Use" page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+
+
+
Tree (Class Hierarchy)
+
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.
+
+
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+
When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
+
+
+
+
Deprecated API
+
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+
+
+
Index
+
The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.
+
+
+
Serialized Form
+
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camel-case" abbreviations. For example:
+
+
j.l.obj will match "java.lang.Object"
+
InpStr will match "java.io.InputStream"
+
HM.cK will match "java.util.HashMap.containsKey(Object)"
Gets the GitHub repo url and recently pushed branch from the input json
+ and combine these to form a compatible string to use with the 'git clone' command.
").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
Gets the GitHub repo url and recently pushed branch from the input json
+ and combine these to form a compatible string to use with the 'git clone' command.
public staticStringgetRepoURL(org.json.JSONObject json)
+
Gets the GitHub repo url and recently pushed branch from the input json
+ and combine these to form a compatible string to use with the 'git clone' command.
+
+
Parameters:
+
json - A JSON object containing the parameters from a GitHub webhook
+
Returns:
+
A string with the recently pushed branch and the GitHub repo url.
+
+
+
+
+
+
getStatusUrl
+
public staticStringgetStatusUrl(org.json.JSONObject json)
+
Gets url to the status of the latest commit in a given push