policeman-tools / forbidden-apis

Policeman's Forbidden API Checker
Apache License 2.0
321 stars 34 forks source link

Could not find goal 'check' in plugin de.thetaphi:forbiddenapis:1.3 #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[INFO] Building Lucene parent POM 4.5.1
[INFO] ------------------------------------------------------------------------
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Grandparent POM for Apache Lucene Core and Apache Solr
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Grandparent POM for Apache Lucene Core and Apache Solr  SUCCESS [4.024s]
[INFO] Lucene parent POM ................................. FAILURE [0.004s]
[INFO] Lucene Core ....................................... SKIPPED
[INFO] Lucene codecs ..................................... SKIPPED
[INFO] Lucene Common Analyzers ........................... SKIPPED
[INFO] Lucene ICU Analysis Components .................... SKIPPED
[INFO] Lucene Kuromoji Japanese Morphological Analyzer ... SKIPPED
[INFO] Lucene Morfologik Polish Lemmatizer ............... SKIPPED
[INFO] Lucene Phonetic Filters ........................... SKIPPED
[INFO] Lucene Smart Chinese Analyzer ..................... SKIPPED
[INFO] Lucene Stempel Analyzer ........................... SKIPPED
[INFO] Lucene Analysis Modules aggregator POM ............ SKIPPED
[INFO] Lucene Memory ..................................... SKIPPED
[INFO] Lucene Queries .................................... SKIPPED
[INFO] Lucene Highlighter ................................ SKIPPED
[INFO] Lucene Sandbox .................................... SKIPPED
[INFO] Lucene QueryParsers ............................... SKIPPED
[INFO] Lucene Facets ..................................... SKIPPED
[INFO] Lucene Benchmark .................................. SKIPPED
[INFO] Lucene Classification ............................. SKIPPED
[INFO] Lucene Demo ....................................... SKIPPED
[INFO] Lucene Grouping ................................... SKIPPED
[INFO] Lucene Join ....................................... SKIPPED
[INFO] Lucene Miscellaneous .............................. SKIPPED
[INFO] Lucene Replicator ................................. SKIPPED
[INFO] Lucene Spatial .................................... SKIPPED
[INFO] Lucene Suggest .................................... SKIPPED
[INFO] Apache Solr parent POM ............................ SKIPPED
[INFO] Apache Solr Solrj ................................. SKIPPED
[INFO] Apache Solr Core .................................. SKIPPED
[INFO] Apache Solr Search Server ......................... SKIPPED
[INFO] Apache Solr Analysis Extras ....................... SKIPPED
[INFO] Apache Solr DataImportHandler ..................... SKIPPED
[INFO] Apache Solr DataImportHandler Extras .............. SKIPPED
[INFO] Apache Solr Content Extraction Library ............ SKIPPED
[INFO] Apache Solr Velocity .............................. SKIPPED
[INFO] Apache Solr Contrib aggregator POM ................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.153s
[INFO] Finished at: Mon Oct 28 19:23:40 CET 2013
[INFO] Final Memory: 105M/350M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'check' in plugin de.thetaphi:forbiddenapis:1.3 
among available goals -> [Help 1]

