You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Abhijeet Banerjee <ab...@gmail.com> on 2019/03/09 14:17:42 UTC

Missing plugin.xml in org.apache.felix.dependencymanager.annotations 4.x.x

Greetings,
Trying to upgrade my DM.annotations 3PP from 3.2.0 to latest, but getting
below error,

[ERROR] Failed to parse plugin descriptor for
org.apache.felix:org.apache.felix.dependencymanager.annotation:4.2.0

(/Users/grg2fr/dev/.m2/org/apache/felix/org.apache.felix.dependencymanager.annotation/4.2.0/org.apache.felix.dependencymanager.annotation-4.2.0.jar):
    No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]

I checked the available versions of the
org.apache.felix:org.apache.felix.dependencymanager.annotation bundle and
noticed, that indeed, the plugin.xml was present up until version 3.2.0 and
disappeared beginning with version 4.0.1

In google, I find the same issue mentioned by a user
https://stackoverflow.com/questions/42340154/missing-plugin-xml-in-org-apache-felix-dependencymanager-annotations-4-x-x

As per resolution, They asked to go as per mentioned link but didn't get
the doc very much
http://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager/tutorials/working-with-annotations.html

*I have below plugin in pom.xml, Please help me what exactly I need to
fix/modify *
*<build>
 *
*    <plugins>
 *
*        <plugin>
  *
*            <groupId>org.apache.felix</groupId>
 *
*            <artifactId>maven-bundle-plugin</artifactId>  *
*            <version>2.4.0</version>*
*        </plugin>
 *
*        <plugin>
  *
*            <groupId>org.apache.felix</groupId>*
*
<artifactId>org.apache.felix.dependencymanager.annotation</artifactId>*
*            <version>4.2.0</version>
  *
*            <executions>
  *
*                <execution>
 *
*                    <goals>
 *
*                        <goal>scan</goal>
 *
*                    </goals>
  *
*                    <configuration>
 *
*                        <log>info</log>
 *
*                    </configuration>
  *
*                </execution>
  *
*            </executions>
 *
*        </plugin>
 *
*    </plugins>
  *
*</build>*


-- 

*Thanks\*
*Abhijeet Banerjee+919910512611*

Re: Missing plugin.xml in org.apache.felix.dependencymanager.annotations 4.x.x

Posted by Pierre De Rop <pi...@gmail.com>.
Hello Abhijeet <ab...@gmail.com>;

(responding with limited internet access, I will be available next monday)

Since dm annotations 4.0.0 version, there is no more maven plugins, instead
we use a bnd plugin.
Now if you are using maven, you can uses the "_plugin" attribute in order
to activate the dm bnd plugin when using maven.

Please check [1] where you can find a working sample project (see the
dm.hello/hello.annotations/ sub project in the sample)

Notice that the latest dm annotation version is not 4.2.0, but 5.0.1

So, your example in your previous mail should be changed like for example
this (replace 5.0.1 by 4.2.0 if you really need to use the old 4.2.0
version):

<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>
  <packaging>bundle</packaging>
  <groupId>YOUR.GROUP.ID</groupId>
  <artifactId>YOUR.ARTIFACT.ID</artifactId>
  <version>YOUR.ARTIFACT.VERSION</version>

  <dependencies>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.dependencymanager.annotation</artifactId>
      <version>5.0.1</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>4.1.0</version>
<extensions>true</extensions>
        <configuration>
          <instructions>
    <Bundle-SymbolicName>YOUR BSN</Bundle-SymbolicName>
    <Private-Package>YOUR.PRIVATE_PACKAGE</Private-Package>
    <Export-Package>YOUR.EXPORTED_PACKAGE</Export-Package>

<_plugin>org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;add-require-capability=true</_plugin>
          </instructions>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.felix</groupId>

<artifactId>org.apache.felix.dependencymanager.annotation</artifactId>
            <version>5.0.1</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>

the doc for dm annotations can be found from [2]

hope this helps;
Pierre

[1]
http://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager/tutorials/sample-code.html
[2]
http://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager/reference/dm-annotations.html

On Sat, Mar 9, 2019 at 3:18 PM Abhijeet Banerjee <ab...@gmail.com>
wrote:

> Greetings,
> Trying to upgrade my DM.annotations 3PP from 3.2.0 to latest, but getting
> below error,
>
> [ERROR] Failed to parse plugin descriptor for
> org.apache.felix:org.apache.felix.dependencymanager.annotation:4.2.0
>
>
> (/Users/grg2fr/dev/.m2/org/apache/felix/org.apache.felix.dependencymanager.annotation/4.2.0/org.apache.felix.dependencymanager.annotation-4.2.0.jar):
>     No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]
>
> I checked the available versions of the
> org.apache.felix:org.apache.felix.dependencymanager.annotation bundle and
> noticed, that indeed, the plugin.xml was present up until version 3.2.0 and
> disappeared beginning with version 4.0.1
>
> In google, I find the same issue mentioned by a user
>
> https://stackoverflow.com/questions/42340154/missing-plugin-xml-in-org-apache-felix-dependencymanager-annotations-4-x-x
>
> As per resolution, They asked to go as per mentioned link but didn't get
> the doc very much
>
> http://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager/tutorials/working-with-annotations.html
>
> *I have below plugin in pom.xml, Please help me what exactly I need to
> fix/modify *
> *<build>
>  *
> *    <plugins>
>  *
> *        <plugin>
>   *
> *            <groupId>org.apache.felix</groupId>
>  *
> *            <artifactId>maven-bundle-plugin</artifactId>  *
> *            <version>2.4.0</version>*
> *        </plugin>
>  *
> *        <plugin>
>   *
> *            <groupId>org.apache.felix</groupId>*
> *
> <artifactId>org.apache.felix.dependencymanager.annotation</artifactId>*
> *            <version>4.2.0</version>
>   *
> *            <executions>
>   *
> *                <execution>
>  *
> *                    <goals>
>  *
> *                        <goal>scan</goal>
>  *
> *                    </goals>
>   *
> *                    <configuration>
>  *
> *                        <log>info</log>
>  *
> *                    </configuration>
>   *
> *                </execution>
>   *
> *            </executions>
>  *
> *        </plugin>
>  *
> *    </plugins>
>   *
> *</build>*
>
>
> --
>
> *Thanks\*
> *Abhijeet Banerjee+919910512611*
>