• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2
3    Copyright (C) 2010 the original author or authors.
4    See the notice.md file distributed with this work for additional
5    information regarding copyright ownership.
6
7    Licensed under the Apache License, Version 2.0 (the "License");
8    you may not use this file except in compliance with the License.
9    You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18
19-->
20
21<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">
22  <modelVersion>4.0.0</modelVersion>
23  <groupId>com.beust</groupId>
24  <artifactId>jcommander</artifactId>
25  <packaging>jar</packaging>
26  <name>JCommander</name>
27  <version>1.48</version>
28  <description>A Java framework to parse command line options with annotations.</description>
29  <url>http://beust.com/jcommander</url>
30  <licenses>
31    <license>
32      <name>The Apache Software License, Version 2.0</name>
33      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
34      <distribution>repo</distribution>
35    </license>
36  </licenses>
37  <scm>
38    <connection>scm:git:git@github.com:cbeust/jcommander.git</connection>
39    <developerConnection>scm:git:git@github.com:cbeust/jcommander.git</developerConnection>
40    <url>git@github.com:cbeust/jcommander.git</url>
41  </scm>
42
43  <distributionManagement>
44    <repository>
45      <id>sonatype-nexus-staging</id>
46      <name>Nexus Staging Repository</name>
47      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
48    </repository>
49  </distributionManagement>
50
51  <developers>
52    <developer>
53      <name>Cedric Beust</name>
54    </developer>
55  </developers>
56
57  <parent>
58    <groupId>org.sonatype.oss</groupId>
59    <artifactId>oss-parent</artifactId>
60    <version>3</version>
61  </parent>
62
63  <build>
64    <plugins>
65
66      <!-- Bundle sources -->
67      <plugin>
68        <groupId>org.apache.maven.plugins</groupId>
69        <artifactId>maven-source-plugin</artifactId>
70        <version>2.1.1</version>
71        <executions>
72          <execution>
73            <id>attach-sources</id>
74              <goals>
75                <goal>jar</goal>
76              </goals>
77            </execution>
78        </executions>
79      </plugin>
80
81      <!-- Compilation -->
82      <plugin>
83        <groupId>org.apache.maven.plugins</groupId>
84        <artifactId>maven-compiler-plugin</artifactId>
85        <version>2.3.1</version>
86        <configuration>
87          <source>1.5</source>
88          <target>1.5</target>
89          <encoding>UTF-8</encoding>
90        </configuration>
91      </plugin>
92
93      <!-- Resource handling -->
94      <plugin>
95        <groupId>org.apache.maven.plugins</groupId>
96        <artifactId>maven-resources-plugin</artifactId>
97        <version>2.4.1</version>
98        <configuration>
99          <encoding>UTF-8</encoding>
100        </configuration>
101      </plugin>
102
103      <!-- OSGi manifest creation -->
104      <plugin>
105        <groupId>org.apache.felix</groupId>
106        <artifactId>maven-bundle-plugin</artifactId>
107        <version>2.1.0</version>
108        <executions>
109          <execution>
110            <id>bundle-manifest</id>
111            <phase>process-classes</phase>
112            <goals>
113              <goal>manifest</goal>
114            </goals>
115            <configuration>
116              <instructions>
117                <_versionpolicy>$(@)</_versionpolicy>
118              </instructions>
119            </configuration>
120          </execution>
121        </executions>
122      </plugin>
123
124      <!-- Add OSGi manifest in JAR -->
125      <plugin>
126        <groupId>org.apache.maven.plugins</groupId>
127        <artifactId>maven-jar-plugin</artifactId>
128        <version>2.3.1</version>
129        <configuration>
130          <archive>
131            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
132          </archive>
133        </configuration>
134      </plugin>
135
136      <!-- Tests -->
137      <plugin>
138        <groupId>org.apache.maven.plugins</groupId>
139        <artifactId>maven-surefire-plugin</artifactId>
140        <version>2.10</version>
141        <configuration>
142          <skipTests>true</skipTests>
143        </configuration>
144        <dependencies>
145          <dependency>
146            <groupId>com.beust</groupId>
147            <artifactId>jcommander</artifactId>
148            <version>1.30</version>
149<!--
150            <version>${project.version}</version>
151-->
152           </dependency>
153        </dependencies>
154      </plugin>
155
156      <!-- Generating Javadoc -->
157      <plugin>
158        <groupId>org.apache.maven.plugins</groupId>
159        <artifactId>maven-javadoc-plugin</artifactId>
160        <version>2.7</version>
161        <configuration>
162          <excludePackageNames>*.internal</excludePackageNames>
163        </configuration>
164      </plugin>
165    </plugins>
166    <pluginManagement>
167        <plugins>
168            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
169            <plugin>
170                <groupId>org.eclipse.m2e</groupId>
171                <artifactId>lifecycle-mapping</artifactId>
172                <version>1.0.0</version>
173                <configuration>
174                    <lifecycleMappingMetadata>
175                        <pluginExecutions>
176                            <pluginExecution>
177                                <pluginExecutionFilter>
178                                    <groupId>org.apache.felix</groupId>
179                                    <artifactId>
180                                        maven-bundle-plugin
181                                    </artifactId>
182                                    <versionRange>
183                                        [2.1.0,)
184                                    </versionRange>
185                                    <goals>
186                                        <goal>manifest</goal>
187                                    </goals>
188                                </pluginExecutionFilter>
189                                <action>
190                                    <ignore />
191                                </action>
192                            </pluginExecution>
193                        </pluginExecutions>
194                    </lifecycleMappingMetadata>
195                </configuration>
196            </plugin>
197        </plugins>
198    </pluginManagement>
199  </build>
200
201  <dependencies>
202  	<dependency>
203  		<groupId>org.testng</groupId>
204  		<artifactId>testng</artifactId>
205  		<version>6.1.1</version>
206  		<type>jar</type>
207  		<scope>test</scope>
208        <exclusions>
209            <exclusion>
210                <artifactId>jcommander</artifactId>
211                <groupId>com.beust</groupId>
212            </exclusion>
213        </exclusions>
214  	</dependency>
215  </dependencies>
216
217  <profiles>
218
219    <!--
220        Do a license check by running       : mvn -P license license:check
221        UPdate the license check by running : mvn -P license license:format
222      -->
223    <profile>
224      <id>license</id>
225      <build>
226        <plugins>
227          <plugin>
228            <groupId>com.mycila.maven-license-plugin</groupId>
229            <artifactId>maven-license-plugin</artifactId>
230            <version>1.7.0</version>
231            <configuration>
232              <quiet>false</quiet>
233              <header>src/main/license/license-header.txt</header>
234              <includes>
235                  <include>src/**</include>
236                  <include>pom.xml</include>
237              </includes>
238              <excludes>
239                <exclude>**/.git/**</exclude>
240                <!-- ignore files produced during a build -->
241                <exclude>**/target/**</exclude>
242              </excludes>
243              <useDefaultExcludes>false</useDefaultExcludes>
244            </configuration>
245            <executions>
246              <execution>
247                <goals>
248                  <goal>check</goal>
249                </goals>
250              </execution>
251            </executions>
252          </plugin>
253        </plugins>
254      </build>
255    </profile>
256    <!-- Signing with gpg -->
257    <!--
258    Sign the artifacts by calling
259    mvn -P sign [..]
260    -->
261    <profile>
262      <id>sign</id>
263      <build>
264        <plugins>
265          <plugin>
266            <artifactId>maven-gpg-plugin</artifactId>
267            <version>1.4</version>
268            <executions>
269              <execution>
270                <id>sign-artifacts</id>
271                <phase>verify</phase>
272                <goals>
273                  <goal>sign</goal>
274                </goals>
275              </execution>
276            </executions>
277          </plugin>
278        </plugins>
279      </build>
280    </profile>
281  </profiles>
282
283</project>
284