Here is what you need to add to your WAR's POM in order to use JSF Spy. Right now it is only available as a snapshot, so you'll need to include the JBoss snapshot repository.
JBoss Snapshot Repo
<repositories>
<repository>
<id>snapshots.jboss.org</id>
<url>http://snapshots.jboss.org/maven2</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
</snapshots>
</repository>
</repositories>
Regular dependency declaration
<dependency>
<groupId>org.jboss.jsfunit</groupId>
<artifactId>jboss-jsfunit-spy</artifactId>
<version>1.1.0.GA-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
Use Maven dependency plugin to unpack JSF Spy UI into the final WAR
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>compile</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jboss.jsfunit</groupId>
<artifactId>jboss-jsfunit-spy</artifactId>
<version>1.1.0.GA-SNAPSHOT</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
<includes>**/jsf-spy-ui/**</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
Comments