forked from cd2357/tor-binary
-
Notifications
You must be signed in to change notification settings - Fork 8
/
pom.xml
99 lines (90 loc) · 4.4 KB
/
pom.xml
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
<?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">
<parent>
<groupId>com.github.bisq-network.tor-binary</groupId>
<artifactId>tor-binary</artifactId>
<version>0.4.7.10</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tor-binary-windows</artifactId>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<resourceBundles>
<resourceBundle>com.github.bisq-network.tor-binary:tor-binary-resources:${project.version}</resourceBundle>
</resourceBundles>
</configuration>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-compress</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>unpack-windows</id>
<phase>generate-resources</phase>
<configuration>
<target>
<taskdef resource="org/apache/ant/compress/antlib.xml"
classpathref="maven.plugin.classpath"/>
<property name="7z_executable" value="${project.remote-resource.directory}/p7zip/7z" />
<chmod dir="${7z_executable}/.." perm="+x" includes="**/*"/>
<property environment="env" />
<available file="7z" filepath="${env.PATH}" property="7z_executable" value="7z"/>
<delete dir="${project.build.directory}/windows/" failonerror="false" />
<!-- unpack Tor
x unpack
-o destination folder
-aoa Overwrite all existing files without prompt.
-->
<exec executable="${7z_executable}" failonerror="true">
<arg
line="x ${project.remote-resource.directory}/torbrowser-install-${torbrowser.version}_en-US.exe -o${project.build.directory}/windows -aoa Browser/TorBrowser/Tor/*"></arg>
</exec>
<tar destfile="${project.build.directory}/win32.tar">
<tarfileset dir="${project.build.directory}/windows/Browser/TorBrowser/Tor/"
/>
</tar>
<delete dir="${project.basedir}/src/" failonerror="false" />
<delete dir="${project.remote-resource.directory}" />
<xz src="${project.build.directory}/win32.tar"
destfile="${project.basedir}/src/main/resources/native/windows/x86/tor.tar.xz"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>