File tree Expand file tree Collapse file tree 1 file changed +53
-1
lines changed Expand file tree Collapse file tree 1 file changed +53
-1
lines changed Original file line number Diff line number Diff line change 105
105
<source >1.7</source >
106
106
<target >1.7</target >
107
107
</configuration >
108
-
109
108
</plugin >
110
109
110
+ <!-- Copy the dependency jars into the target/dependency directory -->
111
+ <plugin >
112
+ <groupId >org.apache.maven.plugins</groupId >
113
+ <artifactId >maven-dependency-plugin</artifactId >
114
+ <executions >
115
+ <execution >
116
+ <id >copy</id >
117
+ <phase >compile</phase >
118
+ <goals >
119
+ <goal >copy-dependencies</goal >
120
+ </goals >
121
+ </execution >
122
+ </executions >
123
+ </plugin >
124
+
125
+ <!-- Add the manifest file to the jar and force classpath to the dependency directory to automatically include the dependency jars-->
126
+ <plugin >
127
+ <groupId >org.apache.maven.plugins</groupId >
128
+ <artifactId >maven-jar-plugin</artifactId >
129
+ <configuration >
130
+ <archive >
131
+ <manifest >
132
+ <addClasspath >true</addClasspath >
133
+ <mainClass >org.restflow.RestFlow</mainClass >
134
+ <!-- <classpathPrefix>dependency/</classpathPrefix>-->
135
+ </manifest >
136
+ </archive >
137
+ </configuration >
138
+ </plugin >
139
+
140
+ <!-- Make a standalone jar file -->
141
+ <plugin >
142
+ <artifactId >maven-assembly-plugin</artifactId >
143
+ <configuration >
144
+ <archive >
145
+ <manifest >
146
+ <mainClass >org.restflow.RestFlow</mainClass >
147
+ </manifest >
148
+ </archive >
149
+ <descriptorRefs >
150
+ <descriptorRef >jar-with-dependencies</descriptorRef >
151
+ </descriptorRefs >
152
+ </configuration >
153
+ <executions >
154
+ <execution >
155
+ <phase >package</phase >
156
+ <goals >
157
+ <goal >single</goal >
158
+ </goals >
159
+ </execution >
160
+ </executions >
161
+ </plugin >
162
+
111
163
</plugins >
112
164
</build >
113
165
You can’t perform that action at this time.
0 commit comments