1
votes

I'm using Netbeans 8 in my maven web application.

I need to export a jar library from my web application with only my own custom classes (not dependencies etc).

How can I achieve that in a neat way. The IDE only generates a .war, I need that custom .jar also to be used elsewhere.

thx.

1

1 Answers

0
votes

Well, I found a solution and worked:

Adding this in pom.xml inside /project/build/plugins

        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <configuration>
                <attachClasses>true</attachClasses>
                <classesClassifier>classes</classesClassifier>
            </configuration>
        </plugin>