Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Repository assembly and source features

Hi everyone,

First off, thanks for the new release. We've been releasing our products using tycho for a few years' now and all is great.

Recently, we've separated our big git repo into smaller repos with different dependencies between them. To avoid developers from having to load all the code, we want to add source features/bundles to our p2 repository that represents a set of common bundles. I followed the steps described in different tutorials. I added, to the master pom, plugin-management entry [1] and build [2] entries.

After doing that, I can build, using mvn clean package, I get source bundles and features.

$ ls */target/*source*jar
[...]
com.castortech.iris.common.feature/target/com.castortech.iris.common.feature-1.0.1-sources-feature.jar
com.castortech.iris.common/target/com.castortech.iris.common-1.0.0-SNAPSHOT-sources.jar
[...]

That's great. My repository project contains the features and the bundles for the binaries I expect.

For example:
$ ls com.castortech.iris.common.repository/target/repository/features/
com.castortech.iris.common.feature_1.0.1.jar

There are no source features/bundles in the p2 repo. I expected that since in my category,xml, I have an entry for the feature, but none for the source.
   <feature id="com.castortech.iris.common.feature" version="1.0.1">^
      <category name="com.castortech.iris.common"/>
   </feature> [...]

So, I added the source feature to category.xml:
   <feature id="com.castortech.iris.common.feature.source" version="1.0.1">^
      <category name="com.castortech.iris.common"/>
   </feature

Now I get a failure:
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: com.castortech.iris.common.repository raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT
[ERROR]   Missing requirement: com.castortech.iris.common.repository raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT requires 'com.castortech.iris.common.feature.source.feature.group [1.0.1,1.0.2)' but it could not be found
[... reactor
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-repository-plugin:1.1.0-SNAPSHOT:assemble-repository (default-assemble-repository) on project com.castortech.iris.common.repository: Execution default-assemble-repository of goal org.eclipse.tycho:tycho-p2-repository-plugin:1.1.0-SNAPSHOT:assemble-repository failed: Cannot resolve dependencies of MavenProject: com.castortech.iris.common:com.castortech.iris.common.repository:1.0.0-SNAPSHOT @ /home/svaucher/git/iriscommon/com.castortech.iris.common.repository/pom.xml: See log for details -> [Help 1]

From the documentation, I thought that the source feature could be referenced.

Is there anything obvious that I'm doing wrong or is this an unsupported use case?

Please let me know if I should provide additional information,

Regards,
Stephane Vaucher
[0] Maven properties (just released tycho):
                 <tycho.version>1.1.0</tycho.version>
                <tycho-extras.version>1.1.0</tycho-extras.version>

[1] Master pom plugin management
                                <plugin>
                                  <groupId>org.eclipse.tycho</groupId>
                                  <artifactId>tycho-source-plugin</artifactId>
                                  <version>${tycho.version}</version>
                                  <configuration>
                                    <strictSrcIncludes>false</strictSrcIncludes>
                                  </configuration>
                                </plugin>
[2] Master pom plugins
                <plugins>
                  <!-- source -->
                  <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-source-plugin</artifactId>
                    <version>${tycho.version}</version>
                    <executions>
                      <execution>
                        <id>plugin-source</id>
                        <goals>
                          <goal>plugin-source</goal>
                        </goals>
                      </execution>
                    </executions>
                  </plugin>

                  <plugin>
                    <groupId>org.eclipse.tycho.extras</groupId>
                    <artifactId>tycho-source-feature-plugin</artifactId>
                    <version>${tycho-extras.version}</version>
                    <executions>
                      <execution>
                        <id>source-feature</id>
                        <phase>package</phase>
                        <goals>
                          <goal>source-feature</goal>
                        </goals>
                      </execution>
                    </executions>
                  </plugin>

                                        <plugin>
                                                <groupId>org.eclipse.tycho</groupId>
                                                <artifactId>tycho-p2-plugin</artifactId>
                                                <version>${tycho.version}</version>
                                                <executions>
                                                        <execution>
                                                                <id>attach-p2-metadata</id>
                                                                <phase>package</phase>
                                                                <goals>
                                                                        <goal>p2-metadata</goal>
                                                                </goals>
                                                        </execution>
                                                </executions>
                                                <configuration>
                                                        <defaultP2Metadata>false</defaultP2Metadata>
                                                </configuration>
                                        </plugin>


Back to the top