JAR

Executable

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <mainClass>com.sample.CountUniqueTerms</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>

Note: To run this jar file, copy the dependencies to the current folder and run as follows:

java -jar solr-count-unique-terms-1.0-SNAPSHOT.jar

Manifest

<project>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <mode>development</mode>
              <!-- Think carefully before un-commenting this section:
              <url>${pom.url}</url>
              -->
              <version>${pom.version}</version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Test

Guide to using attached tests

Many times you may want to resuse the tests that you have created for a project in another