Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] [Tycho Users] Re: problems with the generate-poms target

(Nope, still the wrong mailing list. The new one is tycho-user at eclipse.org)

 

The fact that you need step 5 seems like a bug. Please create a minimal example project and file a bug at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Tycho

 

Automatically adding the target configuration in case of a .target file in the sources would be a good enhancement. Please file an enhancement at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Tycho. Also, if you want to see this in Tycho rather sooner than later, you should consider providing a patch with implementation and tests.

 

Kind regards

Tobias

 

 

 

From: tychotychonofuba [mailto:bonnier.vincent@xxxxxxxxx]
Sent: 19 April 2011 12:57
To: tycho-users@xxxxxxxxxxxxxxxxxx
Subject: [Tycho Users] Re: problems with the generate-poms target

 

Here are my answers : 

1) What do you need to configure on the maven-osgi-test-plugin? Tests are automatically executed if the packaging type is eclipse-test-plugin. 


I try your solution, but sadly in fact if I don't put in the build-section of the parent pom a reference to the maven-osgi-test-plugin i don't have any reports of my tests (In normal time, they are in surefire-report a folder created inside each target folder). Maybe I forgot something ?
 


2) In all projects I use, the .target file is contained in a separate Eclipse project. Do you have any experience with the Tycho build if the .target file is contained in any of the source projects? Where do you usually store the .target file?


Our target file is inside a project named release with all the configurations files to work with headless build. I let you see below the complete description of my actual workflow.

1) First I checkout a project named "release" which contains:
- the psf files (team project set eclipse file) which contain the list of all required projects and their source locations (SVN or CVS).
- a build-automation directory containing:
   - Ant4eclipse libraries required to parse and checkout project from .psf files
   - the ws directory where the real projects will be checkout and compiled and in which we already have a pseudo project "target.platform" that describes the target platform to use to build our product

Here is the description of the tree:
 [-] release
  |  [-] build-automation
  |   |   [-] Ant4eclipse
  |   |   [-] ws
  |   |     |  [-] target.platform
  |   |     |      -f- pom.xml
  |   |     |      -f- mytargetfile.target  
  |   |    -f- build.xml
  |  -f- projects-cvs.psf
  |  -f- projects-svn.psf

2) I use Ant4eclipse in an Ant task (build.xml) to parse the psf and checkout (with antSvn or antCvs ) all the needed projects into the build-automation/ws folder

3) I use generate-poms target in order to create the parent pom and all the children pom.xml files for each checked out projects.

4) Then I want to configure Tycho to use the  .target file (inside ws/target.platform/mytargetfile.target) to build my projects.
In order to do that, I found out (looking at how m2eclipse project uses Tycho) that I needed to add the following lines to the parent pom (generated during step 3) :
  <plugin>
       <groupId>org.sonatype.tycho</groupId>
       <artifactId>target-platform-configuration</artifactId>
       <version>0.10.0</version>
       <configuration>
          <resolver>p2</resolver>
          <target>
            <artifact>
                <groupId>[...]</groupId>
                <artifactId>target-platform</artifactId>
                <version>0.0.1-SNAPSHOT</version>
                <classifier>mytargetfile</classifier>                 
            </artifact>
          </target>
          <ignoreTychoRepositories>true</ignoreTychoRepositories>
       </configuration>
  </plugin>
 
Whitout those lines, creation of the target platform automatically fail.

5) I also need to add to configure testing:
<plugin>
         <groupId>org.sonatype.tycho</groupId>
         <artifactId>maven-osgi-test-plugin</artifactId>
         <version>0.10.0</version>
 </plugin>
Whitout there is no sure-fire report folder in targets subfolder of the test-projects. So the test doesnt export any result.
 

6) After that i can start compiling my sources, running osgi test, and export the result to sonar for reporting.

My main problem is having to edit the parent pom during the step 4). Mattias Holmqvist and Igor Fedorenko seems to use generate-poms only initially, but i can't do that because we define the projects
in project team set files (psf) so i need to work with the psf in order to be up2date with the project.
 


Thanks for the quick answer.
Hope i will be in the good mailing list this time ;)
Regards
 

Regards
Tobias

P.S.: Please use the new mailing list [hidden email] to continue this discussion and for future questions.


> -----Original Message-----
> From: tychotychonofuba [mailto:[hidden email]]
> Sent: 18 April 2011 18:23
> To: [hidden email]
> Subject: [Tycho Users] problems with the generate-poms target
>
> The target generate-poms can produce parent pom.xml & poms for module and
> it
> works fine (now ) for me.
> But I want to add in the parent pom 2 plugin's references :
> target-platform-configuration &  maven-osgi-test-plugin.
>
> Goal of my project is setting up a transparent headless automated build
> with
> Hudson/Jenkins & Maven/tycho (so developpers will not have to know what is
> a
> pom file, or what is tycho.).
>
> It's almost done for now (the developpers doesn't know what is tycho), but
> i
> still need to modify the parent pom after its generation.
>
> Is there a way for generate-poms target to add both plugins reference
> (target-platform-configuration and maven-osgi-test-plugin) when i generate
> all poms ?
> If no, do you have a workaround in mind ?
>
> In my opinion, a strengh of tycho is we can keep the same workflow as
> before
> (eclipse, manifest first approach) and nobody have to know maven and pom
> files.
>
> So an interesting feature for Tycho could be to have maven-osgi-test-
> plugin
> reference added as soon as a testbundle project is found in the workspace,
> and the target-platform-configuration reference added as soon as a .target
> file is found, doest it makes sense ?

 


If you reply to this email, your message will be added to the discussion below:

http://software.2206966.n2.nabble.com/problems-with-the-generate-poms-target-tp6284262p6286602.html

To unsubscribe from problems with the generate-poms target, click here.

 


View this message in context: Re: problems with the generate-poms target
Sent from the Tycho Users mailing list archive at Nabble.com.


Back to the top