directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRSTUDIO-995) Migrate build system to use Tycho
Date Sat, 20 Sep 2014 13:09:33 GMT

    [ https://issues.apache.org/jira/browse/DIRSTUDIO-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14141961#comment-14141961
] 

Stefan Seelmann commented on DIRSTUDIO-995:
-------------------------------------------

Emmanuel, there are nicer parts you can work on, but as you want... ;)

To start please checkout the branch and try to build it. It requires two steps:
1. Build the P2 repo of 3rd party dependencies and the eclipse target file (details below):
cd eclipse-target-platform && mvn clean install && cd ..
2. Build the main project: mvn clean install

Then try to import it into Eclipse, best is to use Luna for RCP (http://eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/lunar),
I think it already includes m2e plugins. First import the eclipse-target-platform as "Existing
Maven Project", open eclipse-target-platform.target (hopefully there are no error), and click
the "Set as Target Platrorm" link. Then import the main project also as "Existing Maven Project",
only few plugins will be imported, there shouln't be any error.

The first steps to migrate a plugin are:
1. Activate the module in plugins/pom.xml
2. Change the Plugin's pom.xml artifactId (must be same as Bundle-SymbolicName) and packaging,
comment out everything else (for later check, e.g. enabling RAT plugin again(, see the plugins/common.core/pom.xml
as example
3. Add build.properties file, just copy from commons.core
4. Create META-INF/MANIFEST.MF, copy from commons.core, change Bundle-Name, Bundle-SymbolicName,
Export-Package, Require-Bundle, Import-Package. You can look into the Felix bundle plugin
instruction of the pom.xml. I use Import-Package instead of Require-Bundle for all the small
commons dependencies.

Then you can try to build it from cmd line, and to import the plugin into Eclipse.

The interesting thing is if new dependencies are required. Eclipse and also Tycho use so-called
"P2" repositories. All Eclipse dependencies are available in such P2 repos, also some 3rd
party depenencies. For regular Maven dependencies Tycho has an option to use them within a
Tycho build, however that only works for proper OSGi bundles, but some dependencies we use
are not. So I choosed another way for now, we'll see if it works out. This requires to split
the build into two steps.

1st step is to build a local P2 repository. This is done in the I found the eclipse-target-platform
project. It is a regular maven build. I found the p2-maven-plugin which is very convinient,
it OSGi-ifies Maven artifacts and build a P2 repo. If it is too unflexible we can later switch
to another approach. But the result is a valid P2 repo with all required 3rd party dependencies
(including API and ApacheDS) in target/repository. 

The build also creates the proper target platform file, it includes location of used P2 repos
and used dependendies. This file is used by Eclipse as well as by the Tycho build to configure
P2 repo.


> Migrate build system to use Tycho
> ---------------------------------
>
>                 Key: DIRSTUDIO-995
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-995
>             Project: Directory Studio
>          Issue Type: Task
>    Affects Versions: 2.0.0-M8 (2.0.0.v20130628)
>            Reporter: Stefan Seelmann
>            Assignee: Stefan Seelmann
>            Priority: Blocker
>             Fix For: 2.0.0-M9
>
>
> Just a TODO list for now...
> * Manage 3rd party dependencies
> * Move tests to *.test fragments?
> * Use Luna
> * Migrate plugins
> * Migrate features
> * Migrate RCP application
> * Migrate help plugins
> * Installers (Windows EXE, Mac DMG)
> * Generate P2 repository / site, self-hosted
> * P2 repository for API and ApacheDS bundles?
> * Migrate release process
> * Document build system
> * Cleanup POMs: RAT plugin configuration
> * Cleanup old "repository" folder
> * 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message