[forbidden-apis/f22] Initial commit (1190728)

Zdeněk Žamberský zzambers at fedoraproject.org
Fri Feb 20 11:40:36 UTC 2015


commit b5493189bb10360f7966a3936fd0ed85755c3283
Author: Zdenek Zambersky <zzambers at redhat.com>
Date:   Fri Feb 20 12:39:21 2015 +0100

    Initial commit (1190728)

 .gitignore             |   1 +
 forbidden-apis-pom.xml | 180 +++++++++++++++++++++++++++++++++++++++++++++++++
 forbidden-apis.spec    |  81 ++++++++++++++++++++++
 sources                |   1 +
 4 files changed, 263 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..afcd19d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/forbiddenapis-1.7-sources.jar
diff --git a/forbidden-apis-pom.xml b/forbidden-apis-pom.xml
new file mode 100644
index 0000000..2dd4d35
--- /dev/null
+++ b/forbidden-apis-pom.xml
@@ -0,0 +1,180 @@
+<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">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>de.thetaphi</groupId>
+  <artifactId>forbiddenapis</artifactId>
+  <name>Policeman's Forbidden API Checker</name>
+  <packaging>maven-plugin</packaging>
+  <description>Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant, Apache Maven, or CLI)</description>
+  <url>http://code.google.com/p/forbidden-apis/</url>
+  <inceptionYear>2013</inceptionYear>
+  
+  <parent>
+    <groupId>org.sonatype.oss</groupId>
+    <artifactId>oss-parent</artifactId>
+    <version>7</version>
+  </parent>
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+    </license>
+  </licenses>
+  
+  <scm>
+    <connection>scm:svn:http://forbidden-apis.googlecode.com/svn/branches/1.3/</connection>
+    <developerConnection>scm:svn:https://forbidden-apis.googlecode.com/svn/branches/1.3/</developerConnection>
+    <url>http://code.google.com/p/forbidden-apis/source/browse/</url>
+  </scm>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <issueManagement>
+    <system>Google Code Issue Tracker</system>
+    <url>http://code.google.com/p/forbidden-apis/issues/list</url>
+  </issueManagement>
+  
+  <ciManagement>
+    <system>Jenkins</system>
+    <url>http://jenkins.thetaphi.de/job/Forbidden-APIs/</url>
+  </ciManagement>
+
+  <developers>
+    <developer>
+      <id>uwe.h.schindler</id>
+      <name>Uwe Schindler</name>
+      <url>http://www.thetaphi.de/</url>
+      <roles>
+        <role>architect</role>
+        <role>developer</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+    <developer>
+      <id>rcmuir</id>
+      <name>Robert Muir</name>
+      <roles>
+        <role>developer</role>
+        <role>default locale/charset/timezone ghostbuster</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <!-- For ant tasks support -->
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.7.0</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+      <scope>compile</scope>
+      <!-- Don't load in classpath -->
+      <exclusions>
+        <exclusion>
+          <artifactId>asm</artifactId>
+          <groupId>asm</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>asm-commons</artifactId>
+          <groupId>asm</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <!-- For java annotations support -->
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>compile</scope>
+    </dependency>
+    <!-- Used as internal deps -->
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm</artifactId>
+      <version>4.1</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm-commons</artifactId>
+      <version>4.1</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>1.2</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.1</version>
+      <scope>compile</scope>
+    </dependency>
+    <!-- Test deps -->
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant-antunit</artifactId>
+      <version>1.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>ant-contrib</groupId>
+      <artifactId>ant-contrib</artifactId>
+      <version>1.0b3</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
+    <testSourceDirectory>${basedir}/src/test/antunit</testSourceDirectory>
+    <testResources>
+      <testResource>
+        <directory>${project.build.testSourceDirectory}</directory>
+        <excludes>
+          <exclude>**/*.java</exclude>
+        </excludes>
+      </testResource>
+    </testResources>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> 
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <archive>
+            <manifest>
+              <addClasspath>false</addClasspath>
+              <mainClass>de.thetaphi.forbiddenapis.CliMain</mainClass>
+            </manifest>
+            <manifestEntries>
+              <Implementation-Title>${project.artifactId}</Implementation-Title>
+              <Implementation-Vendor>${project.groupId}</Implementation-Vendor>
+              <Implementation-Version>${project.version}</Implementation-Version>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+</project>
diff --git a/forbidden-apis.spec b/forbidden-apis.spec
new file mode 100644
index 0000000..5eaf98e
--- /dev/null
+++ b/forbidden-apis.spec
@@ -0,0 +1,81 @@
+Name:          forbidden-apis
+Version:       1.7
+Release:       1%{?dist}
+Summary:       Generics Policeman's Forbidden API check
+
+Group:         Development/Tools
+License:       ASL 2.0
+URL:           http://code.google.com/p/forbidden-apis/
+BuildArch:     noarch
+
+Source0:       https://oss.sonatype.org/content/repositories/releases/de/thetaphi/forbiddenapis/%{version}/forbiddenapis-%{version}-sources.jar
+
+# Customized pom file
+# Add build/test deps
+# Add maven plugins configuration
+Source1:       %{name}-pom.xml
+
+BuildRequires: java-devel
+BuildRequires: maven-local
+BuildRequires: ant
+BuildRequires: objectweb-asm >= 5
+BuildRequires: dos2unix
+
+Requires: objectweb-asm >= 5
+Requires: java-headless
+
+
+
+
+%description
+This project implements the ANT task (+ Maven Mojo) announced in the Generics
+Policeman Blog. It checks Java byte code against a list of "forbidden" API
+signatures. 
+Allows to parse Java byte code to find invocations of method/class/field
+signatures and fail build (Apache Ant, Apache Maven, or CLI).
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n forbiddenapis-%{version}
+find . -name "*.jar" -print -delete
+find . -name "*.class" -print -delete
+dos2unix LICENSE.txt
+dos2unix NOTICE.txt
+dos2unix README.txt
+
+cp -p %{SOURCE1} pom.xml
+%pom_xpath_inject pom:project "<version>%{version}</version>"
+
+%build
+
+%mvn_file ":%{name}" %{name}
+# Skip test: 
+# - Demo2 needs JDK8 to compile
+# - Not able to run test with maven, requires itself
+%mvn_build -f
+
+%install
+%mvn_install
+
+mkdir -p %{buildroot}%{_sysconfdir}/ant.d
+echo "ant commons-cli %{name} maven/maven-plugin-api maven-plugin-tools/maven-plugin-annotations objectweb-asm/asm objectweb-asm/asm-commons plexus/utils" > %{name}-ant
+install -pm 644 %{name}-ant %{buildroot}%{_sysconfdir}/ant.d/%{name}
+
+%files -f .mfiles
+%config(noreplace) %{_sysconfdir}/ant.d/%{name}
+%doc LICENSE.txt NOTICE.txt README.txt
+
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE.txt NOTICE.txt
+
+%changelog
+* Tue Feb 03 2015 Zdenek Zambersky <zzambers at redhat.com> 1.7-1
+- updated to version 1.7
+- version tag in custom pom.xml is now generated automaticaly
+* Fri Oct 11 2013 gil cattaneo <puntogil at libero.it> 1.3-1
+- initial rpm
diff --git a/sources b/sources
index e69de29..e7e7c88 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+443596c6f2e63ba30e0d2562e70939f8  forbiddenapis-1.7-sources.jar


More information about the scm-commits mailing list