xref: /JGit/org.eclipse.jgit.pgm/pom.xml (revision 1cbfea9ece03b40669377a7f858218f6994562ea)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  Copyright (C) 2009-2010, Google Inc. and others
4
5  This program and the accompanying materials are made available under the
6  terms of the Eclipse Distribution License v. 1.0 which is available at
7  http://www.eclipse.org/org/documents/edl-v10.php.
8
9  SPDX-License-Identifier: BSD-3-Clause
10-->
11
12<project xmlns="http://maven.apache.org/POM/4.0.0"
13    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
15  <modelVersion>4.0.0</modelVersion>
16
17  <parent>
18    <groupId>org.eclipse.jgit</groupId>
19    <artifactId>org.eclipse.jgit-parent</artifactId>
20    <version>5.13.0-SNAPSHOT</version>
21  </parent>
22
23  <artifactId>org.eclipse.jgit.pgm</artifactId>
24  <name>JGit - Command Line Interface</name>
25
26  <description>
27    Command line client tools built on top of JGit.
28  </description>
29
30  <properties>
31    <translate-qualifier/>
32    <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
33  </properties>
34
35  <dependencies>
36    <dependency>
37      <groupId>args4j</groupId>
38      <artifactId>args4j</artifactId>
39    </dependency>
40
41    <dependency>
42      <groupId>org.apache.commons</groupId>
43      <artifactId>commons-compress</artifactId>
44    </dependency>
45
46    <dependency>
47      <groupId>org.eclipse.jgit</groupId>
48      <artifactId>org.eclipse.jgit.archive</artifactId>
49      <version>${project.version}</version>
50    </dependency>
51
52    <dependency>
53      <groupId>org.eclipse.jgit</groupId>
54      <artifactId>org.eclipse.jgit</artifactId>
55      <version>${project.version}</version>
56    </dependency>
57
58    <dependency>
59      <groupId>org.eclipse.jgit</groupId>
60      <artifactId>org.eclipse.jgit.ui</artifactId>
61      <version>${project.version}</version>
62    </dependency>
63
64    <dependency>
65      <groupId>org.eclipse.jgit</groupId>
66      <artifactId>org.eclipse.jgit.gpg.bc</artifactId>
67      <version>${project.version}</version>
68    </dependency>
69
70    <dependency>
71      <groupId>org.eclipse.jgit</groupId>
72      <artifactId>org.eclipse.jgit.http.apache</artifactId>
73      <version>${project.version}</version>
74    </dependency>
75
76    <dependency>
77      <groupId>org.eclipse.jgit</groupId>
78      <artifactId>org.eclipse.jgit.ssh.apache</artifactId>
79      <version>${project.version}</version>
80    </dependency>
81
82    <dependency>
83      <groupId>org.eclipse.jgit</groupId>
84      <artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
85      <version>${project.version}</version>
86    </dependency>
87
88    <dependency>
89      <groupId>org.apache.httpcomponents</groupId>
90      <artifactId>httpclient</artifactId>
91    </dependency>
92
93    <dependency>
94      <groupId>org.slf4j</groupId>
95      <artifactId>slf4j-api</artifactId>
96    </dependency>
97
98    <dependency>
99      <groupId>org.slf4j</groupId>
100      <artifactId>slf4j-log4j12</artifactId>
101    </dependency>
102
103    <dependency>
104      <groupId>log4j</groupId>
105      <artifactId>log4j</artifactId>
106    </dependency>
107
108    <dependency>
109      <groupId>org.eclipse.jetty</groupId>
110      <artifactId>jetty-servlet</artifactId>
111    </dependency>
112
113    <dependency>
114      <groupId>org.eclipse.jgit</groupId>
115      <artifactId>org.eclipse.jgit.lfs</artifactId>
116      <version>${project.version}</version>
117    </dependency>
118
119    <dependency>
120      <groupId>org.eclipse.jgit</groupId>
121      <artifactId>org.eclipse.jgit.lfs.server</artifactId>
122      <version>${project.version}</version>
123    </dependency>
124
125    <dependency>
126      <groupId>org.tukaani</groupId>
127      <artifactId>xz</artifactId>
128      <optional>true</optional>
129    </dependency>
130  </dependencies>
131
132  <build>
133    <sourceDirectory>src/</sourceDirectory>
134
135    <resources>
136      <resource>
137        <directory>.</directory>
138        <includes>
139          <include>plugin.properties</include>
140          <include>META-INF/services/org.eclipse.jgit.pgm.TextBuiltin</include>
141          <include>about.html</include>
142        </includes>
143      </resource>
144      <resource>
145        <directory>resources/</directory>
146      </resource>
147    </resources>
148
149    <plugins>
150      <plugin>
151        <artifactId>maven-jar-plugin</artifactId>
152        <configuration>
153          <archive>
154            <manifestFile>${bundle-manifest}</manifestFile>
155          </archive>
156        </configuration>
157      </plugin>
158
159      <plugin>
160        <groupId>org.springframework.boot</groupId>
161        <artifactId>spring-boot-maven-plugin</artifactId>
162        <executions>
163          <execution>
164            <goals>
165              <goal>repackage</goal>
166            </goals>
167            <configuration>
168              <finalName>jgit-cli</finalName>
169              <attach>false</attach>
170              <mainClass>org.eclipse.jgit.pgm.Main</mainClass>
171              <executable>true</executable>
172              <embeddedLaunchScript>jgit.sh</embeddedLaunchScript>
173            </configuration>
174          </execution>
175        </executions>
176      </plugin>
177
178      <plugin>
179        <groupId>org.apache.maven.plugins</groupId>
180        <artifactId>maven-antrun-plugin</artifactId>
181        <executions>
182          <execution>
183            <id>create_jgit</id>
184            <phase>package</phase>
185            <configuration>
186              <target>
187                <move
188                  file="${basedir}/target/jgit-cli.jar"
189                  force="yes"
190                  tofile="${basedir}/target/jgit" />
191                <chmod
192                  file="${basedir}/target/jgit"
193                  perm="a+x" />
194              </target>
195            </configuration>
196            <goals>
197              <goal>run</goal>
198            </goals>
199          </execution>
200          <execution>
201            <id>translate-source-qualifier</id>
202            <phase>generate-resources</phase>
203            <configuration>
204              <target>
205                <copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
206                <replace file="${source-bundle-manifest}">
207                  <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
208                </replace>
209              </target>
210            </configuration>
211            <goals>
212              <goal>run</goal>
213            </goals>
214          </execution>
215        </executions>
216      </plugin>
217
218      <plugin>
219        <groupId>org.apache.maven.plugins</groupId>
220        <artifactId>maven-source-plugin</artifactId>
221        <inherited>true</inherited>
222        <executions>
223          <execution>
224            <id>attach-sources</id>
225            <phase>process-classes</phase>
226            <goals>
227              <goal>jar</goal>
228            </goals>
229            <configuration>
230              <archive>
231                <manifestFile>${source-bundle-manifest}</manifestFile>
232              </archive>
233            </configuration>
234          </execution>
235        </executions>
236      </plugin>
237
238      <plugin>
239        <groupId>org.codehaus.mojo</groupId>
240        <artifactId>build-helper-maven-plugin</artifactId>
241        <executions>
242          <execution>
243            <id>attach_jgit</id>
244            <phase>package</phase>
245            <goals>
246              <goal>attach-artifact</goal>
247            </goals>
248            <configuration>
249              <artifacts>
250                <artifact>
251                  <file>${basedir}/target/jgit</file>
252                  <type>sh</type>
253                </artifact>
254              </artifacts>
255            </configuration>
256          </execution>
257        </executions>
258      </plugin>
259    </plugins>
260  </build>
261</project>
262