我正在尝试运行使用OCL的eclipse插件测试,更具体地说:
Diagnostic diagnostic = Diagnostician.INSTANCE.validate(modelRoot);
如果我将其作为rightclick运行,那么它的工作正常 - >以...运行 - > Eclipse插件测试
但如果我尝试通过maven(maven install)运行它,则会失败并显示以下错误消息:
java.lang.AssertionError: Unable to find delegate to evaluate the 'constraint' on ...
我尝试添加
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>org.eclipse.tycho.surefire.junit4</artifactId>
<version>0.14.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.ocl</groupId>
<artifactId>ecore</artifactId>
<version>3.3.0-v20130520-1222</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf</groupId>
<artifactId>ocl</artifactId>
<version>1.1.0-v200706201508</version>
</dependency>
<dependency>
<groupId>org.eclipse.emf.query</groupId>
<artifactId>ocl</artifactId>
<version>1.1.0-v200706071712</version>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>ocl</artifactId>
<version>3.4.0-v20140524-1358</version>
</dependency>
到tycho依赖(在pom中),但没有任何成功。我非常感谢有关如何解决此问题的任何想法