Missing dependency for UmlPTestErrorHandler - ivy

I have a MontiCore Project with the following defined dependencies in my ivy.xml:
<dependencies>
<dependency name="de.monticore.re" rev="[2.0.5,2.0.5]" changing="false" />
<dependency name="de.monticore.ets" rev="[2.0.5,2.0.5]" changing="false" />
<dependency name="de.monticore.gli" rev="[2.0.5,2.0.5]" changing="false" />
<dependency name="de.umlp.umlpcore.fe" rev="[1.5.5,1.5.5]" changing="false" />
<dependency name="de.umlp.cd.fe" rev="[1.5.5,1.5.5]" changing="false" />
<dependency name="de.umlp.cdjava.fe" rev="[1.5.5,1.5.5]" changing="false" />
<dependency name="de.monticore.freemarker" rev="[2.0.5,2.0.5]" changing="false" />
<dependency name="de.monticore.java" rev="[2.0.5,2.0.5]" changing="false" />
</dependencies>
I also use the UMLP class diagram language.
Eclipse is complaining that there is no mc.umlp.helpers.UmlPTestErrorHandler.
UmlPTestErrorHandler cannot be resolved AbstractCoCoTest.java /MontiWIS/test/integration/de/montiwis/tool line 31 Java Problem
What am I missing?

UmlPTestErrorHandler no longer exists since version 1.5.4. It was replaced by mc.test.helpers.TestErrorHandler (de.monticore.gli). Use this class.

Related

IntelliJ Idea 2018.2 - File Status Highlights: red/brown

I have the current status of my files in the folders coloured red/brown.
I tried to follow previous discussion on stackoverflow to solve the problem but without result.
How can get rid of the red colour of the file?
What is the correct settings?
with pom.xml
> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>delta.project</groupId>
<artifactId>books</artifactId>
<version>1.0-SNAPSHOT</version>
<modelVersion>4.0.0</modelVersion>
<properties>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>app.Run</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>10</source>
<target>10</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
and iml file:
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_10">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-all:1.9.5" level="project" />
</component>
</module>
Screenshot of my configuration of the project:
modules:
dependencies:
This is a version control feature that marks files that hasn't been staged yet this color.
To remove this behaviour go to
Settings -> Version Control -> File Status Colors
where you can set colors for all statuses or disable them by removing the checkmark from the "File status color" field.
This is because the files are not added into your version control, e.g. Git. Try to select the files, right click, and add them to version control. After that, they should turn into green.

Ordering Ivy dependencies

I'm struggling to get my head around the exact behaviour of exclusions in Ivy.
In the following Ivy file, why does putting commons-logging before log4j pull in javax.activation and javax.mail from log4j whereas putting it after doesn't.
<ivy-module version="2.0">
<info organisation="test" module="test" />
<configurations defaultconfmapping="default->runtime(*)" />
<dependencies>
<dependency org="log4j" name="log4j" rev="1.2.15">
<exclude org="javax.activation" />
<exclude org="javax.mail" />
</dependency>
<dependency org="commons-logging" name="commons-logging" rev="1.1" />
<exclude org="com.sun.jdmk" />
<exclude org="com.sun.jmx" />
<exclude org="javax.jms" />
</dependencies>
</ivy-module>
The activation and mail jars are dependencies of commons logging, yet you've excluded them on the log4j dependency...
When you only use a single configuration this sends a mixed message to ivy, should they be excluded or not? The following would be a lot more explicit:
<dependencies>
<dependency org="log4j" name="log4j" rev="1.2.15"/>
<dependency org="commons-logging" name="commons-logging" rev="1.1" />
<exclude org="javax.activation" />
<exclude org="javax.mail" />
<exclude org="com.sun.jdmk" />
<exclude org="com.sun.jmx" />
<exclude org="javax.jms" />
</dependencies>
It's less confusing when the excludes are set globally.
If you want to keep the dependency resolution separate then you'll need to set up more than one configuration (think of these as dependency sets):
<ivy-module version="2.0">
<info organisation="test" module="test" />
<configurations>
<conf name="log4j_deps" description="log4j dependencies"/>
<conf name="commons_deps" description="commons-logging dependencies"/>
</configurations>
<dependencies>
<dependency org="log4j" name="log4j" rev="1.2.15" conf="log4j_deps->runtime">
<exclude org="javax.activation" />
<exclude org="javax.mail" />
</dependency>
<dependency org="commons-logging" name="commons-logging" rev="1.1" conf="commons_deps->runtime"/>
<exclude org="com.sun.jdmk" />
<exclude org="com.sun.jmx" />
<exclude org="javax.jms" />
</dependencies>
</ivy-module>
Switching around the dependency tags will have no effect now, because the dependency resolution is explicit.
Log4j and its dependencies are associated with the log4j_deps configuration
commons dependencies are placed onto the commons_deps configuration.

