简体   繁体   中英

Tycho plugin cannot build product

I have an E4 project that contains a product and a plugin. When building the plugin based application using Tycho I get the following error.

Cannot resolve dependencies of product CR-IT_client.product:
eclipse-plugin artifact with ID "CR-IT_client" and version matching "0.0.0" was not found in the target platform

Last week I compiled it without any errors but after clearing the maven cache it doesn't work anymore. How can I fix this?

When using the cache again it will compile but it will use the old jar file instead of the last compiled one.

When compiling with 'mvn clean install' I get the following Maven output:

INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\air27654\Documents\Source\framework\CR-IT client\src\main\resources
[INFO] 
[INFO] --- target-platform-configuration:1.0.0:target-platform (default-target-platform) @ eclipse-repository ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:1.0.0:publish-products (default-publish-products) @ eclipse-repository ---
[ERROR] Cannot resolve dependencies of product CR-IT_client.product:
[ERROR]   eclipse-plugin artifact with ID "CR-IT_client" and version matching "0.0.0" was not found in the target platform
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] RCP Parent ......................................... SUCCESS [  5.794 s]
[INFO] CR IT Client Repository ............................ FAILURE [  5.034 s]
[INFO] CR IT Client Target Definition ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:26 min
[INFO] Finished at: 2017-03-10T07:48:10+01:00
[INFO] Final Memory: 161M/692M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-publisher-plugin:1.0.0:publish-products (default-publish-products) on project eclipse-repository: Execution default-publish-products of goal org.eclipse.tycho:tycho-p2-publisher-plugin:1.0.0:publish-products failed: Cannot resolve dependencies of product CR-IT_client.product. See log for details. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :eclipse-repository

Tycho requires you to have two projects, one for the eclipse-repository and one for the eclipse-plugin that defines your product. Both should be <modules> of your aggregator POM. Then Tycho will be able to find everything (even with a clean cache) on a single mvn clean install .

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