Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Commit e87ac73

Browse files
author
Explv
committed
Configure maven to build resources-archive automatically
1 parent 094ba5f commit e87ac73

File tree

3 files changed

+47
-15
lines changed

3 files changed

+47
-15
lines changed

pom.xml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,40 @@
8484
</plugin>
8585
<plugin>
8686
<artifactId>maven-assembly-plugin</artifactId>
87-
<configuration>
88-
<archive>
89-
<manifest>
90-
<mainClass>main.script.AIO</mainClass>
91-
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
92-
</manifest>
93-
</archive>
94-
<descriptorRefs>
95-
<descriptorRef>jar-with-dependencies</descriptorRef>
96-
</descriptorRefs>
97-
<appendAssemblyId>false</appendAssemblyId>
98-
<outputDirectory>${user.home}/OSBot/Scripts/</outputDirectory>
99-
</configuration>
10087
<executions>
10188
<execution>
102-
<id>make-assembly</id> <!-- this is used for inheritance merges -->
103-
<phase>package</phase> <!-- bind to the packaging phase -->
89+
<!-- Build the script .jar -->
90+
<id>build-script-jar</id>
91+
<configuration>
92+
<archive>
93+
<manifest>
94+
<mainClass>main.script.AIO</mainClass>
95+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
96+
</manifest>
97+
</archive>
98+
<descriptorRefs>
99+
<descriptorRef>jar-with-dependencies</descriptorRef>
100+
</descriptorRefs>
101+
<appendAssemblyId>false</appendAssemblyId>
102+
<outputDirectory>${user.home}/OSBot/Scripts/</outputDirectory>
103+
</configuration>
104+
<phase>package</phase>
105+
<goals>
106+
<goal>single</goal>
107+
</goals>
108+
</execution>
109+
<execution>
110+
<!-- Build the resources .zip archive -->
111+
<id>build-resources-archive</id>
112+
<configuration>
113+
<appendAssemblyId>false</appendAssemblyId>
114+
<finalName>resources-archive</finalName>
115+
<descriptors>
116+
<descriptor>${basedir}/src/assembly/resources-archive.xml</descriptor>
117+
</descriptors>
118+
<outputDirectory>${project.basedir}</outputDirectory>
119+
</configuration>
120+
<phase>package</phase>
104121
<goals>
105122
<goal>single</goal>
106123
</goals>

resources-archive.zip

-246 Bytes
Binary file not shown.

src/assembly/resources-archive.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
3+
<id>resources-archive</id>
4+
<includeBaseDirectory>false</includeBaseDirectory>
5+
<formats>
6+
<format>zip</format>
7+
</formats>
8+
<fileSets>
9+
<fileSet>
10+
<directory>${basedir}/src/main/resources</directory>
11+
<outputDirectory>/</outputDirectory>
12+
<useDefaultExcludes>false</useDefaultExcludes>
13+
</fileSet>
14+
</fileSets>
15+
</assembly>

0 commit comments

Comments
 (0)