[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Confirm that Tycho can't manage BOTH p2 and Maven artifacts?

On 01/18/2016 11:01 PM, Max Rydahl Andersen wrote:
The answer is that it depends.

Tycho either can be driven by a plugin manifest or Pom.xml to resolve its p2 dependencies and here I believe it is true - it has to be either/or.

but what you can do in your specific case of having nested jars inside your plugin is to use mvn copy-dependencies which allow you to remove lib content from your source Repo and have it dynamically downloaded and put into the lib folder during build.

http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts has more
on it.

Jbosstools projects uses this for a few things where creating a full set of Osgi dependencies was not feasible.

Hope that helps.

I may be getting closer, but there are a few details I'm unsure of. I'm currently working on a "maventhirdparty" module, to contain the jars currently hard-included in the "core" module. I'm modeling this on the "pomfirst-thirdparty" module from that example.


For background, here's an excerpt from the "pom.xml" from that code sample:
---------------------
  <dependencies>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Embed-Dependency>
              plexus-utils
            </Embed-Dependency>
            <_exportcontents>
              org.codehaus.plexus.util.*;version="2.0.7"
            </_exportcontents>
<Bundle-ClassPath>{maven-dependencies}</Bundle-ClassPath>
            <Embed-Transitive>true</Embed-Transitive>
            <Embed-Directory>jars</Embed-Directory>
            <_failok>true</_failok>
            <_nouses>true</_nouses>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
--------------------------

I've read through most of the bundle plugin doc to understand the "instructions" section. I assume that "Embed-Dependency" refers to artifactIds. I didn't see a clear statement to that effect in the docs. I'm confused about how this is specifying the required version of "plexus-utils". Instead of specifying it in the GAV, it's specified in the "_exportContents" value. In my case, I was assuming that I would package several jars in this module. If I do that, I would assume I would specify multiple comma-separated values in "Embed-Dependency" and "_exportContents", but if I did that, what is the significance of the "version" property? Can I just leave out the version property if I specify the versions in the GAVs?

Are there any other instructions I need to modify, add, or delete from this if I'm trying to contain multiple jars in this module?

/max http://about.me/maxandersen


On 18 Jan 2016, at 14:27, David M. Karr <davidmichaelkarr@xxxxxxxxx> wrote:

I inherited a large Eclipse plugin codebase, but I'm pretty new to Eclipse plugin development.

I happened to notice that one of the subprojects had a few jars just dumped into a "lib" folder, and those jars are referenced from the .classpath, build.properties, and META-INF/MANIFEST.MF file.  This subproject also has several bundles that it depends on.

I wondered why these artifacts weren't just specified as Maven artifacts.  I asked about this odd convention on the IRC #eclipse channel, and someone said that Tycho can't handle BOTH p2 and Maven artifacts.  I took him at his word, but I need to get more information about this.  I'm working with someone else who believes this shouldn't be a problem, so I need to find some proof for this statement.
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev