2

I set up a Tycho build for multiple plug-ins, a feature, a site and a target defined within the pom.xmls.

I can run my application from within the Eclipse IDE. Also, a mvn clean package builds just fine.

However, when I add a plug-in which needs ca.odell.glazedlists (which is also in my target definition) I can still run it from within the IDE, but the mvn clean package build fails. Any ideas what to do? Maven output and pom.xml follow.

Maven output

[INFO] Computing target platform for MavenProject: lumo:microsoftsqlserver:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\microsoftsqlserver\pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/ (128B at 0B/s)
[INFO] 1 operation remaining.
[INFO] Adding repository http://download.eclipse.org/releases/kepler
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/201306260900/ (0B at 0B/s)
[INFO] 1 operation remaining.
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/201306260900/ (365B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/kepler/ (0B at 0B/s)
[INFO] 1 operation remaining.
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/kepler/ (116B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/ (0B at 0B/s)
[INFO] 1 operation remaining.
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/ (128B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/releases/kepler
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/201306260900/ (0B at 0B/s)
[INFO] 1 operation remaining.
[INFO] Fetching p2.index from http://download.eclipse.org/releases/kepler/201306260900/ (365B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/kepler/ (0B at 0B/s)
[INFO] 1 operation remaining.
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/kepler/ (116B at 0B/s)
[WARNING] Target location type: Directory is not supported
[WARNING] Target location type: Profile is not supported
[WARNING] Target location type: Directory is not supported
[WARNING] De-selecting bundles in a target definition file is not supported. See http://wiki.eclipse.org/Tycho_Messages_Explained#Target_File_Include_Bundles for alternatives.
[INFO] Resolving dependencies of MavenProject: lumo:microsoftsqlserver:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\microsoftsqlserver\pom.xml
[INFO] Resolving class path of MavenProject: lumo:microsoftsqlserver:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\microsoftsqlserver\pom.xml
[INFO] Computing target platform for MavenProject: lumo:org.eclipse.gemini.dbaccess.microsoftsqlserver:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\org.eclipse.gemini.dbaccess.microsoftsqlserver\pom.xml
[INFO] Resolving dependencies of MavenProject: lumo:org.eclipse.gemini.dbaccess.microsoftsqlserver:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\org.eclipse.gemini.dbaccess.microsoftsqlserver\pom.xml
[INFO] Resolving class path of MavenProject: lumo:org.eclipse.gemini.dbaccess.microsoftsqlserver:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\org.eclipse.gemini.dbaccess.microsoftsqlserver\pom.xml
[INFO] Computing target platform for MavenProject: lumo:lumo.settings:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.settings\pom.xml
[INFO] Resolving dependencies of MavenProject: lumo:lumo.settings:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.settings\pom.xml
[INFO] Resolving class path of MavenProject: lumo:lumo.settings:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.settings\pom.xml
[INFO] Computing target platform for MavenProject: lumo:lumo.components:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.components\pom.xml
[INFO] Resolving dependencies of MavenProject: lumo:lumo.components:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.components\pom.xml
[INFO] Resolving class path of MavenProject: lumo:lumo.components:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.components\pom.xml
[INFO] Computing target platform for MavenProject: lumo:lumo.osgi.service.dialog:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.osgi.service.dialog\pom.xml
[INFO] Resolving dependencies of MavenProject: lumo:lumo.osgi.service.dialog:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.osgi.service.dialog\pom.xml
[INFO] Resolving class path of MavenProject: lumo:lumo.osgi.service.dialog:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.osgi.service.dialog\pom.xml
[INFO] Computing target platform for MavenProject: lumo:lumo.osgi.service.dialog.impl:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.osgi.service.dialog.impl\pom.xml
[INFO] Resolving dependencies of MavenProject: lumo:lumo.osgi.service.dialog.impl:0.0.1-SNAPSHOT @ D:\Java7\lumoE4Workspace\lumo.osgi.service.dialog.impl\pom.xml
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=win32, osgi.os=win32, osgi.arch=x86, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: lumo.osgi.service.dialog.impl 0.0.1.qualifier
[ERROR]   Missing requirement: lumo.core.runtime 0.0.1.qualifier requires 'bundle ca.odell.glazedlists 1.9.0' but it could not be found
[ERROR]   Cannot satisfy dependency: lumo.osgi.service.dialog.impl 0.0.1.qualifier depends on: bundle lumo.core.runtime 0.0.1
[ERROR] 
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from lumo.core.runtime 0.0.1.qualifier to bundle ca.odell.glazedlists 1.9.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.event 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.gui 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.matchers 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.util.concurrent 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from lumo.core.runtime 0.0.1.qualifier to bundle ca.odell.glazedlists 1.9.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.event 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.gui 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.matchers 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.util.concurrent 0.0.0.", "No solution found because the problem is unsatisfiable."]
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from lumo.core.runtime 0.0.1.qualifier to bundle ca.odell.glazedlists 1.9.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.event 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.gui 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.matchers 0.0.0.", "Unable to satisfy dependency from org.eclipse.nebula.widgets.nattable.extension.glazedlists 1.0.1.201307031725 to package ca.odell.glazedlists.util.concurrent 0.0.0.", "No solution found because the problem is unsatisfiable."]
    at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98)
    at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)
    at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63)
    at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:126)
    at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:81)
    at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:374)
    at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:350)
    at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109)
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:82)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    ... 11 more

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>lumo</groupId>
    <artifactId>lumo-e4</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <properties>
        <tycho.version>0.18.0</tycho.version>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <encoding>UTF-8</encoding>
    </properties>
    <modules>
        <module>lumo.target</module>


        <module>microsoftsqlserver</module>
        <module>org.eclipse.gemini.dbaccess.microsoftsqlserver</module>


        <module>lumo.settings</module>
        <module>lumo.components</module>
        <module>lumo.osgi.service.dialog</module>
        <module>lumo.osgi.service.dialog.impl</module>

        <module>lumo.osgi.service.notification</module>
        <module>lumo.osgi.service.notification.impl</module>


        <module>lumo.core.runtime</module>
        <module>lumo.rcp</module>
        <module>lumo.model</module>
        <module>lumo.site</module>
        <module>lumo.feature</module>

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

            <!-- Use custom target platform -->
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>target-platform-configuration</artifactId>
                <version>${tycho.version}</version>
                <configuration>
                    <target>
                        <artifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>lumo.target</artifactId>
                            <version>${project.version}</version>
                        </artifact>
                    </target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>kepler</id>
            <layout>p2</layout>
            <url>http://download.eclipse.org/releases/kepler</url>
        </repository>
    </repositories>