What version of the product are you using? On what operating system?
Apache Maven 3.0.5 (rNON-CANONICAL_2013-03-12_12-47_mockbuild; 2013-03-12 
13:47:10+0100)
Maven home: /usr/share/maven
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc19.i386/jre
Default locale: it_IT, platform encoding: UTF-8
OS name: "linux", version: "3.11.6-200.fc19.i686", arch: "i386", family: "unix"
Please provide any additional information below.
[INFO] ------------------------------------------------------------------------
[INFO] Building Lucene parent POM 4.5.1
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, 
process-sources, generate-resources, process-resources, compile, 
process-classes, generate-test-sources, process-test-sources, 
generate-test-resources, process-test-resources, test-compile, 
process-test-classes, test, prepare-package, package, pre-integration-test, 
integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Trying to resolve artifact [de.thetaphi:forbiddenapis:1.3:pom]
[DEBUG] Trying to translate artifact [de.thetaphi:forbiddenapis]
[DEBUG] Artifact [de.thetaphi:forbiddenapis] was mapped to [JPP:forbiddenapis]
[DEBUG] Translation result is [ [JPP:forbiddenapis], 
[de.thetaphi:forbiddenapis] ]
[DEBUG] Resolving [de.thetaphi:forbiddenapis:1.3:pom]
[DEBUG] Trying to translate artifact [de.thetaphi:forbiddenapis]
[DEBUG] Artifact [de.thetaphi:forbiddenapis] was mapped to [JPP:forbiddenapis]
[DEBUG] Translation result is [ [JPP:forbiddenapis], 
[de.thetaphi:forbiddenapis] ]
[DEBUG] Artifact [de.thetaphi:forbiddenapis:1.3:pom] was resolved to 
/usr/share/maven-effective-poms/JPP-forbiddenapis.pom
[DEBUG] Trying to resolve artifact [de.thetaphi:forbiddenapis:1.3:jar]
[DEBUG] Trying to translate artifact [de.thetaphi:forbiddenapis]
[DEBUG] Artifact [de.thetaphi:forbiddenapis] was mapped to [JPP:forbiddenapis]
[DEBUG] Translation result is [ [JPP:forbiddenapis], 
[de.thetaphi:forbiddenapis] ]
[DEBUG] Resolving [de.thetaphi:forbiddenapis:1.3:jar]
[DEBUG] Trying to translate artifact [de.thetaphi:forbiddenapis]
[DEBUG] Artifact [de.thetaphi:forbiddenapis] was mapped to [JPP:forbiddenapis]
[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
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Grandparent POM for Apache Lucene Core and Apache Solr
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Grandparent POM for Apache Lucene Core and Apache Solr  SUCCESS [3.599s]
[INFO] Lucene parent POM ................................. FAILURE [0.005s]
[INFO] Lucene Core ....................................... SKIPPED
[INFO] Lucene codecs ..................................... SKIPPED
[INFO] Lucene Common Analyzers ........................... SKIPPED
[INFO] Lucene ICU Analysis Components .................... SKIPPED
[INFO] Lucene Kuromoji Japanese Morphological Analyzer ... SKIPPED
[INFO] Lucene Morfologik Polish Lemmatizer ............... SKIPPED
[INFO] Lucene Phonetic Filters ........................... SKIPPED
[INFO] Lucene Smart Chinese Analyzer ..................... SKIPPED
[INFO] Lucene Stempel Analyzer ........................... SKIPPED
[INFO] Lucene Analysis Modules aggregator POM ............ SKIPPED
[INFO] Lucene Memory ..................................... SKIPPED
[INFO] Lucene Queries .................................... SKIPPED
[INFO] Lucene Highlighter ................................ SKIPPED
[INFO] Lucene Sandbox .................................... SKIPPED
[INFO] Lucene QueryParsers ............................... SKIPPED
[INFO] Lucene Facets ..................................... SKIPPED
[INFO] Lucene Benchmark .................................. SKIPPED
[INFO] Lucene Classification ............................. SKIPPED
[INFO] Lucene Demo ....................................... SKIPPED
[INFO] Lucene Grouping ................................... SKIPPED
[INFO] Lucene Join ....................................... SKIPPED
[INFO] Lucene Miscellaneous .............................. SKIPPED
[INFO] Lucene Replicator ................................. SKIPPED
[INFO] Lucene Spatial .................................... SKIPPED
[INFO] Lucene Suggest .................................... SKIPPED
[INFO] Apache Solr parent POM ............................ SKIPPED
[INFO] Apache Solr Solrj ................................. SKIPPED
[INFO] Apache Solr Core .................................. SKIPPED
[INFO] Apache Solr Search Server ......................... SKIPPED
[INFO] Apache Solr Analysis Extras ....................... SKIPPED
[INFO] Apache Solr DataImportHandler ..................... SKIPPED
[INFO] Apache Solr DataImportHandler Extras .............. SKIPPED
[INFO] Apache Solr Content Extraction Library ............ SKIPPED
[INFO] Apache Solr Velocity .............................. SKIPPED
[INFO] Apache Solr Contrib aggregator POM ................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.893s
[INFO] Finished at: Mon Oct 28 19:26:34 CET 2013
[INFO] Final Memory: 63M/275M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'check' in plugin de.thetaphi:forbiddenapis:1.3 
among available goals -> [Help 1]
org.apache.maven.plugin.MojoNotFoundException: Could not find goal 'check' in 
plugin de.thetaphi:forbiddenapis:1.3 among available goals 
        at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:267)
        at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:185)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings(DefaultLifecycleExecutionPlanCalculator.java:280)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:193)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:112)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
        at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:92)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoNotFoundException

hi
any ideas?
thanks in advance
regards

Original issue reported on code.google.com by punto...@libero.it on 28 Oct 2013 at 6:29

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
FYI, building Apache Lucene with Maven is not a supported configuration.

Original comment by uwe.h.schindler on 28 Oct 2013 at 7:06

GoogleCodeExporter commented 9 years ago
thanks for your help
regards

Original comment by punto...@libero.it on 28 Oct 2013 at 7:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
> 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