Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] My first Tycho build

Hey
I do not know if it will be usefull for you but perhaps it could help you or others.

We have created a maven archetype to create a tycho compliant project for our project in Eclipse Papyrus.
We have choosen several conventions that you could obvsiouly changed to match your own requirements.

Prerequisites is to be in a folder manage by a git repository, and have the papyrus repositories define in your maven settings
You could look at [1]

You could just execute the following command
mvn archetype:generate -DarchetypeGroupId=org.eclipse.papyrus.components -DarchetypeArtifactId=org.eclipse.papyrus.components.archetype -DarchetypeRepository=https://repo.eclipse.org/content/repositories/papyrus-releases/ -DarchetypeVersion=0.0.18-SNAPSHOT -DgroupId=com.cea.PROJECTCATEGORY -DartifactId=com.cea.PROJECTCATEGORY.PROJECT -Dversion=0.0.1 -DfullartifactId=com.cea.PROJECTCATEGORY.PROJECT -DcomponentName=com.cea.PROJECTCATEGORY-PROJECT -DhudsonViewName=HUDSON_TAB -DbugzillaName=BUGZILLA_COMPONENT

Then you should be able to run a default
mvn clean install -Dtycho.localArtifacts=ignore
or
mvn clean install -Pproduct

It will create for your p2/updatesite and also the rcp etc...
It will also be able to generate a default web site such the one describe in [1,2]

Then you have to migrate your plugins of interest in it, changing the pom to add the modules you added  and update the feature .

I thing this archetype could be upgraded to be more generic, this could be a good idea for Eclipse Tycho community.
All code is open source/epl and manage here [2] 

Have fun.

Francois

[1]: https://hudson.eclipse.org/papyrus/view/Components/job/papyrus-components-website/ws/site-staging/org.eclipse.papyrus.components.archetype/user/sop-projectcreation.html
[2]: https://hudson.eclipse.org/papyrus/view/Components/job/papyrus-components-website/ws/site-staging//source-repository.html 


-----Message d'origine-----
De : tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] De la part de Sievers, Jan
Envoyé : mercredi 18 janvier 2017 09:41
À : Tycho user list <tycho-user@xxxxxxxxxxx>
Objet : Re: [tycho-user] My first Tycho build

>------
>The first problem I got was that few plugins and features have the same 
>identifier: bundle symbolic name and feature name respectively. If 
>additionally they have the same version, the tycho/maven-based build fails. Is there any way to avoid the issue,  apart from the obvious workaround of making either the name or the version differ ?

have you tried using different maven groupIds for plugins and features?

>-----
>The second problem I've found is the automatic generation of sources 
>for features. Looking at the current Eclipse OCL features, some of them include source features, others don´t. For instance, org.eclipse.ocl.all [3] does not include source features.
> The build is currently failing with the following error:
>
>
>[ERROR] Failed to execute goal 
>org.eclipse.tycho.extras:tycho-source-feature-plugin:0.26.0:source-feat
>ure (source-feature) on project
>org.eclipse.ocl.all: Could not generate source feature for project 
>MavenProject: org.eclipse.ocl:org.eclipse.ocl.all:5.2.200-SNAPSHOT
> @ 
>XXXXXXX\features\org.eclipse.ocl.all-feature\.polyglot.build.properties
>[ERROR] Missing sources for features 
>[org.eclipse.ocl_3.6.201.201701171307, 
>org.eclipse.ocl.uml_5.2.201.201701171307]
> If I try to exclude the source feature generation for that particular 
>feature in the main configuration pom file [2] (lines 62-66), I still get the same failure. Any suggestion/tip/documentation link about how to deal with source features ?

I think you should exclude 

            <configuration>
                 <excludes>
                    <feature id="org.eclipse.ocl" />
                    <feature id="org.eclipse.ocl.uml" />
                </excludes>
            </configuration>


see https://eclipse.org/tycho/sitedocs-extras/tycho-source-feature-plugin/source-feature-mojo.html
and https://wiki.eclipse.org/Tycho/Reference_Card#Source_Features

>A third problem I foresee, related to testing (I've not tried tests 
>execution yet). With buckminter there is the concept of workspace and 
>workspace provision. Is there anything similar in tycho/maven ? IIRC, OCL tests cases require that some third party  projects exist in the workspace, and I'm unclear whether the tests cases are gonna work without them.


the eclipse workspace for JUnit tests is empty by default.
You may be able to copy/extract files to https://eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#osgiDataDirectory

during build prior to test execution or configure it to use a workspace folder not located in target/.

Note that the workspace folder keeps state so it's probably a good idea to keep it in target/ so it's cleaned on mvn clean and copy files each time before test execution.

Regards,
Jan 


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/tycho-user

Back to the top