Tycho: How do I deploy sources jars of packaging eclipse-plugin?

烈酒焚心 提交于 2019-12-14 02:55:30

问题


In my parent pom I got this configuration to deploy sources jars:

    <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>

But the tycho build modules ignore that, so their sources aren't installed/deployed in the maven repository. Which means I can't include them in an assembly (especially if the assembly module is located in another git repository).

Is it possible to configure one of the tycho plugins to build and deploy sources jars?


回答1:


Use this:

  <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>

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



来源:https://stackoverflow.com/questions/5702701/tycho-how-do-i-deploy-sources-jars-of-packaging-eclipse-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!