|
6 | 6 |
|
7 | 7 | <parent> |
8 | 8 | <groupId>software.xdev</groupId> |
9 | | - <artifactId>template-placeholder-root</artifactId> |
10 | | - <version>1.0.0-SNAPSHOT</version> |
| 9 | + <artifactId>vaadin-package-json-optimizer-root</artifactId> |
| 10 | + <version>1.0.1-SNAPSHOT</version> |
11 | 11 | </parent> |
12 | 12 |
|
13 | | - <artifactId>template-placeholder-demo</artifactId> |
14 | | - <version>1.0.0-SNAPSHOT</version> |
| 13 | + <artifactId>vaadin-package-json-optimizer-demo</artifactId> |
| 14 | + <version>1.0.1-SNAPSHOT</version> |
15 | 15 | <packaging>jar</packaging> |
16 | 16 |
|
17 | 17 | <organization> |
|
26 | 26 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
27 | 27 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
28 | 28 |
|
29 | | - <mainClass>software.xdev.Application</mainClass> |
| 29 | + <mainClass>software.xdev.vaadin.Application</mainClass> |
| 30 | + |
| 31 | + <!-- Dependency-Versions --> |
| 32 | + <vaadin.version>24.8.8</vaadin.version> |
| 33 | + |
| 34 | + <org.springframework.boot.version>3.5.5</org.springframework.boot.version> |
30 | 35 | </properties> |
31 | 36 |
|
| 37 | + <dependencyManagement> |
| 38 | + <dependencies> |
| 39 | + <dependency> |
| 40 | + <groupId>com.vaadin</groupId> |
| 41 | + <artifactId>vaadin-bom</artifactId> |
| 42 | + <type>pom</type> |
| 43 | + <scope>import</scope> |
| 44 | + <version>${vaadin.version}</version> |
| 45 | + </dependency> |
| 46 | + |
| 47 | + <!-- Spring Boot --> |
| 48 | + <!-- This bom provides versions for ~500 dependencies --> |
| 49 | + <!-- Nearly at the end so that it doesn't accidentally overwrite other versions --> |
| 50 | + <dependency> |
| 51 | + <groupId>org.springframework.boot</groupId> |
| 52 | + <artifactId>spring-boot-dependencies</artifactId> |
| 53 | + <version>${org.springframework.boot.version}</version> |
| 54 | + <type>pom</type> |
| 55 | + <scope>import</scope> |
| 56 | + </dependency> |
| 57 | + </dependencies> |
| 58 | + </dependencyManagement> |
| 59 | + |
32 | 60 | <dependencies> |
33 | 61 | <dependency> |
34 | | - <groupId>software.xdev</groupId> |
35 | | - <artifactId>template-placeholder</artifactId> |
36 | | - <version>${project.version}</version> |
| 62 | + <groupId>com.vaadin</groupId> |
| 63 | + <artifactId>vaadin-core</artifactId> |
| 64 | + <exclusions> |
| 65 | + <!-- No Hilla is used --> |
| 66 | + <exclusion> |
| 67 | + <groupId>com.vaadin</groupId> |
| 68 | + <artifactId>hilla-dev</artifactId> |
| 69 | + </exclusion> |
| 70 | + <exclusion> |
| 71 | + <groupId>com.vaadin</groupId> |
| 72 | + <artifactId>copilot</artifactId> |
| 73 | + </exclusion> |
| 74 | + <!-- Lumo is used instead --> |
| 75 | + <exclusion> |
| 76 | + <groupId>com.vaadin</groupId> |
| 77 | + <artifactId>vaadin-material-theme</artifactId> |
| 78 | + </exclusion> |
| 79 | + <!-- React is not enabled and thus not required --> |
| 80 | + <exclusion> |
| 81 | + <groupId>com.vaadin</groupId> |
| 82 | + <artifactId>flow-react</artifactId> |
| 83 | + </exclusion> |
| 84 | + <!-- There is like 10 people on the planet that need this by default --> |
| 85 | + <exclusion> |
| 86 | + <groupId>com.vaadin</groupId> |
| 87 | + <artifactId>collaboration-engine</artifactId> |
| 88 | + </exclusion> |
| 89 | + <!-- No Wildfly used here --> |
| 90 | + <exclusion> |
| 91 | + <groupId>com.vaadin.servletdetector</groupId> |
| 92 | + <artifactId>throw-if-servlet3</artifactId> |
| 93 | + </exclusion> |
| 94 | + </exclusions> |
| 95 | + </dependency> |
| 96 | + |
| 97 | + <!-- Spring --> |
| 98 | + <dependency> |
| 99 | + <groupId>com.vaadin</groupId> |
| 100 | + <artifactId>vaadin-spring-boot-starter</artifactId> |
| 101 | + <exclusions> |
| 102 | + <!-- No Hilla is used --> |
| 103 | + <exclusion> |
| 104 | + <groupId>com.vaadin</groupId> |
| 105 | + <artifactId>hilla</artifactId> |
| 106 | + </exclusion> |
| 107 | + </exclusions> |
| 108 | + </dependency> |
| 109 | + <!-- Temporarily excluded by Vaadin due to "security vulnerability" --> |
| 110 | + <dependency> |
| 111 | + <groupId>org.yaml</groupId> |
| 112 | + <artifactId>snakeyaml</artifactId> |
| 113 | + </dependency> |
| 114 | + <dependency> |
| 115 | + <groupId>org.springframework.boot</groupId> |
| 116 | + <artifactId>spring-boot-devtools</artifactId> |
| 117 | + <optional>true</optional> |
37 | 118 | </dependency> |
38 | 119 | </dependencies> |
39 | 120 |
|
40 | 121 | <build> |
41 | 122 | <finalName>${project.artifactId}</finalName> |
42 | | - |
| 123 | + |
| 124 | + <pluginManagement> |
| 125 | + <plugins> |
| 126 | + <plugin> |
| 127 | + <groupId>org.springframework.boot</groupId> |
| 128 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 129 | + <version>${org.springframework.boot.version}</version> |
| 130 | + </plugin> |
| 131 | + </plugins> |
| 132 | + </pluginManagement> |
| 133 | + |
43 | 134 | <plugins> |
| 135 | + <plugin> |
| 136 | + <groupId>com.vaadin</groupId> |
| 137 | + <artifactId>vaadin-maven-plugin</artifactId> |
| 138 | + <version>${vaadin.version}</version> |
| 139 | + <executions> |
| 140 | + <execution> |
| 141 | + <goals> |
| 142 | + <goal>prepare-frontend</goal> |
| 143 | + </goals> |
| 144 | + </execution> |
| 145 | + </executions> |
| 146 | + <configuration> |
| 147 | + <!-- Can only be true if hilla is used --> |
| 148 | + <!-- Takes a few seconds to scan everything for hilla --> |
| 149 | + <frontendHotdeploy>false</frontendHotdeploy> |
| 150 | + <!-- Prevent scanning for react (not used) --> |
| 151 | + <reactEnable>false</reactEnable> |
| 152 | + <!-- Only scan required --> |
| 153 | + <frontendScanner> |
| 154 | + <includes> |
| 155 | + <include> |
| 156 | + <groupId>software.xdev</groupId> |
| 157 | + <artifactId>*vaadin*</artifactId> |
| 158 | + </include> |
| 159 | + <include> |
| 160 | + <groupId>com.vaadin</groupId> |
| 161 | + </include> |
| 162 | + </includes> |
| 163 | + <excludes> |
| 164 | + <exclude> |
| 165 | + <groupId>com.vaadin.external*</groupId> |
| 166 | + </exclude> |
| 167 | + </excludes> |
| 168 | + </frontendScanner> |
| 169 | + </configuration> |
| 170 | + </plugin> |
44 | 171 | <plugin> |
45 | 172 | <groupId>org.apache.maven.plugins</groupId> |
46 | 173 | <artifactId>maven-compiler-plugin</artifactId> |
47 | | - <version>3.14.1</version> |
| 174 | + <version>3.14.0</version> |
48 | 175 | <configuration> |
49 | 176 | <release>${maven.compiler.release}</release> |
50 | 177 | <compilerArgs> |
|
53 | 180 | </configuration> |
54 | 181 | </plugin> |
55 | 182 | <plugin> |
56 | | - <groupId>org.apache.maven.plugins</groupId> |
57 | | - <artifactId>maven-assembly-plugin</artifactId> |
58 | | - <version>3.7.1</version> |
59 | | - <configuration> |
60 | | - <archive> |
61 | | - <manifest> |
62 | | - <mainClass>${mainClass}</mainClass> |
63 | | - </manifest> |
64 | | - <manifestEntries> |
65 | | - <Multi-Release>true</Multi-Release> |
66 | | - </manifestEntries> |
67 | | - </archive> |
68 | | - <descriptorRefs> |
69 | | - <descriptorRef>jar-with-dependencies</descriptorRef> |
70 | | - </descriptorRefs> |
71 | | - <appendAssemblyId>false</appendAssemblyId> |
72 | | - </configuration> |
| 183 | + <groupId>org.codehaus.mojo</groupId> |
| 184 | + <artifactId>exec-maven-plugin</artifactId> |
| 185 | + <version>3.5.1</version> |
73 | 186 | <executions> |
74 | 187 | <execution> |
75 | | - <id>make-assembly</id> <!-- this is used for inheritance merges --> |
76 | | - <phase>package</phase> <!-- bind to the packaging phase --> |
| 188 | + <id>patch-package-json-overrides</id> |
| 189 | + <phase>compile</phase> |
77 | 190 | <goals> |
78 | | - <goal>single</goal> |
| 191 | + <goal>java</goal> |
79 | 192 | </goals> |
| 193 | + <configuration> |
| 194 | + <mainClass>software.xdev.vaadin.vpjo.Launcher</mainClass> |
| 195 | + <arguments> |
| 196 | + <argument>${project.basedir}</argument> |
| 197 | + <argument>${project.build.directory}</argument> |
| 198 | + </arguments> |
| 199 | + <includeProjectDependencies>false</includeProjectDependencies> |
| 200 | + <includePluginDependencies>true</includePluginDependencies> |
| 201 | + <executableDependency> |
| 202 | + <groupId>software.xdev</groupId> |
| 203 | + <artifactId>vaadin-package-json-optimizer</artifactId> |
| 204 | + </executableDependency> |
| 205 | + </configuration> |
80 | 206 | </execution> |
81 | 207 | </executions> |
| 208 | + <dependencies> |
| 209 | + <dependency> |
| 210 | + <groupId>software.xdev</groupId> |
| 211 | + <artifactId>vaadin-package-json-optimizer</artifactId> |
| 212 | + <version>${project.version}</version> |
| 213 | + </dependency> |
| 214 | + </dependencies> |
82 | 215 | </plugin> |
83 | 216 | </plugins> |
84 | 217 | </build> |
| 218 | + |
| 219 | + <profiles> |
| 220 | + <profile> |
| 221 | + <id>dev</id> |
| 222 | + <activation> |
| 223 | + <activeByDefault>true</activeByDefault> |
| 224 | + </activation> |
| 225 | + <dependencies> |
| 226 | + <dependency> |
| 227 | + <groupId>software.xdev</groupId> |
| 228 | + <artifactId>vaadin-package-json-optimizer</artifactId> |
| 229 | + <version>${project.version}</version> |
| 230 | + </dependency> |
| 231 | + </dependencies> |
| 232 | + </profile> |
| 233 | + <profile> |
| 234 | + <id>production</id> |
| 235 | + <dependencies> |
| 236 | + <!-- Exclude development dependencies from production --> |
| 237 | + <dependency> |
| 238 | + <groupId>com.vaadin</groupId> |
| 239 | + <artifactId>vaadin-core</artifactId> |
| 240 | + <exclusions> |
| 241 | + <exclusion> |
| 242 | + <groupId>com.vaadin</groupId> |
| 243 | + <artifactId>vaadin-dev</artifactId> |
| 244 | + </exclusion> |
| 245 | + </exclusions> |
| 246 | + </dependency> |
| 247 | + </dependencies> |
| 248 | + <build> |
| 249 | + <plugins> |
| 250 | + <plugin> |
| 251 | + <groupId>com.vaadin</groupId> |
| 252 | + <artifactId>vaadin-maven-plugin</artifactId> |
| 253 | + <version>${vaadin.version}</version> |
| 254 | + <executions> |
| 255 | + <execution> |
| 256 | + <goals> |
| 257 | + <goal>prepare-frontend</goal> |
| 258 | + <goal>build-frontend</goal> |
| 259 | + </goals> |
| 260 | + </execution> |
| 261 | + </executions> |
| 262 | + </plugin> |
| 263 | + <plugin> |
| 264 | + <groupId>org.springframework.boot</groupId> |
| 265 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 266 | + <configuration> |
| 267 | + <mainClass>${mainClass}</mainClass> |
| 268 | + </configuration> |
| 269 | + <executions> |
| 270 | + <execution> |
| 271 | + <id>repackage</id> |
| 272 | + <goals> |
| 273 | + <goal>repackage</goal> |
| 274 | + </goals> |
| 275 | + <phase>package</phase> |
| 276 | + </execution> |
| 277 | + </executions> |
| 278 | + </plugin> |
| 279 | + </plugins> |
| 280 | + </build> |
| 281 | + </profile> |
| 282 | + </profiles> |
85 | 283 | </project> |
0 commit comments