Home | History | Annotate | Download | only in eclipse
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!--
      3  This script builds the monitor product which is composed of a bunch of Eclipse plugins.
      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             </repositories>
     61         </profile>
     62         <profile>
     63             <id>external-p2-repositories</id>
     64             <repositories>
     65                <repository>
     66                    <id>kepler</id>
     67                    <url>http://download.eclipse.org/releases/kepler</url>
     68                    <layout>p2</layout>
     69                </repository>
     70             </repositories>
     71         </profile>
     72     </profiles>
     73 
     74     <modules>
     75         <module>plugins/com.android.ide.eclipse.base</module>
     76         <module>plugins/com.android.ide.eclipse.ddms</module>
     77         <module>plugins/com.android.ide.eclipse.gldebugger</module>
     78         <module>plugins/com.android.ide.eclipse.hierarchyviewer</module>
     79         <module>plugins/com.android.ide.eclipse.monitor</module>
     80         <module>plugins/com.android.ide.eclipse.traceview</module>
     81 
     82         <module>features/com.android.ide.eclipse.ddms</module>
     83         <module>features/com.android.ide.eclipse.gldebugger</module>
     84         <module>features/com.android.ide.eclipse.hierarchyviewer</module>
     85         <module>features/com.android.ide.eclipse.traceview</module>
     86         <module>features/com.android.ide.eclipse.monitor</module>
     87 
     88         <module>artifacts/bundles</module>
     89     </modules>
     90 
     91     <build>
     92         <!-- Path is relative to each of the build modules defined above. -->
     93         <directory>../../../../out/host/maven/${project.artifactId}-${project.version}</directory>
     94 
     95         <plugins>
     96             <plugin>
     97                 <groupId>org.eclipse.tycho</groupId>
     98                 <artifactId>target-platform-configuration</artifactId>
     99                 <version>${tycho-version}</version>
    100                 <configuration>
    101                     <environments>
    102                         <environment>
    103                             <os>win32</os>
    104                             <ws>win32</ws>
    105                             <arch>x86</arch>
    106                         </environment>
    107                         <environment>
    108                             <os>win32</os>
    109                             <ws>win32</ws>
    110                             <arch>x86_64</arch>
    111                         </environment>
    112                         <environment>
    113                             <os>linux</os>
    114                             <ws>gtk</ws>
    115                             <arch>x86</arch>
    116                         </environment>
    117                         <environment>
    118                             <os>macosx</os>
    119                             <ws>cocoa</ws>
    120                             <arch>x86_64</arch>
    121                         </environment>
    122                         <environment>
    123                             <os>linux</os>
    124                             <ws>gtk</ws>
    125                             <arch>x86_64</arch>
    126                         </environment>
    127                     </environments>
    128                 </configuration>
    129             </plugin>
    130 
    131             <plugin>
    132                 <groupId>org.eclipse.tycho</groupId>
    133                 <artifactId>tycho-maven-plugin</artifactId>
    134                 <version>${tycho-version}</version>
    135                 <extensions>true</extensions>
    136             </plugin>
    137 
    138             <plugin>
    139                 <groupId>org.eclipse.tycho</groupId>
    140                 <artifactId>tycho-p2-repository-plugin</artifactId>
    141                 <version>${tycho-version}</version>
    142                 <configuration>
    143                     <includeAllDependencies>true</includeAllDependencies>
    144                 </configuration>
    145             </plugin>
    146         </plugins>
    147         <!--
    148           Don't include META-INF/maven in the jar files, this causes an unnecessary increase in the
    149           path length as that folder contained the files with the longest paths (one path was 190 chars).
    150           Windows has a limit of ~260 chars, but removing all the maven info lowers our max path length
    151           from 190 to about 150.
    152         -->
    153         <pluginManagement>
    154             <plugins>
    155                 <plugin>
    156                     <groupId>org.eclipse.tycho</groupId>
    157                     <artifactId>tycho-packaging-plugin</artifactId>
    158                     <version>${tycho-version}</version>
    159                     <configuration>
    160                         <archive>
    161                             <addMavenDescriptor>false</addMavenDescriptor>
    162                         </archive>
    163                     </configuration>
    164                 </plugin>
    165             </plugins>
    166         </pluginManagement>
    167     </build>
    168 </project>
    169