Apache IVY : Chain tag

I am new to the apache IVY. I was not able to download the springframework.web.servlet from the default repository(MAVEN) as this jar file is not present in maven repository so for adding a new repository which have this file i have used the Chain tag. But the problem is its downloading all the jar files from maven repo and the springframework.web.servlet from other repository but after that its again try to download all the other jar files from the second repository.
ivysettings.xml
<ivysettings>
<settings defaultCache="${ivy.settings.dir}/ivy-cache" defaultResolver="libraries"/>
<resolvers>
<filesystem name="projects">
<artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" />
<ivy pattern="${repository.dir}/[module]-[revision].xml" />
</filesystem>
<chain name="chained">
<ibiblio name="libraries" m2compatible="true" usepoms="false" />
<ibiblio name="lib" m2compatible="true" root="https://oss.sonatype.org/content/repositories/springsource-releases"/>
</chain>
</resolvers>
<modules>
<module organisation="com.virtusa" name="dependee" resolver="projects"/>
<module organisation="org.springframework" name="org.springframework.web.servlet" resolver="lib"/>
</modules>
</ivysettings>
ivy.xml
<ivy-module version="1.0">
<info organisation="com.virtusa" module="depender"/>
<dependencies>
<dependency org="org.springframework" name="spring-core" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-aop" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-hibernate3" rev="2.0.8" />
<dependency org="org.springframework" name="spring-context" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-beans" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-web" rev="3.0.4.RELEASE" />
<dependency org="org.springframework" name="spring-webmvc" rev="3.0.4.RELEASE" />
<!-- Added -Bauddhik-->
<dependency org="org.springframework.security" name="spring-security-web" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-taglibs" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-core" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-config" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework.security" name="spring-security-acl" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-instrument-tomcat" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-jdbc" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-context-support" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-orm" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-jms" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-aspects" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-asm" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-expression" rev="3.0.4.RELEASE"/>
<dependency org="javax.transaction" name="jta" rev="1.1"/>
<dependency org="cglib" name="cglib" rev="2.1_3"/>
<dependency org="dom4j" name="dom4j" rev="1.6.1"/>
<dependency org="antlr" name="antlr" rev="2.7.6rc1"/>
<dependency org="org.springframework" name="spring-tx" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-test" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-instrument" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-webmvc-portlet" rev="3.0.4.RELEASE"/>
<dependency org="org.springframework" name="spring-oxm" rev="3.0.4.RELEASE"/>
<dependency org="asm" name="asm" rev="3.3.1"/>
<dependency org="asm" name="asm-attrs" rev="2.2.3"/>
<dependency org="org.springframework" name="org.springframework.web.servlet" rev="3.0.4.RELEASE" />
<!-- end -->
<dependency org="mysql" name="mysql-connector-java" rev="5.1.6" />
<dependency org="org.hibernate" name="hibernate-core" rev="3.3.1.GA" />
<dependency org="org.hibernate" name="hibernate-annotations" rev="3.4.0.GA" />
<dependency org="org.hibernate" name="hibernate-commons-annotations" rev="3.3.0.ga" />
<dependency org="javax.servlet" name="servlet-api" rev="2.5"/>
<dependency org="taglibs" name="standard" rev="1.0.6"/>
<dependency org="javax.servlet" name="jstl" rev="1.2"/>
<dependency org="commons-lang" name="commons-lang" rev="2.0"/>
<dependency org="commons-collections" name="commons-collections" rev="3.1"/>
<dependency org="org.hibernate" name="ejb3-persistence" rev="3.3.2.Beta1"/>
<dependency org="org.hibernate" name="hibernate-ehcache" rev="4.0.1.Final"/>
</dependencies>
</ivy-module>
I think your issue is that your default resolver is still set to be libraries instead of chained.....
Am I correct in assuming you want to use Maven Central for all dependencies, except those exceptions listed in your modules section? If that is so, then you don't need a chained resolver. The following settings file is much simpler:
<ivysettings>
<settings defaultCache="${ivy.settings.dir}/ivy-cache" defaultResolver="central"/>
<resolvers>
<ibiblio name="central" m2compatible="true"/>
<filesystem name="local-projects">
<artifact pattern="${repository.dir}/[artifact]-[revision].[ext]" />
<ivy pattern="${repository.dir}/[module]-[revision].xml" />
</filesystem>
<ibiblio name="spring-releases" m2compatible="true" root="https://oss.sonatype.org/content/repositories/springsource-releases"/>
</resolvers>
<modules>
<module organisation="com.virtusa" name="dependee" resolver="local-projects"/>
<module organisation="org.springframework" name="org.springframework.web.servlet" resolver="spring-releases"/>
</modules>
</ivysettings>
Note:
I've dropped the "usePoms=false" attribute to the Maven central resolver. You're losing one to the main benefits of using a Maven repo. Pulling down dependencies automatically instead of having to reverse engineer other people's builds :-)

