|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +
|
| 4 | + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| 5 | +
|
| 6 | + Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved. |
| 7 | +
|
| 8 | + The contents of this file are subject to the terms of either the GNU |
| 9 | + General Public License Version 2 only ("GPL") or the Common Development |
| 10 | + and Distribution License("CDDL") (collectively, the "License"). You |
| 11 | + may not use this file except in compliance with the License. You can |
| 12 | + obtain a copy of the License at |
| 13 | + https://oss.oracle.com/licenses/CDDL+GPL-1.1 |
| 14 | + or LICENSE.txt. See the License for the specific |
| 15 | + language governing permissions and limitations under the License. |
| 16 | +
|
| 17 | + When distributing the software, include this License Header Notice in each |
| 18 | + file and include the License file at LICENSE.txt. |
| 19 | +
|
| 20 | + GPL Classpath Exception: |
| 21 | + Oracle designates this particular file as subject to the "Classpath" |
| 22 | + exception as provided by Oracle in the GPL Version 2 section of the License |
| 23 | + file that accompanied this code. |
| 24 | +
|
| 25 | + Modifications: |
| 26 | + If applicable, add the following below the License Header, with the fields |
| 27 | + enclosed by brackets [] replaced by your own identifying information: |
| 28 | + "Portions Copyright [year] [name of copyright owner]" |
| 29 | +
|
| 30 | + Contributor(s): |
| 31 | + If you wish your version of this file to be governed by only the CDDL or |
| 32 | + only the GPL Version 2, indicate your decision by adding "[Contributor] |
| 33 | + elects to include this software in this distribution under the [CDDL or GPL |
| 34 | + Version 2] license." If you don't indicate a single choice of license, a |
| 35 | + recipient has the option to distribute your version of this file under |
| 36 | + either the CDDL, the GPL Version 2 or to extend the choice of license to |
| 37 | + its licensees as provided above. However, if you add GPL Version 2 code |
| 38 | + and therefore, elected the GPL Version 2 license, then the option applies |
| 39 | + only if the new code is made subject to such option by the copyright |
| 40 | + holder. |
| 41 | +
|
| 42 | +--> |
| 43 | + |
| 44 | +<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"> |
| 45 | + <modelVersion>4.0.0</modelVersion> |
| 46 | + <parent> |
| 47 | + <groupId>net.java</groupId> |
| 48 | + <artifactId>jvnet-parent</artifactId> |
| 49 | + <version>5</version> |
| 50 | + </parent> |
| 51 | + <groupId>org.glassfish.external</groupId> |
| 52 | + <artifactId>jsch</artifactId> |
| 53 | + <version>0.1.55-SNAPSHOT</version> |
| 54 | + |
| 55 | + <name>jsch repackaged as an OSGI bundle</name> |
| 56 | + |
| 57 | + <properties> |
| 58 | + <jsch.version>0.1.54</jsch.version> |
| 59 | + <release.arguments /> |
| 60 | + </properties> |
| 61 | + |
| 62 | + <licenses> |
| 63 | + <license> |
| 64 | + <name>CDDL + GPLv2 with classpath exception</name> |
| 65 | + <url>https://oss.oracle.com/licenses/CDDL+GPL-1.1</url> |
| 66 | + <distribution>repo</distribution> |
| 67 | + <comments>A business-friendly OSS license</comments> |
| 68 | + </license> |
| 69 | + </licenses> |
| 70 | + |
| 71 | + <scm> |
| 72 | + <connection>scm:git:git@github.com:javaee/repackaged.git</connection> |
| 73 | + <developerConnection>scm:git:git@github.com:javaee/repackaged.git</developerConnection> |
| 74 | + <url>https://github.com/javaee/repackaged.git</url> |
| 75 | + </scm> |
| 76 | + |
| 77 | + <issueManagement> |
| 78 | + <system>IssueTracker</system> |
| 79 | + <url>https://github.com/javaee/repackaged/issues</url> |
| 80 | + </issueManagement> |
| 81 | + |
| 82 | + <build> |
| 83 | + <pluginManagement> |
| 84 | + <plugins> |
| 85 | + <plugin> |
| 86 | + <groupId>org.apache.felix</groupId> |
| 87 | + <artifactId>maven-bundle-plugin</artifactId> |
| 88 | + <version>3.3.0</version> |
| 89 | + </plugin> |
| 90 | + <plugin> |
| 91 | + <groupId>org.apache.maven.plugins</groupId> |
| 92 | + <artifactId>maven-dependency-plugin</artifactId> |
| 93 | + <version>2.8</version> |
| 94 | + </plugin> |
| 95 | + <plugin> |
| 96 | + <groupId>org.apache.maven.plugins</groupId> |
| 97 | + <artifactId>maven-source-plugin</artifactId> |
| 98 | + <version>3.0.1</version> |
| 99 | + </plugin> |
| 100 | + <plugin> |
| 101 | + <groupId>org.apache.maven.plugins</groupId> |
| 102 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 103 | + <version>2.9.1</version> |
| 104 | + <configuration> |
| 105 | + <additionalparam>${javadoc.options}</additionalparam> |
| 106 | + </configuration> |
| 107 | + </plugin> |
| 108 | + <plugin> |
| 109 | + <groupId>org.codehaus.mojo</groupId> |
| 110 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 111 | + <version>1.8</version> |
| 112 | + </plugin> |
| 113 | + <plugin> |
| 114 | + <groupId>org.apache.maven.plugins</groupId> |
| 115 | + <artifactId>maven-gpg-plugin</artifactId> |
| 116 | + <version>1.4</version> |
| 117 | + </plugin> |
| 118 | + <plugin> |
| 119 | + <groupId>org.apache.maven.plugins</groupId> |
| 120 | + <artifactId>maven-enforcer-plugin</artifactId> |
| 121 | + <version>1.3.1</version> |
| 122 | + </plugin> |
| 123 | + <plugin> |
| 124 | + <groupId>org.apache.maven.plugins</groupId> |
| 125 | + <artifactId>maven-compiler-plugin</artifactId> |
| 126 | + <version>3.1</version> |
| 127 | + </plugin> |
| 128 | + <plugin> |
| 129 | + <groupId>org.apache.maven.plugins</groupId> |
| 130 | + <artifactId>maven-jar-plugin</artifactId> |
| 131 | + <version>2.4</version> |
| 132 | + </plugin> |
| 133 | + </plugins> |
| 134 | + </pluginManagement> |
| 135 | + <plugins> |
| 136 | + <plugin> |
| 137 | + <groupId>org.apache.felix</groupId> |
| 138 | + <artifactId>maven-bundle-plugin</artifactId> |
| 139 | + <configuration> |
| 140 | + <instructions> |
| 141 | + <Embed-Dependency> |
| 142 | + *;scope=compile;inline=true |
| 143 | + </Embed-Dependency> |
| 144 | + <!-- Export everything from the embedded jar |
| 145 | + in the final bundle |
| 146 | + --> |
| 147 | + <!-- Exclude unnecessary imports --> |
| 148 | + <Export-Package>*;version=${jsch.version}</Export-Package> |
| 149 | + <Import-Package>!com.jcraft.jzlib,*</Import-Package> |
| 150 | + <Private-Package>!*</Private-Package> |
| 151 | + </instructions> |
| 152 | + <!-- Maven uses the output directory (target/classes) |
| 153 | + rather than the final bundle, when compiling against |
| 154 | + projects in the same reactor (ie. the same build). |
| 155 | + Since this jar comprises of classes that come from |
| 156 | + some other jar and other modules depend on this |
| 157 | + artifact, we need to unpack. |
| 158 | + --> |
| 159 | + <unpackBundle>true</unpackBundle> |
| 160 | + </configuration> |
| 161 | + <executions> |
| 162 | + <execution> |
| 163 | + <id>osgi-bundle</id> |
| 164 | + <phase>package</phase> |
| 165 | + <goals> |
| 166 | + <goal>bundle</goal> |
| 167 | + </goals> |
| 168 | + </execution> |
| 169 | + </executions> |
| 170 | + </plugin> |
| 171 | + <!-- |
| 172 | + unpack and attach the sources.jar(s) available |
| 173 | + This allows us to generate proper sources.jar and javadoc.jar |
| 174 | + --> |
| 175 | + <plugin> |
| 176 | + <groupId>org.apache.maven.plugins</groupId> |
| 177 | + <artifactId>maven-dependency-plugin</artifactId> |
| 178 | + <executions> |
| 179 | + <execution> |
| 180 | + <id>add-source-step1</id> |
| 181 | + <goals> |
| 182 | + <goal>unpack</goal> |
| 183 | + </goals> |
| 184 | + <phase>generate-sources</phase> |
| 185 | + <configuration> |
| 186 | + <artifactItems> |
| 187 | + <artifactItem> |
| 188 | + <groupId>com.jcraft</groupId> |
| 189 | + <artifactId>jsch</artifactId> |
| 190 | + <version>${jsch.version}</version> |
| 191 | + <classifier>sources</classifier> |
| 192 | + <outputDirectory>${project.build.directory}/sources</outputDirectory> |
| 193 | + </artifactItem> |
| 194 | + </artifactItems> |
| 195 | + </configuration> |
| 196 | + </execution> |
| 197 | + </executions> |
| 198 | + </plugin> |
| 199 | + <plugin> |
| 200 | + <groupId>org.codehaus.mojo</groupId> |
| 201 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 202 | + <executions> |
| 203 | + <execution> |
| 204 | + <id>add-source-step2</id> |
| 205 | + <phase>generate-sources</phase> |
| 206 | + <goals> |
| 207 | + <goal>add-source</goal> |
| 208 | + </goals> |
| 209 | + <configuration> |
| 210 | + <sources> |
| 211 | + <source>${project.build.directory}/sources</source> |
| 212 | + </sources> |
| 213 | + </configuration> |
| 214 | + </execution> |
| 215 | + </executions> |
| 216 | + </plugin> |
| 217 | + <!-- |
| 218 | + We unpack and attach source before compile happens</plugins> |
| 219 | + We disable default-compile, to make sure we don't recompile sources |
| 220 | + --> |
| 221 | + <plugin> |
| 222 | + <groupId>org.apache.maven.plugins</groupId> |
| 223 | + <artifactId>maven-compiler-plugin</artifactId> |
| 224 | + <executions> |
| 225 | + <execution> |
| 226 | + <id>default-compile</id> |
| 227 | + <configuration> |
| 228 | + <skipMain>true</skipMain> |
| 229 | + </configuration> |
| 230 | + </execution> |
| 231 | + </executions> |
| 232 | + </plugin> |
| 233 | + <plugin> |
| 234 | + <groupId>org.apache.maven.plugins</groupId> |
| 235 | + <artifactId>maven-jar-plugin</artifactId> |
| 236 | + <executions> |
| 237 | + <execution> |
| 238 | + <id>default-jar</id> |
| 239 | + <configuration> |
| 240 | + <skipIfEmpty>true</skipIfEmpty> |
| 241 | + </configuration> |
| 242 | + </execution> |
| 243 | + </executions> |
| 244 | + </plugin> |
| 245 | + <plugin> |
| 246 | + <groupId>org.apache.maven.plugins</groupId> |
| 247 | + <artifactId>maven-release-plugin</artifactId> |
| 248 | + <version>2.5.2</version> |
| 249 | + <configuration> |
| 250 | + <mavenExecutorId>forked-path</mavenExecutorId> |
| 251 | + <useReleaseProfile>false</useReleaseProfile> |
| 252 | + <arguments>${release.arguments}</arguments> |
| 253 | + </configuration> |
| 254 | + <dependencies> |
| 255 | + <dependency> |
| 256 | + <groupId>org.apache.maven.scm</groupId> |
| 257 | + <artifactId>maven-scm-provider-gitexe</artifactId> |
| 258 | + <version>1.9.4</version> |
| 259 | + </dependency> |
| 260 | + </dependencies> |
| 261 | + </plugin> |
| 262 | + </plugins> |
| 263 | + </build> |
| 264 | + <dependencies> |
| 265 | + <dependency> |
| 266 | + <groupId>com.jcraft</groupId> |
| 267 | + <artifactId>jsch</artifactId> |
| 268 | + <version>${jsch.version}</version> |
| 269 | + <optional>true</optional> |
| 270 | + </dependency> |
| 271 | + </dependencies> |
| 272 | + <profiles> |
| 273 | + <profile> |
| 274 | + <id>javadoc-jdk8+</id> |
| 275 | + <activation> |
| 276 | + <jdk>[1.8,)</jdk> |
| 277 | + <activeByDefault>false</activeByDefault> |
| 278 | + </activation> |
| 279 | + <properties> |
| 280 | + <javadoc.options>-Xdoclint:none</javadoc.options> |
| 281 | + </properties> |
| 282 | + </profile> |
| 283 | + </profiles> |
| 284 | +</project> |
0 commit comments