When automating Eclipse "Export as function" Maven / Tycho does not see my plugin

I have a plugin and project function in my workspace. When I export the function manually through File> Export As> Feature, everything works fine. I am trying to write an automatic plugin creation and export a script to get rid of this task. I converted the function project to a Maven project and populated pom.xml with

<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>MyProject</groupId>
   <artifactId>NMGDBPluginFeature</artifactId>
   <version>1.0.0-SNAPSHOT</version>
   <packaging>eclipse-feature</packaging>

   <properties>
      <tycho-version>0.22.0</tycho-version>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
   </properties>

   <repositories>
      <repository>
         <id>eclipse-luna</id>
         <layout>p2</layout>
         <url>http://download.eclipse.org/releases/luna</url>
      </repository>
   </repositories>

   <build>
      <plugins>
         <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-maven-plugin</artifactId>
            <version>${tycho-version}</version>
            <extensions>true</extensions>
         </plugin>
      </plugins>
   </build>

</project>

However, the script throws:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: NMGDBPluginFeature.feature.group 1.0.0.qualifier
[ERROR]   Missing requirement: NMGDBPluginFeature.feature.group 1.0.0.qualifier requires 'GDBFifoBlocks [1.0.0.gdbfifoblocks]' but it could not be found

How could this happen? I thought pom.xml uses the feature.xml of the project, right? What is the correct configuration?

+3
source share
1 answer

. , . Eclipse, eclipse-feature feature.xml , .

, Maven, eclipse-feature, eclipse-plugin. :

  • pom.xml POM: pom, artifactId -, (, MyProject.parent), pom.xml .
  • pom.xml :

    <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>
    
      <parent>
        <groupId>MyProject</groupId>
        <artifactId>MyProject.parent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>relative/path/to/parent/project</relativePath>
      </parent>
    
      <artifactId>NMGDBPluginFeature</artifactId>
      <packaging>eclipse-feature</packaging>
    
    </project>
    
  • pom.xml , , artifactId - , Bundle-SymbolicName - packaging, eclipse-plugin.

  • Maven, <modules> POM :

      <modules>
        <module>relative/path/to/plugin/project</module>
        <module>relative/path/to/feature/project</module>
      </modules>
    

, , ( , Eclipse). , , , ../.

Maven POM, . Eclipse Maven pom.xml. , Maven, Maven .

+5

All Articles