[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
[tycho-user] Transitive pom-first Maven dependencies do not resolve.
 | 
Dear List,
Thanks to Tobias and Igor  
(http://dev.eclipse.org/mhonarc/lists/tycho-user/msg01714.html) I  
managed to include a pom-first Maven dependency in my project.
I have used the itp02 tycho demo, and modelled my own project after it  
(cf. below), but unfortunately I still get an error message when  
trying to build the parent: the dependencies of the dependency I  
managed to resolve fail to resolve (I guess this is called "transitive  
dependencies"?). Perhaps one of you has a suggestion of how to make  
this work? I'd be very thankful!
For your reference, here's my workspace setup:
- rcp.bundle [Plugin Project]
-- POM
- rcp.feature [Feature Project, rcp.bundle included]
-- POM
- rcp.parent
-- POM
- rcp.repository
-- .target
-- POM
- rcp.target
-- Indigo RCP SDK
-- POM
- rcp.thirdparty [General Project]
-- pomfirst-thirdparty [General Folder]
--- POM
-- POM
I successfully build the rcp.thirdparty POM which creates a  
MANIFEST.MF and JAR target in pomfirst-thirdparty. But when I try to  
build the parent POM, I get the error below.
I guess I'd have to tell maven-bundle-plugin to <Embed-Dependency> and  
<_exportcontents> the transitive dependencies as well, but I don't  
know how to do this. Please help!
This is the (abbreviated) error message:
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve  
project dependencies: Missing:
[ERROR] ----------
[ERROR] 1)  
de.hu_berlin.german.korpling.saltnpepper:salt-graph:bundle:1.1.3-SNAPSHOT
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) rcp:rcp.bundle:pom:1.0.0-SNAPSHOT
[ERROR] 2) rcp:pomfirst-thirdparty:jar:1.0.0-SNAPSHOT
[ERROR] 3)  
de.hu_berlin.german.korpling.saltnpepper:salt-saltCommon:jar:1.1.3-SNAPSHOT
[ERROR] 4)  
de.hu_berlin.german.korpling.saltnpepper:salt-graph:bundle:1.1.3-SNAPSHOT
[ERROR]
[ERROR] 2)  
de.hu_berlin.german.korpling.saltnpepper:salt-saltCore:bundle:1.1.3-SNAPSHOT
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) rcp:rcp.bundle:pom:1.0.0-SNAPSHOT
[ERROR] 2) rcp:pomfirst-thirdparty:jar:1.0.0-SNAPSHOT
[ERROR] 3)  
de.hu_berlin.german.korpling.saltnpepper:salt-saltCommon:jar:1.1.3-SNAPSHOT
[ERROR] 4)  
de.hu_berlin.german.korpling.saltnpepper:salt-saltCore:bundle:1.1.3-SNAPSHOT
[ERROR]
[ERROR] ----------
[ERROR] 2 required artifacts are missing.
[ERROR]
[ERROR] for artifact:
[ERROR] rcp:rcp.bundle:pom:1.0.0-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo1.maven.org/maven2, releases=true,  
snapshots=false)
The POM for de.hu_berlin.german.korpling.saltnpepper:salt-saltCommon  
references the two missing dependencies with <type>bundle</type>:
 <dependencies>
    <dependency>
      <groupId>de.hu_berlin.german.korpling.saltnpepper</groupId>
      <artifactId>salt-graph</artifactId>
      <version>${project.version}</version>
      <type>bundle</type>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>de.hu_berlin.german.korpling.saltnpepper</groupId>
      <artifactId>salt-saltCore</artifactId>
      <version>${project.version}</version>
      <type>bundle</type>
      <scope>compile</scope>
    </dependency>
  </dependencies>
This is the <dependencies> and abbreviated <build> part from the  
pomfirst-thirdparty POM:
  <dependencies>
    <dependency>
      <groupId>de.hu_berlin.german.korpling.saltnpepper</groupId>
      <artifactId>salt-saltCommon</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
          <Embed-Transitive>true</Embed-Transitive>
            <Embed-Dependency>
              salt-saltCommon
            </Embed-Dependency>
            <_exportcontents>
               
de.hu_berlin.german.korpling.saltnpepper.salt.saltCommon.*;version="1.1.3-SNAPSHOT"
            </_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>
	...
  </build>
And this the <modules>, <dependencies> and <build> parts of the  
rcp.thirdparty POM:
  <modules>
    <module>pomfirst-thirdparty</module>
  </modules>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>de.hu_berlin.german.korpling.saltnpepper</groupId>
        <artifactId>salt-saltCommon</artifactId>
        <version>1.1.3-SNAPSHOT</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.1</version>
          <configuration>
            <archive>
              <manifestFile>${manifest-location}/MANIFEST.MF</manifestFile>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.1.0</version>
          <configuration>
            <manifestLocation>${manifest-location}</manifestLocation>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
And finally the parent POM includes <module>../rcp.thirdparty</module>  
as well as the other projects, and  
<pomDependencies>consider</pomDependencies>.
Thanks!
Stephan
----------------------------------------------------------------
This message was sent through https://webmail.uni-jena.de