Skip to content

Commit 3087934

Browse files
committed
restructure build a bit to ease release builds
1 parent f62b6b4 commit 3087934

File tree

3 files changed

+43
-60
lines changed

3 files changed

+43
-60
lines changed

epoll-test/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,13 @@
4747
<scope>test</scope>
4848
</dependency>
4949
</dependencies>
50+
51+
<build>
52+
<plugins>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-jar-plugin</artifactId>
56+
</plugin>
57+
</plugins>
58+
</build>
5059
</project>

epoll/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
<groupId>org.codehaus.mojo</groupId>
3333
<artifactId>exec-maven-plugin</artifactId>
3434
</plugin>
35-
<plugin>
36-
<groupId>org.apache.maven.plugins</groupId>
37-
<artifactId>maven-jar-plugin</artifactId>
38-
</plugin>
3935
</plugins>
4036
</build>
4137
</project>

pom.xml

Lines changed: 34 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@
6666
<junit.version>5.${junit.minor}.0</junit.version>
6767
<junit.runner.version>1.${junit.minor}.0</junit.runner.version>
6868

69-
<releaseProfile>release-javacan</releaseProfile>
70-
71-
<headers.target>${project.build.directory}/jni/${project.artifactId}</headers.target>
7269
<javacan.architecture>x86_64</javacan.architecture>
7370
<dockcross.architecture>x64</dockcross.architecture>
71+
72+
<headers.target>${project.build.directory}/jni/${project.artifactId}</headers.target>
7473
</properties>
7574

7675
<dependencyManagement>
@@ -149,51 +148,6 @@
149148
</execution>
150149
</executions>
151150
</plugin>
152-
<plugin>
153-
<groupId>org.codehaus.mojo</groupId>
154-
<artifactId>exec-maven-plugin</artifactId>
155-
<version>1.6.0</version>
156-
<configuration>
157-
<workingDirectory>${project.basedir}</workingDirectory>
158-
<executable>./compile-native.sh</executable>
159-
</configuration>
160-
<executions>
161-
<execution>
162-
<id>compile-native-default</id>
163-
<phase>compile</phase>
164-
<goals>
165-
<goal>exec</goal>
166-
</goals>
167-
<configuration>
168-
<arguments>
169-
<argument>${java.home}</argument>
170-
<argument>${project.artifactId}</argument>
171-
<argument>${project.version}</argument>
172-
<argument>${dockcross.architecture}</argument>
173-
<argument>${javacan.architecture}</argument>
174-
</arguments>
175-
</configuration>
176-
</execution>
177-
</executions>
178-
</plugin>
179-
<plugin>
180-
<groupId>org.apache.maven.plugins</groupId>
181-
<artifactId>maven-jar-plugin</artifactId>
182-
<version>3.1.2</version>
183-
<executions>
184-
<execution>
185-
<id>native-default</id>
186-
<phase>package</phase>
187-
<goals>
188-
<goal>jar</goal>
189-
</goals>
190-
<configuration>
191-
<classifier>${javacan.architecture}</classifier>
192-
<classesDirectory>${project.build.directory}/native/${javacan.architecture}</classesDirectory>
193-
</configuration>
194-
</execution>
195-
</executions>
196-
</plugin>
197151
</plugins>
198152
</pluginManagement>
199153
<plugins>
@@ -204,9 +158,9 @@
204158
<configuration>
205159
<autoVersionSubmodules>true</autoVersionSubmodules>
206160
<useReleaseProfile>false</useReleaseProfile>
207-
<releaseProfiles>${releaseProfile}</releaseProfiles>
161+
<releaseProfiles>release-javacan</releaseProfiles>
208162
<goals>deploy</goals>
209-
<arguments>-P${releaseProfile},all-architectures,test</arguments>
163+
<arguments>-Prelease-javacan,all-architectures,test</arguments>
210164
</configuration>
211165
</plugin>
212166
<plugin>
@@ -361,26 +315,50 @@
361315
<activation>
362316
<activeByDefault>true</activeByDefault>
363317
</activation>
364-
<properties>
365-
<javacan.architecture>x86_64</javacan.architecture>
366-
</properties>
367318

368319
<build>
369320
<pluginManagement>
370321
<plugins>
322+
<plugin>
323+
<groupId>org.codehaus.mojo</groupId>
324+
<artifactId>exec-maven-plugin</artifactId>
325+
<version>1.6.0</version>
326+
<configuration>
327+
<workingDirectory>${project.basedir}</workingDirectory>
328+
<executable>./compile-native.sh</executable>
329+
</configuration>
330+
<executions>
331+
<execution>
332+
<id>compile-native-${javacan.architecture}</id>
333+
<phase>compile</phase>
334+
<goals>
335+
<goal>exec</goal>
336+
</goals>
337+
<configuration>
338+
<arguments>
339+
<argument>${java.home}</argument>
340+
<argument>${project.artifactId}</argument>
341+
<argument>${project.version}</argument>
342+
<argument>${dockcross.architecture}</argument>
343+
<argument>${javacan.architecture}</argument>
344+
</arguments>
345+
</configuration>
346+
</execution>
347+
</executions>
348+
</plugin>
371349
<plugin>
372350
<groupId>org.apache.maven.plugins</groupId>
373351
<artifactId>maven-jar-plugin</artifactId>
374352
<executions>
375353
<execution>
376-
<id>native-x86_64</id>
354+
<id>native-${javacan.architecture}</id>
377355
<phase>package</phase>
378356
<goals>
379357
<goal>jar</goal>
380358
</goals>
381359
<configuration>
382-
<classifier>x86_64</classifier>
383-
<classesDirectory>${project.build.directory}/native/x86_64</classesDirectory>
360+
<classifier>${javacan.architecture}</classifier>
361+
<classesDirectory>${project.build.directory}/native/${javacan.architecture}</classesDirectory>
384362
</configuration>
385363
</execution>
386364
</executions>

0 commit comments

Comments
 (0)