OSDN Git Service

fixed maven platform poms
[mikumikustudio/libgdx-mikumikustudio.git] / gdx / jni / maven / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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/maven-v4_0_0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4     <parent>
5         <groupId>com.badlogicgames.gdx</groupId>
6         <artifactId>gdx-parent</artifactId>
7         <version>0.9.9-SNAPSHOT</version>
8         <relativePath>../../..</relativePath>
9     </parent>
10     
11     <artifactId>gdx-platform</artifactId>
12     <packaging>jar</packaging>
13     <name>libGDX Native Libraries</name>
14     
15     <properties>
16         <base.url>http://libgdx.badlogicgames.com/nightlies/dist</base.url>
17     </properties>
18     
19     <dependencies>
20     </dependencies>
21     
22     <build>
23         <sourceDirectory>src</sourceDirectory>
24         
25         <plugins>
26             <!-- first download an unpack the native libraries -->
27             <plugin>
28                 <groupId>com.googlecode.maven-download-plugin</groupId>
29                 <artifactId>maven-download-plugin</artifactId>
30                 <version>1.0.0</version>
31                 <executions>
32                     <execution>
33                         <id>desktop</id>
34                         <phase>process-resources</phase>
35                         <goals><goal>wget</goal></goals>
36                         <configuration>
37                             <cacheDirectory>${project.build.directory}/download-cache</cacheDirectory>
38                             <url>${base.url}/gdx-natives.jar</url>
39                             <unpack>true</unpack>
40                             <outputDirectory>${project.build.directory}/desktop</outputDirectory>
41                         </configuration>
42                     </execution>
43                     
44
45                     <execution>
46                         <id>armeabi-gdx</id>
47                         <phase>process-resources</phase>
48                         <goals><goal>wget</goal></goals>
49                         <configuration>
50                             <cacheDirectory>${project.build.directory}/download-cache/armeabi</cacheDirectory>
51                             <url>${base.url}/armeabi/libgdx.so</url>
52                             <outputDirectory>${project.build.directory}/armeabi</outputDirectory>
53                         </configuration>
54                     </execution>
55                     
56                     <execution>
57                         <id>armeabi-v7a-gdx</id>
58                         <phase>process-resources</phase>
59                         <goals><goal>wget</goal></goals>
60                         <configuration>
61                             <cacheDirectory>${project.build.directory}/download-cache/armeabi-v7a</cacheDirectory>
62                             <url>${base.url}/armeabi-v7a/libgdx.so</url>
63                             <outputDirectory>${project.build.directory}/armeabi-v7a</outputDirectory>
64                         </configuration>
65                     </execution>
66                 </executions>
67             </plugin>
68             
69             <!-- if we have pre-built versions, replace the downloaded versions with those -->
70             <plugin>
71                 <artifactId>maven-resources-plugin</artifactId>
72                 <version>2.6</version>
73                 <executions>
74                     <execution>
75                         <id>copy-local-desktop</id>
76                         <phase>prepare-package</phase>
77                         <goals>
78                             <goal>copy-resources</goal>
79                         </goals>
80                         <configuration>
81                             <resources>
82                                 <resource><directory>${basedir}/../../libs/linux32</directory></resource>
83                                 <resource><directory>${basedir}/../../libs/linux64</directory></resource>
84                                 <resource><directory>${basedir}/../../libs/macosx32</directory></resource>
85                                 <resource><directory>${basedir}/../../libs/windows32</directory></resource>
86                                 <resource><directory>${basedir}/../../libs/windows64</directory></resource>
87                             </resources>
88                             <outputDirectory>${basedir}/target/desktop</outputDirectory>
89                             <overwrite>true</overwrite>
90                         </configuration>
91                     </execution>
92                     <execution>
93                         <id>copy-local-armeabi</id>
94                         <phase>prepare-package</phase>
95                         <goals>
96                             <goal>copy-resources</goal>
97                         </goals>
98                         <configuration>
99                             <resources>
100                                 <resource><directory>${basedir}/../../libs/armeabi</directory></resource>
101                             </resources>
102                             <outputDirectory>${basedir}/target/armeabi</outputDirectory>
103                             <overwrite>true</overwrite>
104                         </configuration>
105                     </execution>
106                     <execution>
107                         <id>copy-local-armeabi-v7a</id>
108                         <phase>prepare-package</phase>
109                         <goals>
110                             <goal>copy-resources</goal>
111                         </goals>
112                         <configuration>
113                             <resources>
114                                 <resource><directory>${basedir}/../../libs/armeabi-v7a</directory></resource>
115                             </resources>
116                             <outputDirectory>${basedir}/target/armeabi-v7a</outputDirectory>
117                             <overwrite>true</overwrite>
118                         </configuration>
119                     </execution>
120                 </executions>
121             </plugin>
122             
123             <!-- finally package everything up into jar files -->
124             <plugin>
125                 <artifactId>maven-assembly-plugin</artifactId>
126                 <version>2.4</version>
127                 <configuration>
128                     <descriptors>
129                         <descriptor>desktop.xml</descriptor>
130                         <descriptor>armeabi.xml</descriptor>
131                         <descriptor>armeabi-v7a.xml</descriptor>
132                     </descriptors>
133                 </configuration>
134                 <executions>
135                     <execution>
136                         <id>make-assembly</id>
137                         <phase>package</phase>
138                         <goals>
139                             <goal>single</goal>
140                         </goals>
141                     </execution>
142                 </executions>
143             </plugin>
144         </plugins>
145     </build>
146 </project>