How do I declare a dependency on jboss in SBT?

I have a project that depends on JBoss(specifically 5.1.0.GA) and I was playing around with trying to set this project up using SBT. What I was wondering is if there is a way to say "this project depends on JBoss version X and everything that goes with it" or do I have do declare every single dependency individually? My hope is that SBT will then download all the appropriate dependencies needed to compile the project.
I am pretty new to dependency management so any direction is appreciated. I am trying to do this using SBT (which uses Ivy) but an example in maven is also welcome.
You have to declare every dependency manually, there is no super-pom, that includes all dependencies.
This is mostly very tricky, because it is hard to find out, what you need exactly in some cases.
A good start is to take every lib, that is also under jboss_home/lib and start reducing from there.
If you have your own repository proxy (like artifactory or archiva), you could create such a super pom.
This is from my own repository and might help getting you started. But this is in no way official and fitted to my needs.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="http://www.jayasoft.fr/org/ivyrep/ivy-doc.xsl"?>
<ivy-module version="1.0">
<info
organisation="jboss"
module="jboss"
revision="5.1.0"
status="release"
publication="20110801120000"/>
<configurations>
<conf name="compile" visibility="public" />
<conf name="client" visibility="public" extends="compile,mail,activation, aop"/>
<conf name="server" visibility="public" extends="compile,servlet,jmx"/>
<conf name="hibernate" visibility="public" />
<conf name="activation" visibility="public" />
<conf name="mail" visibility="public" />
<conf name="servlet" visibility="public" />
<conf name="jmx" visibility="public" />
<conf name="jmx-client" visibility="public" extends="client,jmx"/>
<conf name="aop" visibility="public" />
<conf name="javaee" visibility="public" />
<conf name="ant" visibility="public" />
<conf name="logging" visibility="public" />
</configurations>
<publications>
<!-- from jbossall-client readme.txt -->
<artifact name="commons-logging" type="jar" conf="client"/>
<artifact name="concurrent" type="jar" conf="client"/>
<artifact name="ejb3-persistence" type="jar" conf="client"/>
<artifact name="jboss-aop-client" type="jar" conf="client"/>
<artifact name="jboss-appclient" type="jar" conf="client"/>
<artifact name="jboss-aspect-jdk50-client" type="jar" conf="client"/>
<artifact name="jboss-client" type="jar" conf="client,ant"/>
<artifact name="jboss-common-core" type="jar" conf="client,ant"/>
<artifact name="jboss-ejb3-common-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-core-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-proxy-impl-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-proxy-spi-client" type="jar" conf="client"/>
<artifact name="jboss-ejb3-security-client" type="jar" conf="client"/>
<artifact name="jboss-j2se" type="jar" conf="client"/>
<artifact name="jboss-javaee" type="jar" conf="client,javaee,ant"/>
<artifact name="jboss-logging-log4j" type="jar" conf="client"/>
<artifact name="jboss-logging-spi" type="jar" conf="client,ant"/>
<artifact name="jboss-messaging-client" type="jar" conf="client"/>
<artifact name="jboss-remoting" type="jar" conf="client"/>
<artifact name="jboss-security-spi" type="jar" conf="client,ant"/>
<artifact name="jboss-serialization" type="jar" conf="client,ant"/>
<artifact name="jboss-system-client" type="jar" conf="client"/>
<artifact name="jboss-system-jmx-client" type="jar" conf="client"/>
<artifact name="jbosssx-as-client" type="jar" conf="client,ant"/>
<artifact name="jbosssx-client" type="jar" conf="client,ant"/>
<artifact name="jmx-client" type="jar" conf="client,ant"/>
<artifact name="jnp-client" type="jar" conf="client"/>
<artifact name="jboss-mdr" type="jar" conf="client"/>
<!--END from jbossall-client readme.txt -->
<!-- additional client-libs -->
<artifact name="jbosscache-core" type="jar" conf="client"/>
<artifact name="trove" type="jar" conf="client"/>
<artifact name="javassist" type="jar" conf="client,hibernate"/>
<!-- END additional client-libs -->
<artifact name="activation" type="jar" conf="activation"/>
<artifact name="mail" type="jar" conf="mail"/>
<artifact name="jboss-javaee" type="jar" conf="compile"/>
<artifact name="jboss-j2se" type="jar" conf="compile"/>
<artifact name="jboss-system-jmx" type="jar" conf="compile,jmx"/>
<artifact name="jbosscache-core" type="jar" conf="compile"/>
<artifact name="jboss-remoting" type="jar" conf="compile,ant"/>
<artifact name="jboss-kernel" type="jar" conf="compile"/>
<artifact name="jboss-logging-spi" type="jar" conf="compile, logging"/>
<artifact name="jboss-security-spi" type="jar" conf="compile"/>
<artifact name="jboss-ejb3-ext-api" type="jar" conf="server"/>
<artifact name="jboss-ejb3-core" type="jar" conf="server"/>
<artifact name="jboss-integration" type="jar" conf="compile,ant"/>
<artifact name="ejb3-persistence" type="jar" conf="hibernate"/>
<artifact name="hibernate-core" type="jar" conf="hibernate"/>
<artifact name="hibernate-entitymanager" type="jar" conf="hibernate"/>
<artifact name="hibernate-annotations" type="jar" conf="hibernate"/>
<artifact name="hibernate-commons-annotations" type="jar" conf="hibernate"/>
<artifact name="jboss-system-client" type="jar" conf="server"/>
<artifact name="servlet-api" type="jar" conf="servlet"/>
<artifact name="jbosssx" type="jar" conf="server"/>
<artifact name="jmx-invoker-adaptor-client" type="jar" conf="server,jmx,ant"/>
<artifact name="antlr" type="jar" conf="hibernate"/>
<artifact name="slf4j-api" type="jar" conf="server, logging"/>
<artifact name="slf4j-jboss-logging" type="jar" conf="server, logging"/>
<artifact name="jboss-aop-client" type="jar" conf="aop"/>
<artifact name="jbossjmx-ant" type="jar" conf="ant"/>
</publications>
</ivy-module>

