Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Binary Projects (aka. Eclipse Orbit Projects)

On 03/11/2013 04:48 PM, Gunnar Wagenknecht wrote:
I'm looking for a way to "mavenize" binary OSGi bundle projects as we use them in Eclipse Orbit. Those projects do not contain source code to build but only class files.
The general approach would be to replace the compilation by just copying the class files into target/classes. However I don't see any way to skip compilation here http://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html . Not sure how to tycho-compiler-plugin behaves if there is no source folder specified in build.properties, that's worth a try.
Once you're successful with getting compiler not running, or running but doing nothing. you should add something like this to your pom.xml.
<build>
   <plugins>
      <plugin>
         <groupId>...</groupId>
         <artifactId>....</artifactId>
         <version>....</version>
         <executions>
             <execution>
                  <id>populate-classes<id>
                  <phase>process-classes</phase>
                  <goals>
                      <goal>...</goal>
                  </goals>
                  <configuration>
                      ....
                  </configuration>
            </execution>
        </execution>
     </plugin>
  </plugins>
</build>

The invoked plugin execution (most likely antrunner or maven-depedency-plugin:unpack [1] ) will populate the ${project.output.directory}/classes with the class file you want to put in your jar.

HTH.

[1] http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html

--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top