</project>
oberlies
  • 11,503
  • 4
  • 63
  • 110
lumo
  • 790
  • 1
  • 8
  • 23
  • the bundle which is **not** found is **ca.odell.glazedlists**. and when i look into my target (content) it is available and checked. i got one target for all my plugins. **no** errors are shown in ide. validate says ok! – lumo Jul 12 '13 at 05:21
  • The log should contain the error message in a more readable format (where each line is preceded with an [ERROR]). Please post that full error message instead of just the two lines near the top of your post. Also: Check the editing help about how to insert a verbatim code/XML block. – oberlies Jul 24 '13 at 21:51
  • i did read the formating help, but last time it simply did not work (today its working without problem :-/) – lumo Jul 25 '13 at 05:14

3 Answers3

2

It seems that your target platform contains ca.odell.glazedlists in Eclipse but not in Tycho because that bundle is included via a mechanism which is not supported by Tycho. There is a warning in the log that tells you so:

[WARNING] Target location type: Directory is not supported
[WARNING] Target location type: Profile is not supported
[WARNING] Target location type: Directory is not supported

You need to change your target definition file so that it only uses "Software Site" locations.

oberlies
  • 11,503
  • 4
  • 63
  • 110
0

Also a possibility is like :

  1. You have created your target platform.
  2. Publish it to your local maven p2 repo.
  3. Added ca.odell.glazedlists to target platform (But forgot to publish target platform again).
  4. Now from within Eclipse, your bundle is currently inside the acquired target platform. However, from outside Eclipse, the mvn clean package command is still referring to the old target definition published in the beginning.
  5. So, try publishing the target platform again and then mvn clean package.
Martin
  • 22,212
  • 11
  • 70
  • 132
Shailesh Pratapwar
  • 4,054
  • 3
  • 35
  • 46
  • 1
    how to you publish a target platform to a local maven repo? all i did was mvn clean package (from the parent folder) nothing else. – lumo Jul 22 '13 at 10:07
  • that certainly need a different goal in your maven pom to publish a target platform. However, before doing that, can you just check if you are referring the correct version of your dependency which is available in your target platform and the one which you added in required plugins list ? – Shailesh Pratapwar Jul 22 '13 at 15:08
  • i'm referring to version 1.9.0 of ca.odell.glazedlists in my target and in my required plugins – lumo Jul 23 '13 at 05:32
  • "Unable to satisfy dependency from lumo.core.runtime 0.0.1.qualifier " --> I assume lumo.core.runtime is your own bundle residing in your target platform. This bundle seems to have dependency on glazedlist bundle. Check if the versions are also matching correctely here. – Shailesh Pratapwar Jul 23 '13 at 06:40
  • my target platform only contains 3rd party features/plugins. my own bundles (available in src form and included in the pom.xml) are **not** included in the target platform. i checked the versions everywhere. and they all say 1.9.0 – lumo Jul 26 '13 at 05:05
-1

in the tycho configuration, if you are configuring this way:

<plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>target-platform-configuration</artifactId>
            <configuration>
                <pomDependencies>consider</pomDependencies>
            </configuration>
        </plugin>

it will resolve dependencies from the dependencies configured in your pom. Otherwise, it will resolved dependencies from the entries in your MANIFEST file

xtrycatchx
  • 354
  • 4
  • 10
  • should it not use my lumo.target which i wrote in my pom.xml after line ? – lumo Jul 22 '13 at 10:06
  • nope. Dependency resolution of tycho is via pom-first (see my previous answer) or manifest-first. for details you can check this [link](http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts) – xtrycatchx Jul 23 '13 at 01:40
  • Dependency resolution **always** happens based on the OSGi manifest, and against artifacts in the [target platform](http://wiki.eclipse.org/Tycho/Target_Platform). POM dependencies are only added to the target platform (in addition to e.g. a target file), so they may or may not be chosen for dependency resolution. – oberlies Jul 24 '13 at 21:36
  • @xtrycatchx tested your configuration, which fails. – lumo Jul 26 '13 at 05:06