Usman Ismail
Usman Ismail

Reputation: 18659

How can a build a jar with the maven assembly plugin that does not package any dependencies?

Maven assembly plugin has a predefined descriptor for jar-with-dependencies but not a jar-without-dependencies.

I know there is an exclusion config but wild cards do not seem to work with exclusions. Or I am not using them right.

<dependencySets>
    <dependencySet>
        <excludes>
            <exclude>*</exclude>
        </excludes>
    </dependencySet>
</dependencySets>

Upvotes: 0

Views: 322

Answers (1)

Tomasz Pik
Tomasz Pik

Reputation: 421

You do not need to use assembly plugin, your scenario may be covered by maven-war-plugin with attachedClasses parameter and a classifier, see FAQ on site: http://maven.apache.org/plugins/maven-war-plugin/faq.html#attached

Upvotes: 3

Related Questions