Skip to content

HowtobuildaMavenTychoproject

Michael Erichsen edited this page Jul 9, 2019 · 9 revisions

How to build a Maven Tycho project

Main source: Vogella: Eclipse Tycho for building plug-ins, OSGi bundles and Eclipse applications - Tutorial

Root project

Create a general project in Eclipse to con tain all other projects and files. Enable pomless Tycho builds by adding a .mvn/extensions.xml descriptor. See Enable pomless Tycho build.

Create subfolders bundles, features, and releng. Add a root Project Object Model file called pom.xml. See Create pom in the root project

Build configuration

Create a configuration folder in releng with a general project of the same name inside it. Add a build configuration Project Object Model file called pom.xml. See Create pom for the build configuration

First test

Run mvn clean verify using Run as Maven build.

Plug-in project

Create a folder and a plug-in project of the same name inside bundles. Run the product file of the plug-in as Java Application. Update the run configuration by adding required plug-ins and run again.

Create bundles build configuration

Add a bundle Project Object Model file called pom.xml in bundles. See Add pom for bundles directory

Add a module statement in the root pom.xml for bundles.

Second test

Run mvn clean verify again.

Issue

[INFO] Resolving dependencies of MavenProject: net.myerichsen.tycho:net.myerichsen.tycho.plugin2:1.0.0-SNAPSHOT @ C:\Users\michael\git\net.myerichsen.tycho\net.myerichsen.tycho\bundles\net.myerichsen.tycho.plugin2.polyglot.build.properties

[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; javax.inject 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.swt 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.e4.ui.model.workbench 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.jface 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.e4.ui.services 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.e4.ui.workbench 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.e4.core.di 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.e4.ui.di 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.e4.core.contexts 0.0.0.; Unable to satisfy dependency from net.myerichsen.tycho.plugin2 1.0.0.qualifier to osgi.bundle; org.eclipse.core.runtime 0.0.0.; No solution found because the problem is unsatisfiable.]

[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64} [ERROR] Cannot resolve project dependencies:

[ERROR] Software being installed: net.myerichsen.tycho.plugin2 1.0.0.qualifier

[ERROR] Missing requirement: net.myerichsen.tycho.plugin2 1.0.0.qualifier requires 'osgi.bundle; javax.inject 0.0.0' but it could not be found