Hi Tobias,
Thanks for your quick comment! I have seen your sent link, unfortunately this is not my case. Actually, I am maintaining a legacy eclipse-based framework which were built by Ant before. I would like to migrate the build by the use of maven tycho. This framework controls the versions of business artifacts through the name of plugins (not by a version range). More precisely, the same business artifact is realized into two different plugins, here are "s1" and "s2". The caller "g" is actually a test plugin, so I want to switch the test from "s1" to "s2" via a profile definition. To run this test plugin "g", I have experimented on
 tycho-surefire-plugin with the dependency declaration as "s2" and it seems that surefire takes the declaration, however, I can not compile "g" through tycho-compile-plugin. When I try additionally in using jars.extraclasspath=platform:/plugin/s1 in the build.properties file, I can compile "g", but the runtime-instance Eclipse for the test loads both "s1" and "s2" so it confuses because two plugins "s1" and "s2" define the same interfaces.
My question is how to make my dependency declarations taken in tycho-compile-plugin  (may be by another syntax, not by the <dependency> tag) to compile the test plugin "g", pls? Anyone has ideas on this problem?
Regards,
--- Thang  
    
  
  De : "Oberlies, Tobias" <tobias.oberlies@xxxxxxx>
 À : PHAM Quyet-Thang <phamthang37@xxxxxxxxx>; Tycho user list <tycho-user@xxxxxxxxxxx> 
 Envoyé le : mercredi 20 février 2013 18h21
 Objet : RE: [tycho-user] Tycho-compile-plugin does not take dependency declarations
  
 
 
 
The usual approach to get this kind of behaviour is to declare a version range dependency in the manifest, and then control which concrete version
 is picked at compile time (and test runtime) through target-platform-configuration in profiles.
 
  
 
However there is one caveat about this: This doesn’t work for artifacts built in the same reactor. Tycho enforces the use of the artifacts that
 are just being built (at least for require-bundle dependencies). Someone wanted to use older versions (https://bugs.eclipse.org/bugs/show_bug.cgi?id=347177), but I’m not sure this is exactly
 your use case.  
  
 
Regards
 
Tobias
 
  
 
  
 
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx]
On Behalf Of PHAM Quyet-Thang
Sent: Mittwoch, 20. Februar 2013 17:57
To: tycho-user@xxxxxxxxxxx
Subject: [tycho-user] Tycho-compile-plugin does not take dependency declarations
 
 
 
  
 
I am currently trying to build some eclipse-plugins with tycho. My problem is with internal project dependency. That means I have two projects. I call the first project "caller g"  and
 the second one "callee s1". There is a class in project "g" uses a class in project "s1". So this dependency can be declared explicitly in the manifest file or in the build.properties file (via  jars.extra.classpath=platform:/plugin/s1 )
 of project "g". I have tested both two cases and it works. Now for the reason of flexibility, I really want to move this declaration onto the pom file of project "g". By this way, I can define a profile to switch different versions of
"s" at compile time (for example, from "s1" to "s2"). I have tried with the following snippet in the pom file of "g": 
 
 
          
<groupId>test.tycho.dependency</groupId>
 
 
          
<artifactId>g</artifactId>
 
 
          
<packaging>eclipse-plugin</packaging>
 
 
                                  
<groupId>org.eclipse.tycho</groupId>
 
 
                                  
<artifactId>tycho-compiler-plugin</artifactId>
 
 
                                  
<version>0.16.0</version>
 
 
                                                           
 
          
<groupId>test.tycho.dependency</groupId>
 
 
                                                                       
<artifactId>s1</artifactId>
 
 
But this does not help. It seems that the tycho compiler has ignored this declaration in the pom file. Can somebody help me how to add this dependency in the pom file, pls? I have also
 experimented with the stuff called extraClasspathElements but it results into the same effect. 
 
 
-----------------------------------------------------------------------------------------------