简体   繁体   中英

Source feature generated by Tycho is not being included in p2 repository

I'm trying to create and include a source feature of my plugins in the generated p2 repository. Currently, the source jars for each plugin get created, as does the source feature to each normal feature. However, those source features then don't get included in the final product, an eclipse update site.

In my parent POM, I have

        <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-source-plugin</artifactId>
            <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.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>
        </plugin>

Do I need to add something to the POM of the feature? Of the eclipse-repository? I'm out of ideas.

Gonna answer this myself. I found a solution thanks to this article .

I had to add the generated source feature to the category.xml that describes my update site.

I had tried that before but it didn't work because I made the mistake of writing *.source.feature instead of *.feature.source.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM