|
25 | 25 | <html-formatter.version>22.2.0</html-formatter.version> |
26 | 26 | <junit-xml-formatter.version>0.11.0</junit-xml-formatter.version> |
27 | 27 | <testng-xml-formatter.version>0.7.0</testng-xml-formatter.version> |
| 28 | + <project.build.mainClass>io.cucumber.messages.cli.MessagesCli</project.build.mainClass> |
28 | 29 | </properties> |
29 | 30 |
|
30 | 31 | <scm> |
|
121 | 122 | <plugins> |
122 | 123 | <plugin> |
123 | 124 | <groupId>org.apache.maven.plugins</groupId> |
124 | | - <artifactId>maven-jar-plugin</artifactId> |
| 125 | + <artifactId>maven-shade-plugin</artifactId> |
125 | 126 | <configuration> |
126 | | - <archive> |
127 | | - <manifest> |
128 | | - <mainClass>io.cucumber.messages.cli.MessagesCli</mainClass> |
129 | | - </manifest> |
130 | | - </archive> |
| 127 | + <filters> |
| 128 | + <filter> |
| 129 | + <artifact>*:*</artifact> |
| 130 | + <excludes> |
| 131 | + <exclude>META-INF/versions/9/module-info.class</exclude> |
| 132 | + <exclude>META-INF/*.SF</exclude> |
| 133 | + <exclude>META-INF/*.DSA</exclude> |
| 134 | + <exclude>META-INF/*.RSA</exclude> |
| 135 | + <exclude>META-INF/MANIFEST.MF</exclude> |
| 136 | + </excludes> |
| 137 | + </filter> |
| 138 | + </filters> |
| 139 | + <transformers> |
| 140 | + <transformer |
| 141 | + implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"> |
| 142 | + </transformer> |
| 143 | + <transformer |
| 144 | + implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"> |
| 145 | + <addHeader>false</addHeader> |
| 146 | + </transformer> |
| 147 | + <transformer |
| 148 | + implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 149 | + <transformer |
| 150 | + implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| 151 | + <manifestEntries> |
| 152 | + <Main-Class>${project.build.mainClass}</Main-Class> |
| 153 | + <Specification-Title>${project.artifactId}</Specification-Title> |
| 154 | + <Specification-Version>${project.version}</Specification-Version> |
| 155 | + <Implementation-Title>${project.artifactId}</Implementation-Title> |
| 156 | + <Implementation-Version>${project.version}</Implementation-Version> |
| 157 | + <Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id> |
| 158 | + </manifestEntries> |
| 159 | + </transformer> |
| 160 | + </transformers> |
131 | 161 | </configuration> |
| 162 | + <executions> |
| 163 | + <execution> |
| 164 | + <phase>package</phase> |
| 165 | + <goals> |
| 166 | + <goal>shade</goal> |
| 167 | + </goals> |
| 168 | + </execution> |
| 169 | + </executions> |
132 | 170 | </plugin> |
133 | 171 | </plugins> |
134 | 172 | </build> |
|
0 commit comments