Discussion:
Optional dependencies can not be resolved
(too old to reply)
Oliver Pfau
2012-03-16 10:30:54 UTC
Permalink
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
Benjamin Muskalla
2012-03-16 10:33:02 UTC
Permalink
One thing to consider when single-sourcing is to use Import-Package instead
of bundle dependencies as the packages in both runtimes are the same. Just
be aware of split-packages in case you're working with workbench bundles.

Benny
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Benjamin Muskalla
Software Engineer, Tasktop Sync
Committer, Eclipse Mylyn, Eclipse EGit
http://tasktop.com
@bmuskalla <http://twitter.com/bmuskalla>
Oliver Pfau
2012-03-16 10:45:24 UTC
Permalink
Ok. I have added the jars not the packages (do not know what was the reason).
Can you explain me what you mean with split-packages?

Regards,
Oliver

Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Benjamin Muskalla
Gesendet: Freitag, 16. März 2012 11:33
An: Tycho user list
Betreff: Re: [tycho-user] Optional dependencies can not be resolved

One thing to consider when single-sourcing is to use Import-Package instead of bundle dependencies as the packages in both runtimes are the same. Just be aware of split-packages in case you're working with workbench bundles.

Benny
On Fri, Mar 16, 2012 at 11:30 AM, Oliver Pfau <***@scalaris.com<mailto:***@scalaris.com>> 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-***@eclipse.org<mailto:tycho-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Benjamin Muskalla
Software Engineer, Tasktop Sync
Committer, Eclipse Mylyn, Eclipse EGit
http://tasktop.com
@bmuskalla<http://twitter.com/bmuskalla>
Igor Fedorenko
2012-03-16 10:33:26 UTC
Permalink
What dependency do you expect to be used by the build?

--
Regards,
Igor
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
Oliver Pfau
2012-03-16 10:44:16 UTC
Permalink
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-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 11:33
An: tycho-***@eclipse.org
Betreff: Re: [tycho-user] Optional dependencies can not be resolved

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

--
Regards,
Igor
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
Benjamin Muskalla
2012-03-16 10:46:55 UTC
Permalink
You might also want to checkout this:
https://github.com/hstaudacher/org.eclipse.rap.build.examples
Not sure if it still works with the new tycho bits though.

Benny
Post by Oliver Pfau
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-----
Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
Post by Oliver Pfau
[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?
Post by Oliver Pfau
Regards,
Oliver
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Benjamin Muskalla
Software Engineer, Tasktop Sync
Committer, Eclipse Mylyn, Eclipse EGit
http://tasktop.com
@bmuskalla <http://twitter.com/bmuskalla>
Oliver Pfau
2012-03-16 10:57:59 UTC
Permalink
Thanks. I have a problem to change the required bundles from jar to package, because some required jars are reexported but this is not possible with imported packages. So I have to import the packages in each bundle as solution?

Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Benjamin Muskalla
Gesendet: Freitag, 16. März 2012 11:47
An: Tycho user list
Betreff: Re: [tycho-user] Optional dependencies can not be resolved

You might also want to checkout this: https://github.com/hstaudacher/org.eclipse.rap.build.examples
Not sure if it still works with the new tycho bits though.

Benny
On Fri, Mar 16, 2012 at 11:44 AM, Oliver Pfau <***@scalaris.com<mailto:***@scalaris.com>> 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-***@eclipse.org<mailto:tycho-user-***@eclipse.org> [mailto:tycho-user-***@eclipse.org<mailto:tycho-user-***@eclipse.org>] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 11:33
An: tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>
Betreff: Re: [tycho-user] Optional dependencies can not be resolved

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

--
Regards,
Igor
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>
https://dev.eclipse.org/mailman/listinfo/tycho-user



--
Benjamin Muskalla
Software Engineer, Tasktop Sync
Committer, Eclipse Mylyn, Eclipse EGit
http://tasktop.com
@bmuskalla<http://twitter.com/bmuskalla>
Benjamin Muskalla
2012-03-16 11:05:44 UTC
Permalink
Yes, import package needs to be defined on each bundle. Reexporting bundles
is a bad style anyway IMHO.
Post by Oliver Pfau
Thanks. I have a problem to change the required bundles from jar to
package, because some required jars are reexported but this is not possible
with imported packages. So I have to import the packages in each bundle as
solution?****
** **
*Gesendet:* Freitag, 16. März 2012 11:47
*An:* Tycho user list
*Betreff:* Re: [tycho-user] Optional dependencies can not be resolved****
** **
https://github.com/hstaudacher/org.eclipse.rap.build.examples****
Not sure if it still works with the new tycho bits though.****
** **
Benny****
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-----
Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved****
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
Post by Oliver Pfau
[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?
Post by Oliver Pfau
Regards,
Oliver
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user****
****
** **
-- ****
Benjamin Muskalla****
Software Engineer, Tasktop Sync****
Committer, Eclipse Mylyn, Eclipse EGit****
http://tasktop.com****
@bmuskalla <http://twitter.com/bmuskalla>****
** **
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Benjamin Muskalla
Software Engineer, Tasktop Sync
Committer, Eclipse Mylyn, Eclipse EGit
http://tasktop.com
@bmuskalla <http://twitter.com/bmuskalla>
Igor Fedorenko
2012-03-16 12:33:09 UTC
Permalink
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Oliver Pfau
2012-03-16 12:36:53 UTC
Permalink
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-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 13:33
An: tycho-***@eclipse.org
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Igor Fedorenko
2012-03-16 12:49:13 UTC
Permalink
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 13:33
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
[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
Oliver Pfau
2012-03-16 13:34:51 UTC
Permalink
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-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 13:49
An: tycho-***@eclipse.org
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 13:33
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
[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
Igor Fedorenko
2012-03-16 13:54:09 UTC
Permalink
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
Post by Oliver Pfau
How can I define the dependencies to the RAP or RCP specific resourcesin my p2 repository in the pom?
-----Ursprüngliche Nachricht-----
Gesendet: Freitag, 16. März 2012 13:49
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 13:33
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Oliver Pfau
2012-03-16 14:43:18 UTC
Permalink
After adding some of the optional dependencies in the pom.xml, I get "[ERROR] The projects in the reactor contain a cyclic reference: Edge between...". The workspace in IDE has no errors. It is strange that the configuration runs with tycho 0.12.0. I also tried to include only packages with the same result that the org.eclipse.ui could not be resolved.

-----Ursprüngliche Nachricht-----
Von: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] Im Auftrag von Igor Fedorenko
Gesendet: Freitag, 16. März 2012 14:54
An: tycho-***@eclipse.org
Betreff: 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
Post by Oliver Pfau
How can I define the dependencies to the RAP or RCP specific resourcesin my p2 repository in the pom?
-----Ursprüngliche Nachricht-----
Gesendet: Freitag, 16. März 2012 13:49
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 13:33
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
Post by Oliver Pfau
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-----
Gesendet: Freitag, 16. März 2012 11:33
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
What dependency do you expect to be used by the build?
--
Regards,
Igor
Post by Oliver Pfau
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.
[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
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Oliver Pfau
2012-03-19 09:00:58 UTC
Permalink
Hi,

after adding of the jars.extra.classpath entries to all UI bundles my build is working with 0.14.1 even with reexported dependencies and imported bundles instead of packages.
Thanks :)

Oliver

-----Ursprüngliche Nachricht-----
Von: Mirko Swillus [mailto:***@qualitype.de]
Gesendet: Freitag, 16. März 2012 15:38
An: Oliver Pfau
Betreff: Re: [tycho-user] Optional dependencies can not be resolved
danke hab die Nachricht damals gesehen. Muss dann aber vermutlich Absolutpfade angeben oder?
jars.extra.classpath = platform:/plugin/org.eclipse.ui, platform:/plugin/org.eclipse.ui.forms, platform:/plugin/org.eclipse.jface.databinding, platform:/plugin/org.eclipse.core.databinding, platform:/plugin/org.eclipse.core.databinding.observable, platform:/plugin/org.eclipse.core.databinding.beans, platform:/plugin/org.eclipse.core.databinding.property
Dann findet er auch die Bundles in Deiner Target Plattform.
Da ich ein lokales p2 repository habe werde ich zuerst mal auf
package dependencies umstellen und dann mal schauen was tycho macht.
Finde ich auch spannend und ist rein vom OSGi her auch der
gebräuchlichere Weg. Ich hatte nur Bedenken dass das dann echt ne ganze
Menge Packages werden.

Grüße,
Mirko
____________________________________________________________________

[ M i r k o S w i l l u s ]

Software Development

Qualitype AG
Quality Management Systems | Bioinformatics
Moritzburger Weg 67 | 01109 Dresden
fon +49.351.8838 2813 | fax +49.351.8838 2809
e-mail: ***@qualitype.de | http://www.qualitype.de

Sitz der Gesellschaft: Dresden | Amtsgericht Dresden HRB 19830
Vorstand: Dr. Wilhelm Zörgiebel | Dr. Frank Götz
Aufsichtsratsvorsitz: Prof. Dr. Gerhard P. Fettweis
____________________________________________________________________

The information in this email and any attachments is confidential and is
intended for the addressee only. If you are not the intended recipient,
please delete this message and any attachments and advise the sender by
return email.

Continue reading on narkive:
Loading...