Closed GoogleCodeExporter closed 9 years ago
Hi,
your Maven setup seems to be corrupt. The following messages suggest that you
have some custom configuration that maps the plugin to some file installed
locally (which may be an older version):
[DEBUG] Translation result is [ [JPP:forbiddenapis],
[de.thetaphi:forbiddenapis] ]
[DEBUG] Artifact [de.thetaphi:forbiddenapis:1.3:jar] was resolved to
/usr/share/java/forbiddenapis.jar
By default Maven will not download files to /usr/share. Maybe the JAR file
there is something completely different? Can you post META-INF/MANIFEST.MF ?
Uwe
Original comment by uwe.h.schindler
on 28 Oct 2013 at 6:36
Manifest-Version: 1.0
Implementation-Vendor: de.thetaphi
Implementation-Title: forbiddenapis
Implementation-Version: 1.3
Built-By: gil
Build-Jdk: 1.7.0_45
Created-By: Apache Maven 3.0.5
Main-Class: de.thetaphi.forbiddenapis.CliMain
Archiver-Version: Plexus Archiver
in fedora we can use only system libraries
all java libraries and plugins are located in /usr/share/java our maven
(customization) permit it
https://fedoraproject.org/wiki/Packaging:Java
https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries
Original comment by punto...@libero.it
on 28 Oct 2013 at 6:52
META-INF/maven/plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by maven-plugin-tools 3.1 on 2013-10-27 -->
<plugin>
<name>Policeman's Forbidden API Checker</name>
<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>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>1.3</version>
<goalPrefix>forbiddenapis</goalPrefix>
<isolatedRealm>false</isolatedRealm>
<inheritedByDefault>true</inheritedByDefault>
<mojos/>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<type>jar</type>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-launcher</artifactId>
<type>jar</type>
<version>1.8.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<type>jar</type>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<type>jar</type>
<version>any</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
<type>jar</type>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-reflect</artifactId>
<type>jar</type>
<version>3.4</version>
</dependency>
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
<type>jar</type>
<version>1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<type>jar</type>
<version>3.8.2</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<type>jar</type>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<type>jar</type>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<type>jar</type>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-plexus</artifactId>
<type>jar</type>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-annotations</artifactId>
<type>jar</type>
<version>1.5.5</version>
</dependency>
<dependency>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-bean</artifactId>
<type>jar</type>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<type>jar</type>
<version>any</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.interceptor</groupId>
<artifactId>jboss-interceptors-api_1.1_spec</artifactId>
<type>jar</type>
<version>1.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<type>jar</type>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<type>jar</type>
<version>any</version>
</dependency>
<dependency>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-guice</artifactId>
<type>jar</type>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<type>jar</type>
<version>13.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<type>jar</type>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<type>jar</type>
<version>4.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<type>jar</type>
<version>4.1</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<type>jar</type>
<version>4.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<type>jar</type>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<type>jar</type>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
META-INF/maven/de.thetaphi/forbiddenapis/plugin-help.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by maven-plugin-tools 3.1 on 2013-10-27 -->
<plugin>
<name>Policeman's Forbidden API Checker</name>
<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>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>1.3</version>
<goalPrefix>forbiddenapis</goalPrefix>
<mojos/>
</plugin>
Original comment by punto...@libero.it
on 28 Oct 2013 at 6:57
Ah I think I know: forbiddenapis can only be built with ANT as build system
(because it uses an advanced testing aproach with antunit and it is a maven +
ant + cli plugin), the Maven pom.xml is a template just to make it available in
the Maven repository.
It looks to me that the fedora system uses the -sources.jar file and builds the
binary maven artifact by itsself. This is not supported, because the after
unpacking the sources jar file you have to use ANT to build it.
Please use the official binary JAR file from Maven central ("Archiver-Version:
Plexus Archiver" and "Archiver-Version: Plexus Archiver" shows that it is not
generated by Apache ANT).
Sorry, this cannot be fixed without using the official Maven Central repository.
Original comment by uwe.h.schindler
on 28 Oct 2013 at 7:00
Customized pom file
<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>
<version>1.3</version>
<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>
Original comment by punto...@libero.it
on 28 Oct 2013 at 7:00
Also the dependencies listed in the plugin.xml are simply wrong.
Closing as won't fix, sorry. Not a supported usage of the tool.
Original comment by uwe.h.schindler
on 28 Oct 2013 at 7:03
see also
http://fedoraproject.org/wiki/Packaging:Guidelines#No_inclusion_of_pre-built_bin
aries_or_libraries
Original comment by punto...@libero.it
on 28 Oct 2013 at 7:04
FYI, building Apache Lucene with Maven is not a supported configuration.
Original comment by uwe.h.schindler
on 28 Oct 2013 at 7:06
thanks for your help
regards
Original comment by punto...@libero.it
on 28 Oct 2013 at 7:12
[deleted comment]
Sorry if it sounded harsh, but projects that use Apache Ant and Apache Ivy to
build have a reason to do so. Some of them also provide some Maven config to
make them useable with e.g. Eclipse, but it is not guaranteed that the
rresultine binaries are useable under all circumstances and have succeeded the
full test suite.
In addition: The above link only says, that you are not allowed to include
pre-built binaries. But the resulting Lucene/Solr does not use forbidden-apis
at all, it just uses it as a build tool. So I see no reason to not use the
external binary artifacts. An alternative would be to disable the plugin while
building Lucene, it is mainly a helper tool for developers to keep code clean
of charset/locale/timezone isses. It is not needed to build Lucene.
So maybe simply pass a Maven command line flag or other setting to disable this
plugin (unfortunately I have no idea how to handle this).
Unfortunately if you still want to fix this, I can give no help in fixing your
own POM file. Maybe there is some build step missing. Please note: The plugin
does not have a help mojo, maybe thats another issue.
Original comment by uwe.h.schindler
on 28 Oct 2013 at 7:24
> Sorry if it sounded harsh, but projects that use Apache Ant and Apache Ivy to
build
> have a reason to do so. Some of them also provide some Maven config to make
them
> useable with e.g. Eclipse, but it is not guaranteed that the rresultine
binaries
> are useable under all circumstances and have succeeded the full test suite.
No problems, again thanks
we cant use for e.g. maven-ant-tasks (we replaced with
http://git.eclipse.org/c/aether/aether-ant) because have a lot problem with
newer maven (3.0.5, 3.1.x) components (plexus, eclipse aether, etc..)
> In addition: The above link only says, that you are not allowed to include
pre-built
> binaries. But the resulting Lucene/Solr does not use forbidden-apis at all,
it just
> uses it as a build tool. So I see no reason to not use the external binary
artifacts.
this is not allowed in fedora, build tools or libraries follow the our
guideline restrictions "Remove all pre-built program binaries and program
libraries in %prep prior to the building of the package. Examples include, but
are not limited to, *.class, *.dll, *.DS_Store, *.exe, *.jar, *.o, *.pyc,
*.pyo, *.egg, *.so, *.swf files"
moreover, our build system don't provides a web connection, therefore we can't
use remote repositories
> An alternative would be to disable the plugin while building Lucene, it is
mainly a
yes thanks already done, open this bug only for check if there was one other
possibility
> helper tool for developers to keep code clean of charset/locale/timezone
isses. It is
> not needed to build Lucene.
thanks
regards
gil
Original comment by punto...@libero.it
on 28 Oct 2013 at 7:52
Original issue reported on code.google.com by
punto...@libero.it
on 28 Oct 2013 at 6:29