CodeFX-org/java-9-wtf

Eclipse PDE + Tycho MVN

angel539 opened this issue · 6 comments

Hi,

I am trying to configure my Eclipse plugin to work with update site and mvn following this approach:

http://www.eclipse.org/community/eclipse_newsletter/2013/august/article3.php

I have been looking for solutions for my own issue and I have found your github account talking about this.

The current state of the build section of my parent pom is:

org.apache.maven.plugins maven-compiler-plugin 3.7.0 jdt 8 8 -proc:none org.eclipse.tycho tycho-compiler-jdt 1.1.0 org.eclipse.tycho org.eclipse.jdt.core 3.11.2.v20160212-1500
  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-maven-plugin</artifactId>
    <version>1.2.0</version>
    <extensions>true</extensions>
    <configuration>
      <encoding>UTF-8</encoding>
      <source>1.8</source>
      <target>1.8</target>
    </configuration>
  </plugin>

  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-compiler-plugin</artifactId>
    <version>1.2.0</version>
  </plugin>

  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <version>1.2.0</version>
    <configuration>
      <resolver>p2</resolver>
      <pomDependencies>consider</pomDependencies>
      <ignoreTychoRepositories>true</ignoreTychoRepositories>
      <environments>
        <environment>
          <os>linux</os>
          <ws>gtk</ws>
          <arch>x86</arch>
        </environment>
        <environment>
          <os>linux</os>
          <ws>gtk</ws>
          <arch>x86_64</arch>
        </environment>
        <environment>
          <os>win32</os>
          <ws>win32</ws>
          <arch>x86</arch>
        </environment>
        <environment>
          <os>win32</os>
          <ws>win32</ws>
          <arch>x86_64</arch>
        </environment>
        <environment>
          <os>macosx</os>
          <ws>cocoa</ws>
          <arch>x86_64</arch>
        </environment>
      </environments>
    </configuration>
  </plugin>
</plugins>

I am working with Eclipse Mars 2 (the whole plugin has been develop in this enviroment) and Java 8. Do you have any clue of what is happening with tycho and why this is not compiling. It is a thing of the versions?

All the best,

Ángel

By the way... I am a really newcomer with maven, then, apollogies if something is wrong in the previous message.

Solved.

Hi @angel539, I only now have a little time to look into this, but I see you already solved it. 👍

Actually I have another question about this. After uploading my artifacts to Github, I discover how the libs I have dissappeared. And this is because mvn is conceived to manage all the dependencies though the pom files and not only the MANIFEST where the libraries are added to the clashpath.

Do you know if the dependencies with the other artifacts I have in my project, such as the dependency between the UI and the Core model, have to be added as well to the POM file?

I understand that for every dependency or every mvn resolution I have to add something like:

  <dependencies>
    <dependency>
      <groupId>GROUP</groupId>
      <artifactId>ARTIFACT</artifactId>
      <version>VERSION</version>
    </dependency>
  </dependencies>

With the dependencies that already are in a repository. But I don't know if I have to do the same thing with the dependencies between projects, that in Eclipse PDE are resolved though the MANIFEST.

All the best,

Ángel

Do you know if the dependencies with the other artifacts I have in my project, such as the dependency between the UI and the Core model, have to be added as well to the POM file?

Yes, Maven needs to know about the dependencies between different artifacts in the same project. At least that's how it usually goes, I have no particular knowledge about writing Eclipse plugins.

Generally speaking, you should ask these question on a Q&A platform like StackOverflow (after searching for existing questions and answers of course) because your problem and a possible solution will be much more visible there.

Ok, thanks anyway :)