Home | History | Annotate | Download | only in eclipse
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  This script builds Eclipse plugins, and the monitor & adt-bundle products.
      4 
      5  To run this script:
      6    - Have Maven3 in your path
      7    - $ mvn package -DANDROID_OUT=/path/to/android/out
      8 
      9  See http://wiki.eclipse.org/Tycho/Reference_Card#Examplary_parent_POM
     10  -->
     11 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     12     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     13     <modelVersion>4.0.0</modelVersion>
     14 
     15     <groupId>adt.group</groupId>
     16     <artifactId>parent</artifactId>
     17     <version>1.0.0-SNAPSHOT</version>
     18     <packaging>pom</packaging>
     19     <name>ADT</name>
     20 
     21     <!-- Common properties used in all modules -->
     22     <properties>
     23         <tycho-version>0.20.0</tycho-version>
     24         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     25     </properties>
     26 
     27     <!--
     28     The following profiles allow us to change the build environment easily. The first profile uses
     29     the target platform as present inside the Android tree's out folder, while the other profile
     30     uses the target platform directly from eclipse.org.
     31 
     32     The first profile is automatically activated if the ANDROID_OUT system property is set:
     33         $ mvn clean install -DANDROID_OUT=/path/to/android/out
     34     The other profile can be tested out by:
     35         $ mvn clean install -Pexternal-p2-repositories
     36     -->
     37     <profiles>
     38         <profile>
     39             <id>mirrored-p2-repositories</id>
     40             <activation>
     41                 <property>
     42                     <name>ANDROID_OUT</name>
     43                 </property>
     44             </activation>
     45             <properties>
     46                 <!-- The target platform should have been created under the Android ANDROID_OUT folder -->
     47                 <target-platform.base.url>file://${ANDROID_OUT}/host/maven/target</target-platform.base.url>
     48             </properties>
     49             <repositories>
     50                 <repository>
     51                     <id>kepler</id>
     52                     <url>${target-platform.base.url}/platform</url>
     53                     <layout>p2</layout>
     54                 </repository>
     55                 <repository>
     56                     <id>jdt</id>
     57                     <url>${target-platform.base.url}/jdt</url>
     58                     <layout>p2</layout>
     59                 </repository>
     60                 <repository>
     61                     <id>cdt</id>
     62                     <url>${target-platform.base.url}/cdt</url>
     63                     <layout>p2</layout>
     64                 </repository>
     65                 <repository>
     66                     <id>emf</id>
     67                     <url>${target-platform.base.url}/emf</url>
     68                     <layout>p2</layout>
     69                 </repository>
     70                 <repository>
     71                     <id>wtp</id>
     72                     <url>${target-platform.base.url}/wtp</url>
     73                     <layout>p2</layout>
     74                 </repository>
     75                 <repository>
     76                     <id>gef</id>
     77                     <url>${target-platform.base.url}/gef</url>
     78                     <layout>p2</layout>
     79                 </repository>
     80                 <repository>
     81                     <id>pde</id>
     82                     <url>${target-platform.base.url}/pde</url>
     83                     <layout>p2</layout>
     84                 </repository>
     85                 <repository>
     86                     <id>egit</id>
     87                     <url>${target-platform.base.url}/egit</url>
     88                     <layout>p2</layout>
     89                 </repository>
     90             </repositories>
     91         </profile>
     92         <profile>
     93             <id>external-p2-repositories</id>
     94             <repositories>
     95                <repository>
     96                    <id>kepler</id>
     97                    <url>http://download.eclipse.org/releases/kepler</url>
     98                    <layout>p2</layout>
     99                </repository>
    100             </repositories>
    101         </profile>
    102     </profiles>
    103 
    104     <modules>
    105         <module>plugins/com.android.ide.eclipse.base</module>
    106         <module>plugins/com.android.ide.eclipse.ddms</module>
    107         <module>plugins/com.android.ide.eclipse.gldebugger</module>
    108         <module>plugins/com.android.ide.eclipse.hierarchyviewer</module>
    109         <module>plugins/com.android.ide.eclipse.monitor</module>
    110         <module>plugins/com.android.ide.eclipse.traceview</module>
    111 
    112         <module>plugins/com.android.ide.eclipse.adt</module>
    113         <module>plugins/com.android.ide.eclipse.adt.overlay</module>
    114         <module>plugins/com.android.ide.eclipse.adt.package</module>
    115         <module>plugins/com.android.ide.eclipse.ndk</module>
    116 
    117         <module>features/com.android.ide.eclipse.ddms</module>
    118         <module>features/com.android.ide.eclipse.gldebugger</module>
    119         <module>features/com.android.ide.eclipse.hierarchyviewer</module>
    120         <module>features/com.android.ide.eclipse.traceview</module>
    121         <module>features/com.android.ide.eclipse.monitor</module>
    122 
    123         <module>features/com.android.ide.eclipse.adt</module>
    124         <module>features/com.android.ide.eclipse.adt.package</module>
    125         <module>features/com.android.ide.eclipse.ndk</module>
    126 
    127         <module>artifacts/p2repo</module>
    128         <module>artifacts/bundles</module>
    129     </modules>
    130 
    131     <build>
    132         <!-- Path is relative to each of the build modules defined above. -->
    133         <directory>../../../../out/host/maven/${project.artifactId}-${project.version}</directory>
    134 
    135         <plugins>
    136             <plugin>
    137                 <groupId>org.eclipse.tycho</groupId>
    138                 <artifactId>target-platform-configuration</artifactId>
    139                 <version>${tycho-version}</version>
    140                 <configuration>
    141                     <!--
    142                     <target>
    143                         <artifact>
    144                             <groupId>adt.group</groupId>
    145                             <artifactId>helios</artifactId>
    146                             <version>1.0.0-SNAPSHOT</version>
    147                         </artifact>
    148                     </target> -->
    149                     <environments>
    150                         <environment>
    151                             <os>win32</os>
    152                             <ws>win32</ws>
    153                             <arch>x86</arch>
    154                         </environment>
    155                         <environment>
    156                             <os>win32</os>
    157                             <ws>win32</ws>
    158                             <arch>x86_64</arch>
    159                         </environment>
    160                         <environment>
    161                             <os>linux</os>
    162                             <ws>gtk</ws>
    163                             <arch>x86</arch>
    164                         </environment>
    165                         <environment>
    166                             <os>macosx</os>
    167                             <ws>cocoa</ws>
    168                             <arch>x86_64</arch>
    169                         </environment>
    170                         <environment>
    171                             <os>linux</os>
    172                             <ws>gtk</ws>
    173                             <arch>x86_64</arch>
    174                         </environment>
    175                     </environments>
    176                 </configuration>
    177             </plugin>
    178 
    179             <plugin>
    180                 <groupId>org.eclipse.tycho</groupId>
    181                 <artifactId>tycho-maven-plugin</artifactId>
    182                 <version>${tycho-version}</version>
    183                 <extensions>true</extensions>
    184             </plugin>
    185 
    186             <plugin>
    187                 <groupId>org.eclipse.tycho</groupId>
    188                 <artifactId>tycho-p2-repository-plugin</artifactId>
    189                 <version>${tycho-version}</version>
    190                 <configuration>
    191                     <includeAllDependencies>true</includeAllDependencies>
    192                 </configuration>
    193             </plugin>
    194         </plugins>
    195         <!--
    196           Don't include META-INF/maven in the jar files, this causes an unnecessary increase in the
    197           path length as that folder contained the files with the longest paths (one path was 190 chars).
    198           Windows has a limit of ~260 chars, but removing all the maven info lowers our max path length
    199           from 190 to about 150.
    200         -->
    201         <pluginManagement>
    202             <plugins>
    203                 <plugin>
    204                     <groupId>org.eclipse.tycho</groupId>
    205                     <artifactId>tycho-packaging-plugin</artifactId>
    206                     <version>${tycho-version}</version>
    207                     <configuration>
    208                         <archive>
    209                             <addMavenDescriptor>false</addMavenDescriptor>
    210                         </archive>
    211                     </configuration>
    212                 </plugin>
    213             </plugins>
    214         </pluginManagement>
    215     </build>
    216 </project>
    217