|
10 | 10 | <packaging>jar</packaging> |
11 | 11 | <name>Flow Frontend Build Tools</name> |
12 | 12 | <description>A module to handle frontend build tools common to the plugins and dev server</description> |
| 13 | + <properties> |
| 14 | + <!-- It appears that sonar does not like shade plugin --> |
| 15 | + <sonar.skip>true</sonar.skip> |
| 16 | + </properties> |
13 | 17 |
|
14 | 18 | <dependencies> |
15 | 19 |
|
|
38 | 42 |
|
39 | 43 | </dependencies> |
40 | 44 |
|
| 45 | + <build> |
| 46 | + <plugins> |
| 47 | + <plugin> |
| 48 | + <groupId>org.apache.maven.plugins</groupId> |
| 49 | + <artifactId>maven-shade-plugin</artifactId> |
| 50 | + <version>3.6.1</version> |
| 51 | + <executions> |
| 52 | + <execution> |
| 53 | + <goals> |
| 54 | + <goal>shade</goal> |
| 55 | + </goals> |
| 56 | + <phase>package</phase> |
| 57 | + <configuration> |
| 58 | + <shadedArtifactAttached>true</shadedArtifactAttached> |
| 59 | + <shadedClassifierName>shaded</shadedClassifierName> |
| 60 | + <createDependencyReducedPom>true</createDependencyReducedPom> |
| 61 | + <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation> |
| 62 | + <artifactSet> |
| 63 | + <includes> |
| 64 | + <include>org.apache.commons:commons-compress</include> |
| 65 | + <include>commons-io:commons-io</include> |
| 66 | + <include>commons-codec:commons-codec</include> |
| 67 | + <include>org.apache.commons:commons-lang3</include> |
| 68 | + </includes> |
| 69 | + </artifactSet> |
| 70 | + <relocations> |
| 71 | + <relocation> |
| 72 | + <pattern>org.apache.commons.compress</pattern> |
| 73 | + <shadedPattern>com.vaadin.frontendtools.internal.commons.compress</shadedPattern> |
| 74 | + </relocation> |
| 75 | + <relocation> |
| 76 | + <pattern>org.apache.commons.io</pattern> |
| 77 | + <shadedPattern>com.vaadin.frontendtools.internal.commons.io</shadedPattern> |
| 78 | + </relocation> |
| 79 | + <relocation> |
| 80 | + <pattern>org.apache.commons.codec</pattern> |
| 81 | + <shadedPattern>com.vaadin.frontendtools.internal.commons.codec</shadedPattern> |
| 82 | + </relocation> |
| 83 | + <relocation> |
| 84 | + <pattern>org.apache.commons.lang3</pattern> |
| 85 | + <shadedPattern>com.vaadin.frontendtools.internal.commons.lang3</shadedPattern> |
| 86 | + </relocation> |
| 87 | + </relocations> |
| 88 | + <filters> |
| 89 | + <filter> |
| 90 | + <artifact>*:*</artifact> |
| 91 | + <excludes> |
| 92 | + <!-- Security signatures --> |
| 93 | + <exclude>META-INF/*.SF</exclude> |
| 94 | + <exclude>META-INF/*.DSA</exclude> |
| 95 | + <exclude>META-INF/*.RSA</exclude> |
| 96 | + <exclude>META-INF/SIG-*</exclude> |
| 97 | + <!-- Duplicate licenses --> |
| 98 | + <exclude>META-INF/LICENSE*</exclude> |
| 99 | + <exclude>META-INF/NOTICE*</exclude> |
| 100 | + <exclude>META-INF/DEPENDENCIES</exclude> |
| 101 | + <!-- Module info --> |
| 102 | + <exclude>module-info.class</exclude> |
| 103 | + <!-- Multi-Release JAR files --> |
| 104 | + <exclude>META-INF/versions/**</exclude> |
| 105 | + <!-- GraalVM native-image configs (reference unshaded class names) --> |
| 106 | + <exclude>META-INF/native-image/**</exclude> |
| 107 | + <!-- Dependency Maven metadata --> |
| 108 | + <exclude>META-INF/maven/**</exclude> |
| 109 | + </excludes> |
| 110 | + </filter> |
| 111 | + <filter> |
| 112 | + <!-- Exclude compressors with optional dependencies we don't need --> |
| 113 | + <artifact>org.apache.commons:commons-compress</artifact> |
| 114 | + <excludes> |
| 115 | + <exclude>org/apache/commons/compress/compressors/xz/**</exclude> |
| 116 | + <exclude>org/apache/commons/compress/compressors/lzma/**</exclude> |
| 117 | + <exclude>org/apache/commons/compress/compressors/brotli/**</exclude> |
| 118 | + <exclude>org/apache/commons/compress/compressors/zstandard/**</exclude> |
| 119 | + <exclude>org/apache/commons/compress/compressors/snappy/**</exclude> |
| 120 | + <exclude>org/apache/commons/compress/compressors/lz4/**</exclude> |
| 121 | + <exclude>org/apache/commons/compress/archivers/sevenz/**</exclude> |
| 122 | + </excludes> |
| 123 | + </filter> |
| 124 | + </filters> |
| 125 | + <transformers> |
| 126 | + <!-- Merge SPI service files --> |
| 127 | + <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 128 | + <!-- Handle Apache license files --> |
| 129 | + <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/> |
| 130 | + </transformers> |
| 131 | + </configuration> |
| 132 | + </execution> |
| 133 | + </executions> |
| 134 | + </plugin> |
| 135 | + </plugins> |
| 136 | + </build> |
| 137 | + |
41 | 138 | </project> |
0 commit comments