Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Will pomDependencies=consider work inside the eclipse IDE?

Your observations are correct, PDE target platform support limited to p2
repositories and local eclipse installations and it is not possible to
add dependencies resolved from maven local/remote repositories to the
target platform.

There are, however, two workarounds

Import maven-bundle-plugin projects in m2e workspace and m2e/tycho
integration will make such projects "visible" to PDE, including source
lookup during debug, navigation to indirect dependencies, etc.

Alternatively, copy pom-dependencies to one of locations specified in
.target file, for example, eclipse installation dropins/ folder. You
won't be able to debug through the code of such dependencies or see
attached sources easily, but compilation and runtime should work.

--
Regards,
Igor

On 2014-06-12, 3:30, Steinar Bang wrote:
If I have a tycho project with a parent POM
   https://github.com/steinarb/modeler/blob/master/pom.xml

and a target maven module/eclipse project, that has an eclipse .target
file defining the target platform
   https://github.com/steinarb/modeler/tree/master/modeler.target

and then in eclipse opens the .target file
   https://github.com/steinarb/modeler/blob/master/modeler.target/modeler.target.target

in the target file editor, and click on "Set as Target Platform", then
this will work both inside the eclipse IDE and when building with "mvn"
from the command line.


However, if I:
  1. Add a dependency to the parent POM
       https://github.com/steinarb/modeler/blob/using-neoj-osgi-bundle/pom.xml
     like this:
       <dependencies>
         <dependency>
           <groupId>com.smb-tec.neo4j</groupId>
           <artifactId>neo4j-osgi-bundle</artifactId>
           <version>2.2-SNAPSHOT</version>
         </dependency>
       </dependencies>

  2. Have the setting pomDependencies=consider in the same parent POM:
       <build>
         <plugins>
           <plugin>
             <groupId>org.eclipse.tycho</groupId>
             <artifactId>target-platform-configuration</artifactId>
             <version>${tycho.version}</version>
             <configuration>
               <resolver>p2</resolver>
               <pomDependencies>consider</pomDependencies>
               <ignoreTychoRepositories>true</ignoreTychoRepositories>
               <target>
                 <artifact>
                   <groupId>no.priv.bang</groupId>
                   <artifactId>modeler.target</artifactId>
                   <version>${project.version}</version>
                 </artifact>
               </target>
             </configuration>
           </plugin>
         </plugins>
       </build>

then I can see how this would work when doing "mvn install", but I see
no mechanism that can add the dependency to the target platform inside
the eclipse IDE.


Is this a correct observation?  If so, how can I add the bundle to the
target platform used by the eclipse IDE?

Thanks!


- Steinar

(on a side note I have to find out what the
<ignoreTychoRepositories>true</ignoreTychoRepositories> setting
means... it was put there by the archetype...)

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top