Verification Analysis

The plugin will perform a verification analysis by default. This means that the project you are analyzing must be configured to produce the jar with dependencies. We will use the java-demo project as an example. Adjust the pom.xml to bundle the dependencies in the final artifact. We can do this by using the maven-assembly-plugin.

Add the following stanza to your pom.xml inside the <build><plugins> section (refer to Appendix 2).

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-assembly-plugin</artifactId>
  <version>2.4.1</version>
  <configuration>
    <descriptorRefs>
      <descriptorRef>jar-with-dependencies</descriptorRef>
    </descriptorRefs>
  </configuration>
  <executions>
    <execution>
    <id>make-assembly</id>
    <phase>package</phase>
    <goals>
      <goal>single</goal>
    </goals>
    </execution>
  </executions>
</plugin>

Once you build the project and refresh it in the Package Explorer, you should see a new build artifact produced java-demo-1.0.1-jar-with-dependencies.jar.

results matching ""

    No results matching ""