-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
143 lines (132 loc) · 6.23 KB
/
pom.xml
File metadata and controls
143 lines (132 loc) · 6.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- region Spring configuration (in case that you want to use Spring to manage your project)-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<!--endregion-->
<!-- region Project data -->
<groupId>org.white_sdev.utils</groupId>
<artifactId>win-command-executor</artifactId>
<version>1.0.1</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Command executor for windows</description>
<!-- This section (packaging) can be defined if the project is meant to be a desktop application or a JAR will be generated. -->
<packaging>jar</packaging>
<!--endregion-->
<properties>
<!-- region General Properties -->
<main.class>${project.groupId}.WinCommandExecutor</main.class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<local.jre.path>${env.JAVA19_HOME}</local.jre.path>
<!--endregion-->
<!-- region Tech Versions -->
<!-- WARNING: add release scope if 1.9 and older versions are used at build/plugins/plugin/[maven-compiler-plugin]/configuration-->
<java.version>19</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<!-- endregion Tech Versions -->
</properties>
<dependencies>
<!-- region Spring Boot Desktop only -->
<!-- You can use this section if you are planning on not using the spring-boot-starter-web
And only using Desktop functionalities -->
<!--suppress VulnerableLibrariesLocal -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- endregion Spring Boot Desktop only -->
<!-- region Lombok (Annotations) Configuration -->
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<type>jar</type>
</dependency>
<!-- endregion -->
</dependencies>
<build>
<plugins>
<!-- region Spring boot configuration-->
<!-- in case spring boot is being used-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- endregion -->
<!-- region Established the java version defined in the properties' section for every scope (compatible with newer java versions) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<!-- WARNING: add release scope for 1.9 and older versions -->
<release>${java.version}</release>
</configuration>
</plugin>
<!-- endregion -->
<!-- region Generate Standalone Windows App -->
<!-- these plugins will copy 3 files/folders, JDK (with java.exe) the JAR and a .batch that
will execute the JAR with the help of JVM included in the JRE -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>copy-folder</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy todir="${project.build.directory}/${project.artifactId}/bin/jdk">
<fileset dir="${local.jre.path}" />
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>copy-file</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<sourceFile>target/${project.artifactId}-${project.version}.jar</sourceFile>
<destinationFile>target/${project.artifactId}/bin/${project.artifactId}.jar</destinationFile>
</fileSet>
<fileSet>
<sourceFile>launcher-template</sourceFile>
<destinationFile>target/${project.artifactId}/${project.artifactId}.bat</destinationFile>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
<!-- endregion Generate Standalone Windows App -->
</plugins>
</build>
</project>