This project is intended to assist a developer in learning what is needed to create a custom filter for Repose.
git clone [email protected]:rackerlabs/repose-hello-world.git
cd repose-hello-world
mvn clean install
scp ./custom-bundle/target/custom-bundle-1.0-SNAPSHOT.ear root@<SERVER_HOSTING_REPOSE>:/usr/share/repose/filters/
scp ./hello-world-groovy/src/main/resources/META-INF/schema/examples/hello-world-groovy.cfg.xml root@<SERVER_HOSTING_REPOSE>:/etc/repose/
scp ./hello-world-java/src/main/resources/META-INF/schema/examples/hello-world-java.cfg.xml root@<SERVER_HOSTING_REPOSE>:/etc/repose/
scp ./hello-world-scala/src/main/resources/META-INF/schema/examples/hello-world-scala.cfg.xml root@<SERVER_HOSTING_REPOSE>:/etc/repose/
ssh root@<SERVER_HOSTING_REPOSE>
vi /etc/repose/system-model.cfg.xml
mkdir -p ./hello-world-new/src/main/new/org/openrepose/filters/custom/helloworldnew/
mkdir -p ./hello-world-new/src/test/new/org/openrepose/filters/custom/helloworldnew/
touch ./hello-world-new/pom.xml
touch ./hello-world-new/src/main/new/org/openrepose/filters/custom/helloworldnew/HelloWorldNewFilter.new
touch ./hello-world-new/src/test/new/org/openrepose/filters/custom/helloworldnew/HelloWorldNewFilterTest.new
vi ./pom.xml
...
<modules>
<module>custom-bundle</module>
<module>hello-world-java</module>
<module>hello-world-scala</module>
<module>hello-world-groovy</module>
<module>hello-world-new</module>
</modules>
...
vi ./custom-bundle/pom.xml
...
<dependencies>
...
<dependency>
<groupId>org.openrepose.filters.custom</groupId>
<artifactId>hello-world-new</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
...
vi ./custom-bundle/src/main/application/WEB-INF/web-fragment.xml
...
<filter>
<filter-name>hello-world-new</filter-name>
<filter-class>org.openrepose.filters.custom.helloworldnew.HelloWorldNewFilter</filter-class>
</filter>
...