Ivy configuration for springsource repo

I`m trying to set up ivy to get jars from the springsource repo.
So far I have for my ivy.xml:-
<dependencies>
<dependency org="org.springframework" name="org.springframework.core" rev="3.0.1.RELEASE"/>
<dependency org="org.springframework" name="org.springframework.aop" rev="3.0.1.RELEASE" />
<dependency org="com.adobe.flex" name="com.springsource.flex.messaging.common" rev="3.2.0.3978"/>
<dependency org="com.adobe.flex" name="com.springsource.flex.messaging" rev="3.2.0.3978" />
</dependencies>
and for my ivysettings.xml:-
<ivysettings>
<settings defaultresolver="spring.chain" deafultcache="C:/repo" />
<resolvers>
<chain name="spring.chain">
<url name="com.springsource.repository.bundles.release">
<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<ibiblio name="ibiblio" m2compatible="true"/>
</chain>
</resolvers>
But I keep getting the errors:-
unknown resolver null
no resolver found for org.springframework#org.springframework.core: check your configuration
unknown resolver null
no resolver found for org.springframework#org.springframework.aop: check your configuration
unknown resolver null
no resolver found for com.adobe.flex#com.springsource.flex.messaging.common: check your configura
unknown resolver null
no resolver found for com.adobe.flex#com.springsource.flex.messaging: check your configuration
Am I missign somethign with regards to the resolvers?
Its due to a typo defaultresolver="spring.chain" should be defaultResolver="spring.chain"