Skip to content

Commit d721496

Browse files
committed
now builds a jar with dependencies
1 parent 32b1eaf commit d721496

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

pom.xml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,33 @@
4545
</configuration>
4646
</plugin>
4747

48+
<plugin>
49+
<!-- NOTE: We don't need a groupId specification because the group is
50+
org.apache.maven.plugins ...which is assumed by default.
51+
-->
52+
<artifactId>maven-assembly-plugin</artifactId>
53+
<version>3.1.0</version>
54+
<configuration>
55+
<descriptorRefs>
56+
<descriptorRef>jar-with-dependencies</descriptorRef>
57+
</descriptorRefs>
58+
<archive>
59+
<manifest>
60+
<mainClass>${main-class}</mainClass>
61+
</manifest>
62+
</archive>
63+
</configuration>
64+
<executions>
65+
<execution>
66+
<id>make-assembly</id>
67+
<phase>package</phase>
68+
<goals>
69+
<goal>single</goal>
70+
</goals>
71+
</execution>
72+
</executions>
73+
</plugin>
74+
4875
<!-- attach test jar -->
4976
<plugin>
5077
<groupId>org.apache.maven.plugins</groupId>
@@ -111,10 +138,17 @@
111138
<groupId>io.swagger</groupId>
112139
<artifactId>swagger-codegen</artifactId>
113140
<version>${swagger-codegen-version}</version>
114-
<scope>provided</scope>
141+
<!-- <scope>provided</scope> -->
142+
</dependency>
143+
<dependency>
144+
<groupId>io.swagger</groupId>
145+
<artifactId>swagger-codegen-cli</artifactId>
146+
<version>${swagger-codegen-version}</version>
147+
<!-- <scope>provided</scope> -->
115148
</dependency>
116149
</dependencies>
117150
<properties>
151+
<main-class>io.swagger.codegen.SwaggerCodegen</main-class>
118152
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
119153
<swagger-codegen-version>2.3.1</swagger-codegen-version>
120154
<maven-plugin-version>1.0.0</maven-plugin-version>

0 commit comments

Comments
 (0)