diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cb1a6cd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,217 @@
+
+# Created by https://www.gitignore.io/api/java,code,windows,eclipse,intellij
+# Edit at https://www.gitignore.io/?templates=java,code,windows,eclipse,intellij
+
+### Custom ###
+**/target
+servers
+
+### Code ###
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+### Eclipse ###
+.metadata
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.settings/
+.loadpath
+.recommenders
+
+# External tool builders
+.externalToolBuilders/
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# PyDev specific (Python IDE for Eclipse)
+*.pydevproject
+
+# CDT-specific (C/C++ Development Tooling)
+.cproject
+
+# CDT- autotools
+.autotools
+
+# Java annotation processor (APT)
+.factorypath
+
+# PDT-specific (PHP Development Tools)
+.buildpath
+
+# sbteclipse plugin
+.target
+
+# Tern plugin
+.tern-project
+
+# TeXlipse plugin
+.texlipse
+
+# STS (Spring Tool Suite)
+.springBeans
+
+# Code Recommenders
+.recommenders/
+
+# Annotation Processing
+.apt_generated/
+
+# Scala IDE specific (Scala & Java development for Eclipse)
+.cache-main
+.scala_dependencies
+.worksheet
+
+### Eclipse Patch ###
+# Eclipse Core
+.project
+
+# JDT-specific (Eclipse Java Development Tools)
+.classpath
+
+# Annotation Processing
+.apt_generated
+
+.sts4-cache/
+
+### Intellij ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+# JetBrains templates
+**___jb_tmp___
+
+### Intellij Patch ###
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
+
+# *.iml
+# modules.xml
+# .idea/misc.xml
+# *.ipr
+
+# Sonarlint plugin
+.idea/sonarlint
+
+### Java ###
+# Compiled class file
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+### Windows ###
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# End of https://www.gitignore.io/api/java,code,windows,eclipse,intellij
diff --git a/README.md b/README.md
index f66b756..1774b8b 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,13 @@ The plugin requires:
To deploy simply drag the contents of the folder to `src/extensions/` on the Phabricator instance and then restart the application.
+### Teamcity-Phabricator-Plugin
+
+The teamcity plugin comprises of server and agent plugins for teamcity.
+
+#### Server
+The server plugin monitors builds with the phabricator feature enabled waiting for builds to finish and notify phabricator.
+
## Useful Links
* https://confluence.jetbrains.com/display/TCD10/Web+UI+Extensions
diff --git a/Teamcity-Phabricator-Plugin/build/plugin-agent-assembly.xml b/Teamcity-Phabricator-Plugin/build/plugin-agent-assembly.xml
new file mode 100644
index 0000000..ba3f8f4
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/build/plugin-agent-assembly.xml
@@ -0,0 +1,35 @@
+
+
+ plugin-agent-assembly
+ false
+
+ zip
+
+
+
+
+ /
+
+
+
+
+ true
+
+ uk.xlab.teamcity.phabricator:phabricator-plugin-agent
+ uk.xlab.teamcity.phabricator:phabricator-plugin-common
+
+
+ lib
+ false
+
+
+
+ *
+
+
+
+
+
+
+
+
diff --git a/Teamcity-Phabricator-Plugin/build/plugin-assembly.xml b/Teamcity-Phabricator-Plugin/build/plugin-assembly.xml
new file mode 100644
index 0000000..eb5de2f
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/build/plugin-assembly.xml
@@ -0,0 +1,38 @@
+
+
+ plugin-assembly
+ false
+
+ zip
+
+
+
+
+ /
+
+
+
+ agent
+
+
+
+
+ true
+
+ uk.xlab.teamcity.phabricator:phabricator-plugin-server
+ uk.xlab.teamcity.phabricator:phabricator-plugin-common
+
+
+ server
+ false
+
+
+
+ *
+
+
+
+
+
+
+
diff --git a/Teamcity-Phabricator-Plugin/build/pom.xml b/Teamcity-Phabricator-Plugin/build/pom.xml
new file mode 100644
index 0000000..ca3fa89
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/build/pom.xml
@@ -0,0 +1,104 @@
+
+
+ 4.0.0
+
+ phabricator-plugin
+ uk.xlab.teamcity.phabricator
+ 1.0-SNAPSHOT
+
+ build
+ pom
+
+ yyyyMMddHHmmss
+ snapshot-${maven.build.timestamp}
+ Plugin vendor name
+ Plugin vendor URL
+
+
+
+ uk.xlab.teamcity.phabricator
+ phabricator-plugin-agent
+ 1.0-SNAPSHOT
+
+
+ uk.xlab.teamcity.phabricator
+ phabricator-plugin-common
+ 1.0-SNAPSHOT
+
+
+ uk.xlab.teamcity.phabricator
+ phabricator-plugin-server
+ 1.0-SNAPSHOT
+
+
+
+
+
+ com.google.code.maven-replacer-plugin
+ replacer
+ 1.5.2
+
+
+ process-sources
+
+ replace
+
+
+
+
+ ${basedir}/../teamcity-plugin.xml
+ ${basedir}/target/teamcity-plugin.xml
+
+
+ @Version@
+ ${teamcity.phabricator-plugin.plugin.version}
+
+
+ @VendorName@
+ ${teamcity.phabricator-plugin.plugin.vendorName}
+
+
+ @VendorURL@
+ ${teamcity.phabricator-plugin.plugin.vendorUrl}
+
+
+
+
+
+ maven-assembly-plugin
+ 2.4
+
+
+ make-agent-assembly
+ package
+
+ single
+
+
+ phabricator-plugin-agent
+ false
+
+ plugin-agent-assembly.xml
+
+
+
+
+ make-assembly
+ package
+
+ single
+
+
+ phabricator-plugin
+ ${project.parent.build.directory}
+ false
+
+ plugin-assembly.xml
+
+
+
+
+
+
+
+
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/pom.xml b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/pom.xml
new file mode 100644
index 0000000..9707c2e
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/pom.xml
@@ -0,0 +1,48 @@
+
+
+ 4.0.0
+
+ phabricator-plugin
+ uk.xlab.teamcity.phabricator
+ 1.0-SNAPSHOT
+
+ phabricator-plugin-agent
+ jar
+
+
+
+ uk.xlab.teamcity.phabricator
+ phabricator-plugin-common
+ 1.0-SNAPSHOT
+ compile
+
+
+
+ org.jetbrains.teamcity
+ agent-api
+ ${teamcity-version}
+ provided
+
+
+
+ org.jetbrains.teamcity
+ tests-support
+ ${teamcity-version}
+ test
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 1.6
+
+
+
+
+
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/src/main/java/uk/xlab/teamcity/phabricator/AppAgent.java b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/src/main/java/uk/xlab/teamcity/phabricator/AppAgent.java
new file mode 100644
index 0000000..cdc3e72
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/src/main/java/uk/xlab/teamcity/phabricator/AppAgent.java
@@ -0,0 +1,4 @@
+package uk.xlab.teamcity.phabricator;
+
+public class AppAgent {
+}
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/src/main/resources/META-INF/build-agent-plugin-phabricator-plugin.xml b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/src/main/resources/META-INF/build-agent-plugin-phabricator-plugin.xml
new file mode 100644
index 0000000..11265f2
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/src/main/resources/META-INF/build-agent-plugin-phabricator-plugin.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/teamcity-plugin.xml b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/teamcity-plugin.xml
new file mode 100644
index 0000000..119ed11
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-agent/teamcity-plugin.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-common/pom.xml b/Teamcity-Phabricator-Plugin/phabricator-plugin-common/pom.xml
new file mode 100644
index 0000000..e13efa1
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-common/pom.xml
@@ -0,0 +1,24 @@
+
+
+ 4.0.0
+
+ phabricator-plugin
+ uk.xlab.teamcity.phabricator
+ 1.0-SNAPSHOT
+
+ phabricator-plugin-common
+ jar
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 1.6
+
+
+
+
+
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-common/src/main/java/uk/xlab/teamcity/phabricator/AppCommon.java b/Teamcity-Phabricator-Plugin/phabricator-plugin-common/src/main/java/uk/xlab/teamcity/phabricator/AppCommon.java
new file mode 100644
index 0000000..cfab8fa
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-common/src/main/java/uk/xlab/teamcity/phabricator/AppCommon.java
@@ -0,0 +1,4 @@
+package uk.xlab.teamcity.phabricator;
+
+public class AppCommon {
+}
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-server/pom.xml b/Teamcity-Phabricator-Plugin/phabricator-plugin-server/pom.xml
new file mode 100644
index 0000000..cac3d43
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-server/pom.xml
@@ -0,0 +1,56 @@
+
+
+ 4.0.0
+
+ phabricator-plugin
+ uk.xlab.teamcity.phabricator
+ 1.0-SNAPSHOT
+
+ phabricator-plugin-server
+ jar
+
+
+
+ uk.xlab.teamcity.phabricator
+ phabricator-plugin-common
+ 1.0-SNAPSHOT
+ compile
+
+
+
+ org.jetbrains.teamcity
+ server-api
+ ${teamcity-version}
+ provided
+
+
+
+ org.jetbrains.teamcity
+ server-web-api
+ ${teamcity-version}
+ war
+ provided
+
+
+
+ org.jetbrains.teamcity
+ tests-support
+ ${teamcity-version}
+ test
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 1.8
+
+
+
+
+
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/java/uk/xlab/teamcity/phabricator/AppServer.java b/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/java/uk/xlab/teamcity/phabricator/AppServer.java
new file mode 100644
index 0000000..3d3e908
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/java/uk/xlab/teamcity/phabricator/AppServer.java
@@ -0,0 +1,4 @@
+package uk.xlab.teamcity.phabricator;
+
+public class AppServer {
+}
\ No newline at end of file
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/resources/META-INF/build-server-plugin-phabricator-plugin.xml b/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/resources/META-INF/build-server-plugin-phabricator-plugin.xml
new file mode 100644
index 0000000..814e0bc
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/resources/META-INF/build-server-plugin-phabricator-plugin.xml
@@ -0,0 +1,6 @@
+
+
+
\ No newline at end of file
diff --git a/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/resources/buildServerResources/example.jsp b/Teamcity-Phabricator-Plugin/phabricator-plugin-server/src/main/resources/buildServerResources/example.jsp
new file mode 100644
index 0000000..e69de29
diff --git a/Teamcity-Phabricator-Plugin/pom.xml b/Teamcity-Phabricator-Plugin/pom.xml
new file mode 100644
index 0000000..24e16a9
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/pom.xml
@@ -0,0 +1,53 @@
+
+
+ 4.0.0
+ uk.xlab.teamcity.phabricator
+ phabricator-plugin
+ 1.0-SNAPSHOT
+ pom
+
+ 2019.1
+
+
+
+ JetBrains
+ https://download.jetbrains.com/teamcity-repository
+
+
+
+
+ JetBrains
+ https://download.jetbrains.com/teamcity-repository
+
+
+
+
+
+ org.jetbrains.teamcity
+ teamcity-sdk-maven-plugin
+ 0.4
+
+
+
+
+
+
+
+
+ org.jetbrains.teamcity
+ teamcity-sdk-maven-plugin
+ 0.4
+
+
+
+
+
+
+
+
+ phabricator-plugin-server
+ phabricator-plugin-agent
+ phabricator-plugin-common
+ build
+
+
\ No newline at end of file
diff --git a/Teamcity-Phabricator-Plugin/readme.txt b/Teamcity-Phabricator-Plugin/readme.txt
new file mode 100644
index 0000000..cd451eb
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/readme.txt
@@ -0,0 +1,13 @@
+
+ TeamCity plugin
+
+ This is an empty project to develop TeamCity plugin.
+
+ 1. Implement
+ This project contains 3 modules: '-server', '-agent' and '-common'. They will contain code for server and agent parts of your plugin and a common part, available for both (agent and server). When implementing components for server and agent parts, do not forget to update spring context files under 'main/resources/META-INF'. Otherwise your compoment may be not loaded. See TeamCity documentation for details on plugin development.
+
+ 2. Build
+ Issue 'mvn package' command from the root project to build your plugin. Resulting package .zip will be placed in 'target' directory.
+
+ 3. Install
+ To install the plugin, put zip archive to 'plugins' dir under TeamCity data directory. If you only changed agent-side code of your plugin, the upgrade will be perfomed 'on the fly' (agents will upgrade when idle). If common or server-side code has changed, restart the server.
diff --git a/Teamcity-Phabricator-Plugin/teamcity-plugin.xml b/Teamcity-Phabricator-Plugin/teamcity-plugin.xml
new file mode 100644
index 0000000..89a3a03
--- /dev/null
+++ b/Teamcity-Phabricator-Plugin/teamcity-plugin.xml
@@ -0,0 +1,17 @@
+
+
+
+ phabricator-plugin
+ phabricator-plugin
+ @Version@
+ Plugin description
+ Plugin download URL
+ Plugin author e-mail
+
+ @VendorName@
+ @VendorURL@
+ Plugin vendor logo URL
+
+
+
+