1

在我的父 pom 中,我得到了这个配置来部署源 jar:

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-source-plugin</artifactId>
      <executions>
        <execution>
          <goals>
            <goal>jar</goal>
            <goal>test-jar</goal>
          </goals>
        </execution>
      </executions>
    </plugin>

但是 tycho 构建模块忽略了这一点,因此它们的源代码没有安装/部署在 maven 存储库中。这意味着我不能将它们包含在程序集中(特别是如果程序集模块位于另一个 git 存储库中)。

是否可以配置其中一个 tycho 插件来构建和部署源 jar?

4

1 回答 1

4

用这个:

  <plugin>
    <groupId>org.sonatype.tycho</groupId>
    <artifactId>maven-osgi-source-plugin</artifactId>
    <version>${tycho-version}</version>
    <executions>
      <execution>
        <id>plugin-source</id>
        <goals>
          <goal>plugin-source</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

https://github.com/jsievers/tycho-demo/blob/master/tychodemo.parent/pom.xml

于 2011-04-18T14:47:06.297 回答