Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Dependencies of type 'pom' not recognized when creating feature

Hello

When I try to build features out of my eclipse-plugins (which also are maven artifacts) I can't have any dependency references to pom artifacts, i.e. artifacts that only aggregates dependencies to other maven artifacts.

I have a small example to show my problem:

POM-reference artifact:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>my.example</groupId>
  <artifactId>pom-reference</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>pom-reference</name>
  <dependencies>
    <dependency>
      <groupId>com.google.collections</groupId>
      <artifactId>google-collections</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>
</project>

Eclipse-plugin:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>my.example</groupId>
  <artifactId>plug1n</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>plug1n</name>
  <dependencies>
    <dependency>
      <groupId>my.example</groupId>
      <artifactId>pom-reference</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <type>pom</type>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
...
    </pluginManagement>
    <plugins>
...
    </plugins>
  </build>
</project>

Eclipse-feature:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>my.example</groupId>
  <artifactId>fe4ture</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>eclipse-feature</packaging>
  <dependencies>
    <dependency>
      <groupId>my.example</groupId>
      <artifactId>plug1n</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
  </dependencies>
  <repositories>
...
  </repositories>
  <pluginRepositories>
...
  </pluginRepositories>
  <build>
    <pluginManagement>
...
    </pluginManagement>
    <plugins>
...
    </plugins>
  </build>
</project>

When building the eclipse feature with maven I get the following error:

[INFO] Scanning for projects...
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[INFO] Resolving target platform for project MavenProject: my.example:fe4ture:0.0.1-SNAPSHOT @ C:\Dev\eclipse\ws-modeling-indigo\my.example.feature\pom.xml
[ERROR] Internal error: java.lang.IllegalArgumentException: Unknown type of packaging pom -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Unknown type of packaging pom
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.IllegalArgumentException: Unknown type of packaging pom
        at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.getPublisherActions(P2GeneratorImpl.java:178)
        at org.eclipse.tycho.p2.impl.publisher.AbstractMetadataGenerator.generateMetadata(AbstractMetadataGenerator.java:58)
        at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.generateMetadata(P2GeneratorImpl.java:106)
        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.addMavenArtifact(P2ResolverImpl.java:181)
        at org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:252)
        at org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:150)
        at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:90)
        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        ... 11 more

But if I replace the dependecy to the pom artifact with a dependency to a jar artifact the build is successful.

My question is if I have missed something in my configuration of these three projects or if it is as-designed (and me missing out on some information)?

With best regards,

Martin

This e-mail is confidential and it is intended only for the addressees. Any review, dissemination, distribution, or copying of this message by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error, kindly notify us immediately by telephone or e-mail and delete the message from your system. The sender does not accept liability for any errors or omissions in the contents of this message which may arise as a result of the e-mail transmission.


Back to the top