Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Optional dependencies can not be resolved

Something like this should work for bundle projects

...
   <dependency-resolution>
      <optionalDependencies>ignore</optionalDependencies>
      <extraRequirements>
          <requirement>
              <type>eclipse-plugin</type>
              <id>org.eclipse.ui</id>
              <versionRange>0.0.0</versionRange>
          </requirement>
      </extraRequirements>
   </dependency-resolution>
...

It basically tells Tycho to ignore optional dependencies specified in
bundle manifest and use org.eclipse.ui. Obviously, you can replace
org.eclipse.ui with org.eclipse.rap.ui. You can also move this
configuration to a pom.xml profile and choose between the two using -P
command line invocation parameter.

For other project types you most likely don't need to do anything
because they already explicitly select either org.eclipse.ui or
org.eclipse.rap.ui.

--
Regards,
Igor

On 12-03-16 9:34 AM, Oliver Pfau wrote:
How can I define the dependencies to the RAP or RCP specific resourcesin my p2 repository in the pom?

-----Ursprüngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 13:49
An: tycho-user@xxxxxxxxxxx
Betreff: Re: [tycho-user] Optional dependencies can not be resolved

Tycho builds each module project once during each build execution and
then uses the same compiled binary everywhere the project is referenced.
If you want to have single build that produces both the war and the rcp,
you will need to chose one of org.eclipse.ui and org.eclipse.rap.ui for
compiling the bundles (the war and the rcp projects can still use
different dependencies). This can be done through pom.xml configuration,
no changes to bundle manifest are needed.

Alternatively, you can setup two pom.xml profiles, one for building the
war and another for the rcp, and use different dependencies there.

--
Regards,
Igor

On 12-03-16 8:36 AM, Oliver Pfau wrote:
When the RAP war file is built in the fragment.xml the dependency to org.eclipse.ui.rap is present, so I would expect that this is used. When RCP is build in the .product file org.eclipse.ui is present. On the repositories RCP and RAP is present.

-----Ursprüngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 13:33
An: tycho-user@xxxxxxxxxxx
Betreff: Re: [tycho-user] Optional dependencies can not be resolved

This does not answer my question. When you run the build on command
line, what dependencies do you expect to be present -- org.eclipse.ui,
org.eclipse.rap.ui or both?

--
Regards,
Igor

On 12-03-16 6:44 AM, Oliver Pfau wrote:
To build the RAP war file I have a feature project which defines the plugins and fragments needed. For the eclipse stuff there is org.eclipse.rap.ui added. For the RCP client build I have a product definition which defines the dependencies. For the eclipse stuff there is org.eclipse.ui added.
I have a workspace in the IDE for RCP and RAP. The single sourcing are in both workspaces. To get a running workspace setup I have to add both RCP and RAP resources optional.



-----Ursprüngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 11:33
An: tycho-user@xxxxxxxxxxx
Betreff: Re: [tycho-user] Optional dependencies can not be resolved

What dependency do you expect to be used by the build?

--
Regards,
Igor

On 12-03-16 6:30 AM, Oliver Pfau wrote:
Hi,

I think the problem for my build are the optional dependencies for single sourcing (RCP, RAP) bundles. For instance a single sourcing bundles requires org.eclipse.ui and org.eclipse.rap.ui both optional. This works with 0.12.0 but not with the higher version of tycho.

     I get erros that the swt/jface classes can not be resolved:
[ERROR] import org.eclipse.jface.action.MenuManager;
[ERROR] ^^^^^^^^^^^^^^^^^
[ERROR] The import org.eclipse.jface cannot be resolved
...

<dependency-resolution>
	<optionalDependencies>ignore</optionalDependencies>
</dependency-resolution>

does not help.

Is there any other possiblity to change the optional dependencies resolution to get my build working with tycho 0.14.1?

Regards,
Oliver
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top