Skip to content

Instantly share code, notes, and snippets.

@parker
Last active December 24, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parker/c0ea111ff343f58346e0 to your computer and use it in GitHub Desktop.
Save parker/c0ea111ff343f58346e0 to your computer and use it in GitHub Desktop.
Example usage of proctor-maven-plugin. The plugin expects source files to be located in the `src/main/proctor`.
/**
* Example specification
* proctor-maven-plugin expects this file to exist under src/main/proctor
* The filename determines the Java classname and file's path determines the Java package
* e.g: src/main/proctor/com/indeed/example/ExampleGroups.json
com.indeed.example.ExampleGroups.java
com.indeed.example.ExampleGroupsManager.java
**/
{
"tests" : {
// background color test
"bgcolortst": {
"buckets":{
"inactive":-1,
"altcolor1":0,
"altcolor2":1,
"altcolor3":2,
"altcolor4":3
},
"fallbackValue": -1,
"payload" : {
"type" : "stringValue"
}
}
},
"providedContext": {
"country": "String",
"language": "String"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.indeed.example</groupId>
<artifactId>proctor-demo</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.indeed</groupId>
<artifactId>proctor-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.indeed</groupId>
<artifactId>proctor-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<id>proctor-generate</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment