【发布时间】:2019-01-04 10:28:43
【问题描述】:
在我的项目中,有多个 eclipse 产品文件(100 多个用于不同的客户),我想当时只构建一个特定的产品。
如果我从根文件夹构建整个项目,则该项目与所有产品都正确构建。
cd scodi
mvn clean verify
如果我尝试只构建一个产品,我会收到错误:
cd scodi/rcp/releng/ch.scodi.client.product
mvn clean verify
[错误] 内部错误:java.lang.RuntimeException:无法解析 目标平台规范工件 ch.scodi:ch.scodi.client.target:target:1.0.0-SNAPSHOT -> [帮助 1] org.apache.maven.InternalErrorException:内部错误: java.lang.RuntimeException:无法解析目标平台 规范工件 ch.scodi:ch.scodi.client.target:target:1.0.0-SNAPSHOT
我正在使用带有 tycho-pomless 扩展的 tycho 1.3.0。
根 POM 目标声明:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<target>
<artifact>
<groupId>ch.scodi</groupId>
<artifactId>ch.scodi.client.target</artifactId>
<version>1.0.0-SNAPSHOT</version>
</artifact>
</target>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
产品pom:
<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>
<artifactId>ch.scodi.client.product</artifactId>
<packaging>eclipse-repository</packaging>
<parent>
<groupId>ch.scodi</groupId>
<artifactId>ch.scodi.rcp.releng</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<includeAllDependencies>true</includeAllDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
<execution>
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
难道不能只生产某些产品吗?
【问题讨论】:
标签: java eclipse maven tycho eclipse-pde