How do I specify P2 causality advice in a tycho build - eclipse-pde

I would like to have additional features considered for installation, if a main feature is installed. It seems the P2 term is causality advice. Does anyone know how to formulate this advice for a tycho build?

Related

Changing Feature and Plugin version in PDE headless build

Am able to successfully build a feature using PDE Headless mechanism
But after the build is successful, the version of the plugins and feature is set to 0.0.0. This is expected because, in my feature and plugins the version is set to 0.0.0.qualifier.
What am expecting is, change/update the version while PDE build takes place and this version has to be set for both the feature and plugins
Ex: after the PDE build, my feature and plugins version should be something like this
1.3.0.20140404-1150
where 1.3.5 is the value that i need to specify (or give as input) to the PDE headless build
Is it possible? If yes, please guide me to achieve this.
Any pointers in this direction is much appreciated.
NOTE: I need to update the version of both plugins and feature while PDE build takes place and its a feature build not a product build
You can start by setting the initial versions in your source code/IDE and then use API tools to help you stay consistent.See http://www.eclipse.org/pde/pde-api-tools/ and http://www.ibm.com/developerworks/library/os-eclipse-api-tools/

How does the m2e eclipse plugin interact with eclipse?

I am an eclipse power and who has ignored maven due to the historically poor maven / eclipse integration. m2e seems to be maturing and I am taking it out for a serious test drive.
I want to understand how m2e works within eclipse, so I can better get the two working smoothly together and to understand the still cryptic error messages and problems that arise.
I have tried googling for an explanation of the m2e eclipse integration architecture and found nothing that provides a good account of how the integration works. rather just a lot of scattered blog posts all over the web.
Can anyone provide a solid overview of how m2e bridges the gap between the eclipse view of the world and maven view of the world? Especially how does maven integrate into the incremental builds that eclipse does? What is the impact on eclipse stability / performance from using m2e.
I have found the details I was looking for in a Presentation from Eclipse Con titled "m2e, an exercise in mixing oil and water"
http://www.eclipsecon.org/europe2012/sites/eclipsecon.org.europe2012/files/EclipseConEU2012-m2e-talk.pdf
Abstract:
m2e is a popular Eclipse IDE plugin with stated project goal "to
provide a first-class Apache Maven support in the Eclipse IDE". In
this talk I will give an overview of Maven/Eclipse integration
approach implemented by m2e, highlight differences between Maven and
Eclipse that make proper integration difficult or impossible and will
discuss possible ways to improve the integration. The talk is targeted
at Eclipse and Maven developers who want to better understand
challenges of Maven/Eclipse integration and advanced m2e users who
want to know what happens "under the hood".
Sonatype has a pretty good book about it at http://www.sonatype.com/Support/Books/Developing-with-Eclipse-Maven
In short, m2e will setup your Eclipse base on the Maven POMs of your projects, and it provides you access to Maven commands
these are some of the most obvious things m2e done:
setup the source folder and output directory according to POM
Setup dependencies/libraries and project dependency base on POM
Use corresponding Eclipse plugins base on Maven plugins (if M2E knows how to deal with it)
etc.
Allow you to run Maven goals
etc.....
It is neither a formal nor a accurate description, but I wish it give some basic idea :P

Continuous integration & eclipse plugin development

I am developing a set of eclipse plugins, and I have several JUnit plugin tests that actually start another instance of eclipse, create a mock workspace and a mock project and runs various operations on them. I want to put that on continuous integration and I am at loss as to where to start. I am using Hudson, would there be any plugins that makes that easier? Can those tests launch eclipse in headless mode or something on the CI server? Pointers would be much appreciated.
I think the best solution for building Eclipse-based software currently is Tycho - it is based on Maven and uses your standard Eclipse files (like manifest, target platform, product definition). I got started with it using an intro from this blog: http://mattiasholmqvist.se/2010/02/building-with-tycho-part-1-osgi-bundles/, and it worked really well. We also use Hudson, and since Tycho is Maven-based, Hudson integration was trivial and worked simply by calling Maven, which Hudson supports out of the box.
As far as I know, Buckminster tries to solve these problems: you can create descriptors, and then Buckminster can execute your tasks.
For Hudson there is a Buckminster module, that helps executing the Buckminster builds.
maybe this helps you to avoid plugin tests? ;) i like to avoid them... by using mock objects...
http://blog.srvme.de/2010/12/10/mock-eclipse-ifile/

Enterprise Eclipse Provisioning - Or - How to share your standard Eclipse setup with other developers

We use Eclipse as the IDE for developing all sorts of Java/J2EE applications in our 150 people odd IT department. One of the common problems we have been seeing is that developers download and install different versions of Eclipse and plugins based on their personal likes and dislikes.
We have been trying to bring some consistency to this and have standardized on the version and the plugins that developers should be using. So the problem now is how do we distribute this installation to the team. We have zipped the directories and shared it through a shared drive. But I am looking for a better solution using some kind of provisioning tool for Eclipse using which people can install the IDE or get updates.
Has anyone faced this problem? What are your solutions to this? How do you ensure a standard Eclipse environment across developers?
I found Yoxos as a potential solution to this. Does anyone have any experience with it? Can p2 be used to do this?
You can create your own composite p2 repository and use p2 installer to bootstrap Eclipse from there. Alternatively you could use one of the commercial tools, such as Yoxos, Pulse or Nexus.
Our solution is currently a non-freware one, based on Nexus Pro.
Since it supports p2 repositories as well as well as the ability to combine multiple Eclipse update sites into a single URL, we are using that last feature to propose one URL per project, each one referencing the right set of plugins for each project.
alt text http://img714.imageshack.us/img714/9762/mavenp2.png

Maven2 Eclipse integration

There seem to be two rival Eclipse plugins for integrating with Maven:
m2Eclipse
and
q4e.
Has anyone recently evaluated or used these plugins?
Why would I choose one or the other?
Side by side comparison table of three maven plugins.
There is only one point where q4e is actually better: dependency viewer. You could see the dependency tree, manage your dependencies visually and even see them in a graph. But, m2eclipse works in a better way, specially because you can create you own build commands (in the run menu). q4e comes with some predefined commands and I can't find where to define a new one. In other words, m2eclipse is more friendly to the maven way.
I have been using m2Eclipse for quiet some time now and have found it to be very reliable. I wasn't aware of q4e until I saw this question so I can't recommend one over the other.
My 2cents,
I am using eclipse for some months now with m2eclipse integration. It's easy to use and straight forward. Once you associate your project to maven and update the dependencies using m2eclipse, any change to pom.xml are reflected to entire project, even Java version definition causes it to be compiled in right JRE (if you have it installed, and properly configured into eclipse.)
Another advantage I found is the maven plug-ins are easy to use integrated with eclipse (jetty being my best example, again, properly configured you can easily integrate maven, jetty-plug-in and Eclipse Debugger)
Compilation, packaging and all other maven features are equally easy to use with a couple clicks or shortcuts.
About q4e I have been reading a lot of good stuff about it and seems the next versions will do a lot more than m2eclipse, with a better dependency management and even visual graphs (!) but the general opinion is that m2eclipse is still better than q4e but q4e is getting better each new version and maybe will surpass m2eclipse soon.