Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8615361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:21:31+00:00 2026-06-12T05:21:31+00:00

My host plugin declares an optional dependency to another plugin. In the build of

  • 0

My host plugin declares an optional dependency to another plugin. In the build of a fragment to my host plugin, the optionally required plugin can’t be found by Tycho. That means I get compile errors since the classes from the optional dependency can’t be resolved.

If I remove the optional flag in host plugin, the Tycho build works fine. I’m using Maven 3.0.4 and Tycho 0.15.0.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:21:32+00:00Added an answer on June 12, 2026 at 5:21 am

    I am undecided if this is really a bug in Tycho, or rather by design.

    This is the background to the observable behaviour: Tycho aims to do its dependency resolution in the same way as p2 would do when installing your bundle. When you declare an optional dependency to a bundle, that bundle will not be installed by p2 (unless some other bundle or feature has a non-optional dependency to that bundle). So following this rule, Tycho would also not consider this optional dependency during dependency resolution and class path computation.

    However, there is a switch to deviate from the default p2 behaviour (in target-platform-configuration the configuration option dependency-resolution/optionalDependencies):

    • With the value require, all optional dependencies of the current bundle are treated as required at compile time. Since this is what you normally want, this is the default.
    • With the value ignore, all optional dependencies of the current bundle are ignored at compile time.

    Note that this special handling only applies to the optional dependencies of the current bundle, and not to other bundles in the dependency chain. Host bundles are currently treated as any other dependency, we may consider treating them specially when building a fragment.

    You have the following options for a workaround:

    • Also add the optional dependency in the manifest of the fragment. The easiest way to do this is to use a text editor. Strictly speaking, this is the right thing to do: A fragment really should declare its own dependencies and not rely on declarations elsewhere. But since the PDE doesn’t require you to do so, it is questionable if Tycho should.
    • Add an explicit compile-time only dependency in the fragment via the jars.extra.classpath option in the build.properties.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some plugin code in a dll that is called by a host
I host a few Source game servers and run a plugin that dumps player
I am trying to write an plugin system that can load managed plugins. The
I'm designing a WPF program that will use a DLL-plugin architecture. The host application
I am looking for an svn client and host that I can easily set
We have a number of plugin applications that can all run independently but also
We're using Eclipse (with the eGit plugin) and I want to host a repo
my host (one.com) doesn´t support java webapps. But I have a java programm that
We host online reports that a client will log into and view. The reports
My host allows limited access to SSH and Linux commands. However, I can't use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.