Plugin.xml file is not found /generated for eclipse plugin project
Asked Answered
A

0

4

I am developing one maven plugin which will be used to override default maven lifecycle.To resolve dependencies (eclipse and other) , I want to use tycho. So I cofigured maven project to convert it into eclipse-plugin-project.

Heres my POM

 <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/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>

 <groupId>com.test.maven.plugin</groupId>
 <artifactId>test-maven-plugin</artifactId>
 <version>0.0.1</version>
 <packaging>eclipse-plugin</packaging>

 <name>test-maven-plugin</name>
 <url>http://maven.apache.org</url>

 <properties>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 </properties>

 <repositories>
   <!-- add Mars repository to resolve dependencies -->
   <repository>
     <id>Mars</id>
     <layout>p2</layout>
     <url>http://download.eclipse.org/releases/mars/</url>
   </repository>
 </repositories>


<build>
 <plugins>
   <plugin>
     <artifactId>maven-compiler-plugin</artifactId>
     <version>3.1</version>
     <configuration>
       <source>1.8</source>
       <target>1.8</target>
     </configuration>
   </plugin>
   <plugin>
    <!-- enable tycho build extension -->
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-maven-plugin</artifactId>
        <version>0.23.0</version>
        <extensions>true</extensions>
 </plugin>
 </plugins>
</build>
</project>

Now , as my packaging type is 'eclipse-plugin' , it is not generating plugin.xml file while installing project (mvn install). If I do the packaging type as 'maven-plugin' , it generates plugin.xml , but it does resolve dependencies using tycho.

Any thoughts for combining both?

Atlante answered 20/7, 2016 at 12:29 Comment(4)
why not using p2-maven-plugin is doing the same?Coriecorilla
p2-maven-plugin creates osgi bundles for jars (to use wid tycho) if I am not wrongAtlante
p2-maven-plugin resolves dependencies in first place and bundle them if they are not OSGI bundlesCoriecorilla
@Hishamkh can you please give example how it works? I have tried but couldnt resolve it.Atlante

© 2022 - 2024 — McMap. All rights reserved.