Tomer
Tomer

Reputation: 2448

Add source files to my jar using Maven

I wanted to know the right way I should act. I have a project which I have compiled into a jar file using maven plugins.

Now, I need to add javadoc , source code , of my project and my tests.

How should I do it?

Basically maven have plugin to deal with such cases. If I use those plugins I end up with : project.jar project-sources.jar project-javadoc.jar project-tests.jar

Is this the right way?

Thanks!

Upvotes: 1

Views: 1255

Answers (2)

Mark O'Connor
Mark O'Connor

Reputation: 78011

The Maven cookbook describes how to attach source and javadoc arifects

Upvotes: 1

nonVirtualThunk
nonVirtualThunk

Reputation: 2852

Yes, what you're describing is generally considered the correct way to build javadoc, source, and test jars with maven.

Upvotes: 1

Related Questions