tesla / m2eclipse-tycho

25 stars 26 forks source link

Support for extraClasspathElements #15

Open tcalmant opened 10 years ago

tcalmant commented 10 years ago

Hi,

It seems that the Tycho connector doesn't support compile-time extra classpath elements. I'm working with iPOJO annotations in my projects, which are defined in a simple JAR file, not in a bundle, as they are stored in the .class files and are not visible at runtime. I declared these annotations in a parent pom file, using the extraClasspathElements configuration property of the tycho-compiler-plugin. This property allows to use a Maven dependency in the compilation class path, and avoids to use the "jar.extra.classpath" property in the build.properties files and to have to store the JAR file somewhere during the compilation.

I have no public sample of this problem yet, I'll prepare a dummy sample workspace later this week, if necessary.

Here is a the plugin configuration :

<plugin>
   <groupId>org.eclipse.tycho</groupId>
   <artifactId>tycho-compiler-plugin</artifactId>
   <version>${tycho-version}</version>
   <configuration>
      <source>1.6</source>
      <target>1.6</target>
      <extraClasspathElements>
         <extraClasspathElement>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.ipojo.annotations</artifactId>
            <version>1.11.0</version>
         </extraClasspathElement>
      </extraClasspathElements>
   </configuration>
</plugin>

Cheers, Thomas

ifedorenko commented 10 years ago

I was under impression that I marked config parameter as unsupported and discouraged in Tycho... not sure what happened there. In any case, I don't need this feature myself and have no immediate plans to implement it. If somebody provides a quality patch I will review and give feedback.

Let me know if you plan to work in the patch because in that case I will need to figure out if we require signed CLA or any other formalities before we accept contributions here.

tcalmant commented 10 years ago

I didn't found any other clean way to do so without extraClasspathElements and without indicated a stored JAR file in build.properties files :(

I can't work on a patch for now, maybe I could do it in the next months...

sarod commented 8 years ago

:+1: extraClasspathElements seems to be the only clean way to include annotation processors library like autovalue.