Skip to content

Commit

Permalink
Working hello world plugin which loads into TeamCity's REST URI space.
Browse files Browse the repository at this point in the history
- Jars are now provided by REST-API plugin (scope:provided in mvn speak)
- REST-API dependency declared in teamcity-plugin.xml
- Removed URI binding parameters from teamcity-plugin.xml as they are
  already declared in REST-API plugin.
  • Loading branch information
netwolfuk committed Jan 28, 2015
1 parent 070537f commit 64ad147
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
11 changes: 9 additions & 2 deletions tcwebhooks-rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,26 @@
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.18.3</version>
<version>1.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>1.18.3</version>
<version>1.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-spring</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jetbrains.teamcity.9</groupId>
<artifactId>rest-api</artifactId>
<version>9.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,13 @@
import org.jetbrains.annotations.NotNull;

/**
* @author Yegor.Yarko
* Date: 20.06.2010
* @author Net Wolf UK
* Date: 27.01.2015
*/
@Path(Constants.API_URL + "/webhooks")
@Singleton
public class WebHooksHelloWorldRequest {
@Context @NotNull private ServiceLocator myServiceLocator;
@Context @NotNull private BuildTypeFinder myBuildTypeFinder;

@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public String serveProjectsConvenienceCopy(@QueryParam("locator") String buildTypeLocator) {
return "Wooot";
}


@GET
@Path("/hello")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@
<dependencies>
<plugin name="rest-api"/>
</dependencies>
<parameters>
<parameter name="api.path">/app/rest/webhooks</parameter>
</parameters>
</teamcity-plugin>

0 comments on commit 64ad147

Please sign in to comment.