apiguardian: package init

This commit is contained in:
yiyurain 2020-03-12 10:12:28 +08:00
parent 6e9716ed67
commit 7cb3db1069
3 changed files with 104 additions and 0 deletions

29
apiguardian-api-1.0.0.pom Normal file
View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apiguardian</groupId>
<artifactId>apiguardian-api</artifactId>
<version>1.0.0</version>
<name>org.apiguardian:apiguardian-api</name>
<description>@API Guardian</description>
<url>https://github.com/apiguardian-team/apiguardian</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<id>apiguardian</id>
<name>@API Guardian Team</name>
<email>team@apiguardian.org</email>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/apiguardian-team/apiguardian.git</connection>
<developerConnection>scm:git:git://github.com/apiguardian-team/apiguardian.git</developerConnection>
<url>https://github.com/apiguardian-team/apiguardian</url>
</scm>
</project>

75
apiguardian.spec Normal file
View File

@ -0,0 +1,75 @@
Name: apiguardian
Version: 1.0.0
Release: 4
Summary: API Guardian Java annotation
License: ASL 2.0
URL: https://github.com/apiguardian-team/apiguardian
Source0: https://github.com/apiguardian-team/apiguardian/archive/r%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/org/apiguardian/apiguardian-api/%{version}/apiguardian-api-%{version}.pom
BuildArch: noarch
BuildRequires: maven-local
%description
API Guardian indicates the status of an API element and therefore its
level of stability as well. It is used to annotate public types,
methods, constructors, and fields within a framework or application in
order to publish their API status and level of stability and to
indicate how they are intended to be used by consumers of the API.
%package javadoc
Summary: Javadoc for apiguardian
%description javadoc
API documentation for apiguardian.
%prep
%autosetup -n apiguardian-r%{version}
find -name \*.jar -exec rm -f {} \;
cp -p %{SOURCE1} pom.xml
# Inject OSGi manifest required by Eclipse
%pom_xpath_inject pom:project "
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.apiguardian.api</Automatic-Module-Name>
<Implementation-Title>apiguardian-api</Implementation-Title>
<Implementation-Vendor>apiguardian.org</Implementation-Vendor>
<Implementation-Version>%{version}</Implementation-Version>
<Specification-Title>apiguardian-api</Specification-Title>
<Specification-Vendor>apiguardian.org</Specification-Vendor>
<Specification-Version>%{version}</Specification-Version>
<!-- OSGi metadata required by Eclipse -->
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-SymbolicName>org.apiguardian</Bundle-SymbolicName>
<Bundle-Version>%{version}</Bundle-Version>
<Export-Package>org.apiguardian.api;version=\"%{version}\"</Export-Package>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>"
%build
%mvn_build
%install
%mvn_install
%files -f .mfiles
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Wed Mar 11 2020 zoushuangshuang <zoushuangshuang@huawei.com> - 1.0.0-4
- Package init

BIN
r1.0.0.tar.gz Normal file

Binary file not shown.