Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating a jar with the source code of the Maven project with the Maven directory structure?

I have a web application that I build with Maven into a war. But I want to generate a JAR with the maven project with the correct maven directory structure. I tried this but it throws away the Maven directory structure (src/main/java, etc.). My goal is to distribute this jar to other people so they can unpack and run mvn eclipse:eclipse and start working on their new web project.

like image 329
chrisapotek Avatar asked Nov 23 '25 14:11

chrisapotek


1 Answers

Why not using the existing descriptor of maven-assembly-plugin..

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
  <descriptorRefs>
    <descriptorRef>src</descriptorRef>
  </descriptorRefs>
</configuratio
like image 87
khmarbaise Avatar answered Nov 25 '25 03:11

khmarbaise