Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
520 views
in Programming by
We are currently using maven to create JAR file. This creates raw Jar file w/o dependencies. How do we create JAR file with dependencies?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer
Add below plugin to your pom.xml file.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.4</version>
    <configuration>
        <descriptorRefs>
        <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
        <properties>
            <property>
                <name>listener</name>
                <value>com.example.TestProgressListener</value>
            </property>
        </properties>
    </configuration>
    <executions>
        <execution>
            <id>make-assembly</id> <!-- this is used for inheritance merges -->
            <phase>package</phase> <!-- bind to the packaging phase -->
            <goals>
                <goal>single</goal>
            </goals>
        </execution>
    </executions>
</plugin>


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...