Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] tycho-source-feature-plugin: How to avoid creating duplicate p2 metadata?

Hi all,

> I am using the tycho-source-feature-plugin to automatically create
> source features. Alas, I can't find a way to get rid of the following
> warning:
>> [INFO] --- tycho-source-feature-plugin:0.16.0:source-feature (source-feature) @ org.example.feature ---
>> [INFO] 
>> [INFO] --- tycho-p2-plugin:0.16.0:p2-metadata (default) @ org.example.feature ---
>> [WARNING] Artifact org.example:org.example.feature:xml:p2metadata:1.0.0-SNAPSHOT already attached to project, ignoring duplicate
>> [WARNING] Artifact org.example:org.example.feature:xml:p2artifacts:1.0.0-SNAPSHOT already attached to project, ignoring duplicate
> Is there a way to avoid the warning? The description of the
> p2-metadata-default suggests that there is:
>> P2 metadata generation goal bound to default artifact build
>> lifecycle. For explicit binding use p2-metadata goal. The idea is to avoid
>> double p2 metadata generation for projects that generate additional
>> artifacts or post process standard artifacts using custom goals bound to
>> package phase.

Found the solution myself :-). For the record, here's what gets rid of
the warning:

> <plugin>
>   <groupId>org.eclipse.tycho</groupId>
>   <artifactId>tycho-p2-plugin</artifactId>
>   <executions>
>     <execution>
>       <!-- Don't attach (default) metadata before the source-feature execution.-->
>       <id>default-p2-metadata-default</id>
>       <configuration>
>         <attachP2Metadata>false</attachP2Metadata>
>       </configuration>
>     </execution>
>     <execution>
>       <!-- Do attach metadata after the source-feature execution.-->
>       <id>attach-p2-metadata</id>
>       <goals>
>         <goal>p2-metadata</goal>
>       </goals>
>       <phase>package</phase>
>     </execution>
>   </executions>
> </plugin>

Hope this is useful to others as well.

Best wishes,

-- – the ctrl+space company

Back to the top