Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » Maven dependencies?
Maven dependencies? [message #485091] Thu, 10 September 2009 13:38 Go to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

I am trying to create a Maven module that contains a Eclipse PDE project. I
therefore need the following imports:

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.jface.dialogs.MessageDialog;


I have found jface:

<dependency>
<groupId>swt</groupId>
<artifactId>jface</artifactId>
<version>3.0m8</version>
</dependency>

from a site. But how do I get the other dependencies in Maven? I cannot find
them using the build in dependency manager.
Re: Maven dependencies? [message #485162 is a reply to message #485091] Thu, 10 September 2009 16:41 Go to previous messageGo to next message
Igor Fedorenko is currently offline Igor FedorenkoFriend
Messages: 14
Registered: July 2009
Junior Member
Have a look at Tycho project [1], which provides set of Maven extensions
and plugins to build PDE projects with Maven. In particular, look at
sample application that shows P2-based target platform resolver.

[1] https://docs.sonatype.org/display/M2ECLIPSE/Tycho+project+ov erview
[2]
https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management

--
Regards,
Igor

klm wrote:
> I am trying to create a Maven module that contains a Eclipse PDE
> project. I therefore need the following imports:
>
> import org.eclipse.core.commands.AbstractHandler;
> import org.eclipse.core.commands.ExecutionEvent;
> import org.eclipse.core.commands.ExecutionException;
> import org.eclipse.ui.IWorkbenchWindow;
> import org.eclipse.ui.handlers.HandlerUtil;
> import org.eclipse.jface.dialogs.MessageDialog;
>
>
> I have found jface:
>
> <dependency>
> <groupId>swt</groupId>
> <artifactId>jface</artifactId>
> <version>3.0m8</version>
> </dependency>
>
> from a site. But how do I get the other dependencies in Maven? I cannot
> find them using the build in dependency manager.
Re: Maven dependencies? [message #485179 is a reply to message #485162] Thu, 10 September 2009 17:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

Ok maybe I am missing the big picture here. In the PDE example an
application is created that uses the following imports:

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.jface.dialogs.MessageDialog;


To do this the following dependencies are defined in the MANIFEST.MF file:

org.eclipse.ui (3.5.0)
org.eclipse.core.runtime (3.5.0)

So basically as I understand it should just be a matter of defining those
dependencies in the pom.xml file, end of story.

Why go to greater lengths than this?





"Igor Fedorenko" <igor@ifedorenko.com> wrote in message
news:h8ba6t$n4f$1@build.eclipse.org...
> Have a look at Tycho project [1], which provides set of Maven extensions
> and plugins to build PDE projects with Maven. In particular, look at
> sample application that shows P2-based target platform resolver.
>
> [1] https://docs.sonatype.org/display/M2ECLIPSE/Tycho+project+ov erview
> [2]
> https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management
>
> --
> Regards,
> Igor
>
> klm wrote:
>> I am trying to create a Maven module that contains a Eclipse PDE project.
>> I therefore need the following imports:
>>
>> import org.eclipse.core.commands.AbstractHandler;
>> import org.eclipse.core.commands.ExecutionEvent;
>> import org.eclipse.core.commands.ExecutionException;
>> import org.eclipse.ui.IWorkbenchWindow;
>> import org.eclipse.ui.handlers.HandlerUtil;
>> import org.eclipse.jface.dialogs.MessageDialog;
>>
>>
>> I have found jface:
>>
>> <dependency>
>> <groupId>swt</groupId>
>> <artifactId>jface</artifactId>
>> <version>3.0m8</version>
>> </dependency>
>>
>> from a site. But how do I get the other dependencies in Maven? I cannot
>> find them using the build in dependency manager.
Re: Maven dependencies? [message #485184 is a reply to message #485162] Thu, 10 September 2009 18:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

I can't install Tycho based on your tutorial:


http://docs.codehaus.org/display/M2ECLIPSE/tycho+technology+ demo+script


I just get:

c:\tychodemo>c:\tycho\bin\mvn
org.codehaus.tycho:maven-tycho-plugin:generate-poms -DgroupId=tycho.demo -Dtycho.targetPlatform=C:\Programs\ecl
ipse-galileo
[INFO] Build target platform
tycho.targetPlatform=C:\Programs\eclipse-galileo
.. This overrides target platform specified in pom.xml files, if any.
[INFO] Using mirror: test for repository: forge
(mirror url: http://test:8081/test/content/groups/public)
[INFO] Using mirror: test for repository: central
(mirror url: http://test:8081/test/content/groups/public)
[ERROR]
Cannot find mojo descriptor for:
'org.codehaus.tycho:maven-tycho-plugin:generate-poms' - Treating as
non-aggregator.


[INFO] ------------------------------------------------------------ ------------
[INFO] For more information, run with the -e flag
[INFO] ------------------------------------------------------------ ------------
[INFO] BUILD FAILED
[INFO] ------------------------------------------------------------ ------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Thu Sep 10 20:15:41 CEST 2009
[INFO] Final Memory: 9M/16M
[INFO] ------------------------------------------------------------ ------------
c:\tychodemo>

any ideas?







"Igor Fedorenko" <igor@ifedorenko.com> wrote in message
news:h8ba6t$n4f$1@build.eclipse.org...
> Have a look at Tycho project [1], which provides set of Maven extensions
> and plugins to build PDE projects with Maven. In particular, look at
> sample application that shows P2-based target platform resolver.
>
> [1] https://docs.sonatype.org/display/M2ECLIPSE/Tycho+project+ov erview
> [2]
> https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management
>
> --
> Regards,
> Igor
>
> klm wrote:
>> I am trying to create a Maven module that contains a Eclipse PDE project.
>> I therefore need the following imports:
>>
>> import org.eclipse.core.commands.AbstractHandler;
>> import org.eclipse.core.commands.ExecutionEvent;
>> import org.eclipse.core.commands.ExecutionException;
>> import org.eclipse.ui.IWorkbenchWindow;
>> import org.eclipse.ui.handlers.HandlerUtil;
>> import org.eclipse.jface.dialogs.MessageDialog;
>>
>>
>> I have found jface:
>>
>> <dependency>
>> <groupId>swt</groupId>
>> <artifactId>jface</artifactId>
>> <version>3.0m8</version>
>> </dependency>
>>
>> from a site. But how do I get the other dependencies in Maven? I cannot
>> find them using the build in dependency manager.
Re: Maven dependencies? [message #485185 is a reply to message #485184] Thu, 10 September 2009 18:33 Go to previous messageGo to next message
Igor Fedorenko is currently offline Igor FedorenkoFriend
Messages: 14
Registered: July 2009
Junior Member
You likely have mirrorOf=* or mirrirOf=external:* in your settings.xml.
Ublock repo with id=forge (defined in tycho global settings.xml) using
!forge in mirrorOf or remove the mirror completely.

--
Regards,
Igor

klm wrote:
> I can't install Tycho based on your tutorial:
>
>
> http://docs.codehaus.org/display/M2ECLIPSE/tycho+technology+ demo+script
>
>
> I just get:
>
> c:\tychodemo>c:\tycho\bin\mvn
> org.codehaus.tycho:maven-tycho-plugin:generate-poms -DgroupId=tycho.demo
> -Dtycho.targetPlatform=C:\Programs\ecl
> ipse-galileo
> [INFO] Build target platform
> tycho.targetPlatform=C:\Programs\eclipse-galileo
> . This overrides target platform specified in pom.xml files, if any.
> [INFO] Using mirror: test for repository: forge
> (mirror url: http://test:8081/test/content/groups/public)
> [INFO] Using mirror: test for repository: central
> (mirror url: http://test:8081/test/content/groups/public)
> [ERROR]
> Cannot find mojo descriptor for:
> 'org.codehaus.tycho:maven-tycho-plugin:generate-poms' - Treating as
> non-aggregator.
>
>
> [INFO]
> ------------------------------------------------------------ ------------
> [INFO] For more information, run with the -e flag
> [INFO]
> ------------------------------------------------------------ ------------
> [INFO] BUILD FAILED
> [INFO]
> ------------------------------------------------------------ ------------
> [INFO] Total time: 5 seconds
> [INFO] Finished at: Thu Sep 10 20:15:41 CEST 2009
> [INFO] Final Memory: 9M/16M
> [INFO]
> ------------------------------------------------------------ ------------
> c:\tychodemo>
>
> any ideas?
>
>
>
>
>
>
>
> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
> news:h8ba6t$n4f$1@build.eclipse.org...
>> Have a look at Tycho project [1], which provides set of Maven
>> extensions and plugins to build PDE projects with Maven. In
>> particular, look at sample application that shows P2-based target
>> platform resolver.
>>
>> [1] https://docs.sonatype.org/display/M2ECLIPSE/Tycho+project+ov erview
>> [2]
>> https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management
>>
>>
>> --
>> Regards,
>> Igor
>>
>> klm wrote:
>>> I am trying to create a Maven module that contains a Eclipse PDE
>>> project. I therefore need the following imports:
>>>
>>> import org.eclipse.core.commands.AbstractHandler;
>>> import org.eclipse.core.commands.ExecutionEvent;
>>> import org.eclipse.core.commands.ExecutionException;
>>> import org.eclipse.ui.IWorkbenchWindow;
>>> import org.eclipse.ui.handlers.HandlerUtil;
>>> import org.eclipse.jface.dialogs.MessageDialog;
>>>
>>>
>>> I have found jface:
>>>
>>> <dependency>
>>> <groupId>swt</groupId>
>>> <artifactId>jface</artifactId>
>>> <version>3.0m8</version>
>>> </dependency>
>>>
>>> from a site. But how do I get the other dependencies in Maven? I
>>> cannot find them using the build in dependency manager.
>
Re: Maven dependencies? [message #485188 is a reply to message #485179] Thu, 10 September 2009 18:50 Go to previous messageGo to next message
Igor Fedorenko is currently offline Igor FedorenkoFriend
Messages: 14
Registered: July 2009
Junior Member
In short, there is no universally correct mapping between Maven and
OSGi/Eclipse dependencies.

Transitive resolution works differently. OSGi import/export package and
classpath visibility rules have no analog in Maven at all. To name a
couple of differences. Besides, dependencies defined both in pom.xml and
manifest.mf will be quite laborious to keep in sync for lager projects.

--
Regards,
Igor

klm wrote:
> Ok maybe I am missing the big picture here. In the PDE example an
> application is created that uses the following imports:
>
> import org.eclipse.core.commands.AbstractHandler;
> import org.eclipse.core.commands.ExecutionEvent;
> import org.eclipse.core.commands.ExecutionException;
> import org.eclipse.ui.IWorkbenchWindow;
> import org.eclipse.ui.handlers.HandlerUtil;
> import org.eclipse.jface.dialogs.MessageDialog;
>
>
> To do this the following dependencies are defined in the MANIFEST.MF file:
>
> org.eclipse.ui (3.5.0)
> org.eclipse.core.runtime (3.5.0)
>
> So basically as I understand it should just be a matter of defining
> those dependencies in the pom.xml file, end of story.
>
> Why go to greater lengths than this?
>
>
>
>
>
> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
> news:h8ba6t$n4f$1@build.eclipse.org...
>> Have a look at Tycho project [1], which provides set of Maven
>> extensions and plugins to build PDE projects with Maven. In
>> particular, look at sample application that shows P2-based target
>> platform resolver.
>>
>> [1] https://docs.sonatype.org/display/M2ECLIPSE/Tycho+project+ov erview
>> [2]
>> https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management
>>
>>
>> --
>> Regards,
>> Igor
>>
>> klm wrote:
>>> I am trying to create a Maven module that contains a Eclipse PDE
>>> project. I therefore need the following imports:
>>>
>>> import org.eclipse.core.commands.AbstractHandler;
>>> import org.eclipse.core.commands.ExecutionEvent;
>>> import org.eclipse.core.commands.ExecutionException;
>>> import org.eclipse.ui.IWorkbenchWindow;
>>> import org.eclipse.ui.handlers.HandlerUtil;
>>> import org.eclipse.jface.dialogs.MessageDialog;
>>>
>>>
>>> I have found jface:
>>>
>>> <dependency>
>>> <groupId>swt</groupId>
>>> <artifactId>jface</artifactId>
>>> <version>3.0m8</version>
>>> </dependency>
>>>
>>> from a site. But how do I get the other dependencies in Maven? I
>>> cannot find them using the build in dependency manager.
>
Re: Maven dependencies? [message #485189 is a reply to message #485188] Thu, 10 September 2009 18:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ddd.asd.com

Ok so first step is to make the TychoDemo work and then somehow use Thycho
to solve dependencies between the MANIFEST.MF file and the pom.xml file?


"Igor Fedorenko" <igor@ifedorenko.com> wrote in message
news:h8bhpp$lu1$1@build.eclipse.org...
> In short, there is no universally correct mapping between Maven and
> OSGi/Eclipse dependencies.
>
> Transitive resolution works differently. OSGi import/export package and
> classpath visibility rules have no analog in Maven at all. To name a
> couple of differences. Besides, dependencies defined both in pom.xml and
> manifest.mf will be quite laborious to keep in sync for lager projects.
>
> --
> Regards,
> Igor
>
> klm wrote:
>> Ok maybe I am missing the big picture here. In the PDE example an
>> application is created that uses the following imports:
>>
>> import org.eclipse.core.commands.AbstractHandler;
>> import org.eclipse.core.commands.ExecutionEvent;
>> import org.eclipse.core.commands.ExecutionException;
>> import org.eclipse.ui.IWorkbenchWindow;
>> import org.eclipse.ui.handlers.HandlerUtil;
>> import org.eclipse.jface.dialogs.MessageDialog;
>>
>>
>> To do this the following dependencies are defined in the MANIFEST.MF
>> file:
>>
>> org.eclipse.ui (3.5.0)
>> org.eclipse.core.runtime (3.5.0)
>>
>> So basically as I understand it should just be a matter of defining those
>> dependencies in the pom.xml file, end of story.
>>
>> Why go to greater lengths than this?
>>
>>
>>
>>
>>
>> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
>> news:h8ba6t$n4f$1@build.eclipse.org...
>>> Have a look at Tycho project [1], which provides set of Maven extensions
>>> and plugins to build PDE projects with Maven. In particular, look at
>>> sample application that shows P2-based target platform resolver.
>>>
>>> [1] https://docs.sonatype.org/display/M2ECLIPSE/Tycho+project+ov erview
>>> [2]
>>> https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management
>>>
>>> --
>>> Regards,
>>> Igor
>>>
>>> klm wrote:
>>>> I am trying to create a Maven module that contains a Eclipse PDE
>>>> project. I therefore need the following imports:
>>>>
>>>> import org.eclipse.core.commands.AbstractHandler;
>>>> import org.eclipse.core.commands.ExecutionEvent;
>>>> import org.eclipse.core.commands.ExecutionException;
>>>> import org.eclipse.ui.IWorkbenchWindow;
>>>> import org.eclipse.ui.handlers.HandlerUtil;
>>>> import org.eclipse.jface.dialogs.MessageDialog;
>>>>
>>>>
>>>> I have found jface:
>>>>
>>>> <dependency>
>>>> <groupId>swt</groupId>
>>>> <artifactId>jface</artifactId>
>>>> <version>3.0m8</version>
>>>> </dependency>
>>>>
>>>> from a site. But how do I get the other dependencies in Maven? I cannot
>>>> find them using the build in dependency manager.
>>
Re: Maven dependencies? [message #485226 is a reply to message #485189] Thu, 10 September 2009 20:01 Go to previous message
Igor Fedorenko is currently offline Igor FedorenkoFriend
Messages: 14
Registered: July 2009
Junior Member
I would probably look at Tycho target platform management wiki [1] and
corresponding sample application [2].


[1]
https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management
[2] http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-demo/itp 01/

--
Regards,
Igor

klm wrote:
> Ok so first step is to make the TychoDemo work and then somehow use
> Thycho to solve dependencies between the MANIFEST.MF file and the
> pom.xml file?
>
>
> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
> news:h8bhpp$lu1$1@build.eclipse.org...
>> In short, there is no universally correct mapping between Maven and
>> OSGi/Eclipse dependencies.
>>
>> Transitive resolution works differently. OSGi import/export package
>> and classpath visibility rules have no analog in Maven at all. To name
>> a couple of differences. Besides, dependencies defined both in pom.xml
>> and manifest.mf will be quite laborious to keep in sync for lager
>> projects.
>>
>> --
>> Regards,
>> Igor
>>
>> klm wrote:
>>> Ok maybe I am missing the big picture here. In the PDE example an
>>> application is created that uses the following imports:
>>>
>>> import org.eclipse.core.commands.AbstractHandler;
>>> import org.eclipse.core.commands.ExecutionEvent;
>>> import org.eclipse.core.commands.ExecutionException;
>>> import org.eclipse.ui.IWorkbenchWindow;
>>> import org.eclipse.ui.handlers.HandlerUtil;
>>> import org.eclipse.jface.dialogs.MessageDialog;
>>>
>>>
>>> To do this the following dependencies are defined in the MANIFEST.MF
>>> file:
>>>
>>> org.eclipse.ui (3.5.0)
>>> org.eclipse.core.runtime (3.5.0)
>>>
>>> So basically as I understand it should just be a matter of defining
>>> those dependencies in the pom.xml file, end of story.
>>>
>>> Why go to greater lengths than this?
>>>
>>>
>>>
>>>
>>>
>>> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
>>> news:h8ba6t$n4f$1@build.eclipse.org...
>>>> Have a look at Tycho project [1], which provides set of Maven
>>>> extensions and plugins to build PDE projects with Maven. In
>>>> particular, look at sample application that shows P2-based target
>>>> platform resolver.
>>>>
>>>> [1] https://docs.sonatype.org/display/M2ECLIPSE/Tycho+project+ov erview
>>>> [2]
>>>> https://docs.sonatype.org/display/M2ECLIPSE/Tycho+build+targ et+platform+management
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Igor
>>>>
>>>> klm wrote:
>>>>> I am trying to create a Maven module that contains a Eclipse PDE
>>>>> project. I therefore need the following imports:
>>>>>
>>>>> import org.eclipse.core.commands.AbstractHandler;
>>>>> import org.eclipse.core.commands.ExecutionEvent;
>>>>> import org.eclipse.core.commands.ExecutionException;
>>>>> import org.eclipse.ui.IWorkbenchWindow;
>>>>> import org.eclipse.ui.handlers.HandlerUtil;
>>>>> import org.eclipse.jface.dialogs.MessageDialog;
>>>>>
>>>>>
>>>>> I have found jface:
>>>>>
>>>>> <dependency>
>>>>> <groupId>swt</groupId>
>>>>> <artifactId>jface</artifactId>
>>>>> <version>3.0m8</version>
>>>>> </dependency>
>>>>>
>>>>> from a site. But how do I get the other dependencies in Maven? I
>>>>> cannot find them using the build in dependency manager.
>>>
>
Previous Topic:Writing plugin using "Plug-in Development" or a maven plugin?
Next Topic:0.9.9 release
Goto Forum:
  


Current Time: Tue Sep 25 05:21:03 GMT 2018

Powered by FUDForum. Page generated in 0.02019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top