Merge changes I39bfefee,I47795987,I70d120fb,I58cc5e01,I96bee7b9
[jgit.git] / org.eclipse.jgit.pgm / pom.xml
blobd803e00115e844ae4406f3c3c46b0082eb016e26
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (C) 2009-2010, Google Inc.
4    and other copyright owners as documented in the project's IP log.
6    This program and the accompanying materials are made available
7    under the terms of the Eclipse Distribution License v1.0 which
8    accompanies this distribution, is reproduced below, and is
9    available at http://www.eclipse.org/org/documents/edl-v10.php
11    All rights reserved.
13    Redistribution and use in source and binary forms, with or
14    without modification, are permitted provided that the following
15    conditions are met:
17    - Redistributions of source code must retain the above copyright
18      notice, this list of conditions and the following disclaimer.
20    - Redistributions in binary form must reproduce the above
21      copyright notice, this list of conditions and the following
22      disclaimer in the documentation and/or other materials provided
23      with the distribution.
25    - Neither the name of the Eclipse Foundation, Inc. nor the
26      names of its contributors may be used to endorse or promote
27      products derived from this software without specific prior
28      written permission.
30    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
31    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
32    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
33    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
35    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
37    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
38    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
39    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
42    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 -->
45 <project xmlns="http://maven.apache.org/POM/4.0.0"
46     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
47     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
48   <modelVersion>4.0.0</modelVersion>
50   <parent>
51     <groupId>org.eclipse.jgit</groupId>
52     <artifactId>org.eclipse.jgit-parent</artifactId>
53     <version>0.9.0-SNAPSHOT</version>
54   </parent>
56   <artifactId>org.eclipse.jgit.pgm</artifactId>
57   <name>JGit - Command Line Interface</name>
59   <description>
60     Command line client tools built on top of JGit.
61   </description>
63   <dependencies>
64     <dependency>
65       <groupId>args4j</groupId>
66       <artifactId>args4j</artifactId>
67     </dependency>
69     <dependency>
70       <groupId>org.eclipse.jgit</groupId>
71       <artifactId>org.eclipse.jgit</artifactId>
72       <version>${project.version}</version>
73     </dependency>
75     <dependency>
76       <groupId>org.eclipse.jgit</groupId>
77       <artifactId>org.eclipse.jgit.iplog</artifactId>
78       <version>${project.version}</version>
79     </dependency>
81     <dependency>
82       <groupId>org.eclipse.jgit</groupId>
83       <artifactId>org.eclipse.jgit.ui</artifactId>
84       <version>${project.version}</version>
85     </dependency>
86   </dependencies>
88   <profiles>
89     <profile>
90       <id>java6</id>
91       <activation>
92         <activeByDefault>true</activeByDefault>
93       </activation>
94       <dependencies>
95         <dependency>
96           <groupId>org.eclipse.jgit</groupId>
97           <artifactId>org.eclipse.jgit.console</artifactId>
98           <version>${project.version}</version>
99         </dependency>
100       </dependencies>
101     </profile>
102   </profiles>
104   <build>
105     <sourceDirectory>src/</sourceDirectory>
107     <resources>
108       <resource>
109         <directory>.</directory>
110         <includes>
111           <include>META-INF/services/org.eclipse.jgit.pgm.TextBuiltin</include>
112         </includes>
113       </resource>
114       <resource>
115         <directory>resources/</directory>
116       </resource>
117     </resources>
119     <plugins>
120       <plugin>
121         <groupId>org.apache.maven.plugins</groupId>
122         <artifactId>maven-shade-plugin</artifactId>
123         <executions>
124           <execution>
125             <phase>package</phase>
126             <goals>
127               <goal>shade</goal>
128             </goals>
129             <configuration>
130               <finalName>jgit-cli</finalName>
131               <createDependencyReducedPom>false</createDependencyReducedPom>
132               <transformers>
133                 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
134                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
135                   <manifestEntries>
136                     <Main-Class>org.eclipse.jgit.pgm.Main</Main-Class>
137                     <Implementation-Title>JGit Command Line Interface</Implementation-Title>
138                   </manifestEntries>
139                 </transformer>
140               </transformers>
141             </configuration>
142           </execution>
143         </executions>
144       </plugin>
146       <plugin>
147         <groupId>org.apache.maven.plugins</groupId>
148         <artifactId>maven-antrun-plugin</artifactId>
149         <executions>
150           <execution>
151             <id>create_jgit</id>
152             <phase>package</phase>
153             <configuration>
154               <tasks>
155                 <concat destfile="${basedir}/target/jgit" force="yes" binary="true">
156                   <fileset file="${basedir}/jgit.sh" />
157                   <fileset file="${basedir}/target/jgit-cli.jar" />
158                 </concat>
159                 <chmod file="${basedir}/target/jgit" perm="a+x"/>
160               </tasks>
161             </configuration>
162             <goals>
163               <goal>run</goal>
164             </goals>
165           </execution>
166         </executions>
167       </plugin>
169       <plugin>
170         <groupId>org.codehaus.mojo</groupId>
171         <artifactId>build-helper-maven-plugin</artifactId>
172         <executions>
173           <execution>
174             <id>attach_jgit</id>
175             <phase>package</phase>
176             <goals>
177               <goal>attach-artifact</goal>
178             </goals>
179             <configuration>
180               <artifacts>
181                 <artifact>
182                   <file>${basedir}/target/jgit</file>
183                   <type>sh</type>
184                 </artifact>
185               </artifacts>
186             </configuration>
187           </execution>
188         </executions>
189       </plugin>
190     </plugins>
191   </build>
192 </project>