This is my first time working on an Eclipse RCP + Maven project, and I want to run some unit tests in my packages using JUnit. It seems like the most recommended approach is to create a package snippet and use something like the Tycho plugin to resolve dependencies. However, when I run mvn clean verifyin my main folder, it should run tests and deploy my application, but instead I get the following error:
[ERROR] Cannot resolve project dependencies:
[ERROR] You requested to install 'myproject.app.feature.feature.group 1.0.0' but it could not be found
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test (default-test) on project myproject.app.viewmanager-test: Execution default-test of goal org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test failed: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from tycho-extra-1408913392535 0.0.0.1408913392535 to myproject.app.feature.feature.group 1.0.0.; Unable to satisfy dependency from tycho-1408913392552 0.0.0.1408913392552 to myproject.app.feature.feature.group 1.0.0.; No solution found because the problem is unsatisfiable.] -> [Help 1]
I understand that Maven does not find "myproject.app.feature.feature.group 1.0.0", but I do not know where this comes from, because it seems that the name is incorrect.
Perhaps it’s worth saying that when running unit test inside Eclipse (not with Maven) it works.
This is the Tycho configuration in my test snippet:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<useUIHarness>true</useUIHarness>
<dependencies>
<dependency>
<type>eclipse-feature</type>
<artifactId>myproject.app.feature</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</configuration>
</plugin>
As suggested here , I add this function as a dependency because my test fragment requires some other nodes besides my host, so I expected this to work.
Any tips? The closest problem I found is this one , but both solutions did not help me.
source
share