Commit bf7ea71f authored by Kyriakos Kritikos's avatar Kyriakos Kritikos
Browse files

Changing pom & dependencies to suit CAMEL 3.0 plus main of CDOClient to...

Changing pom & dependencies to suit CAMEL 3.0 plus main of CDOClient to directly call static methods without creating CDO sessions
parent ea00b7ef
Pipeline #21549 failed with stages
in 2 minutes and 17 seconds
......@@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.net4j,
org.eclipse.emf.cdo,
org.eclipse.emf.ecore,
org.eclipse.net4j.tcp,
camel;bundle-version="3.1.0",
camel;bundle-version="4.5.0",
org.eclipse.xtext,
org.eclipse.ocl,
org.eclipse.ocl.uml,
......@@ -21,7 +21,7 @@ Require-Bundle: org.eclipse.net4j,
org.eclipse.ocl.xtext.oclinecore,
org.eclipse.ocl.xtext.oclstdlib,
org.eclipse.ocl.xtext.completeocl,
camel.dsl;bundle-version="3.1.0"
camel.dsl;bundle-version="4.5.0"
Bundle-ActivationPolicy: lazy
Import-Package:
org.apache.log4j,
......
......@@ -130,6 +130,11 @@
<layout>p2</layout>
<url>http://download.eclipse.org/modeling/emf/cdo/updates/releases/4.6</url>
</repository>
<repository>
<id>xtext</id>
<layout>p2</layout>
<url>http://download.eclipse.org/modeling/tmf/xtext/updates/composite/latest/</url>
</repository>
<repository>
<id>paasage.repo</id>
<name>PaaSage repository</name>
......
......@@ -1600,9 +1600,10 @@ public class CDOClient
* parameter required by it and executes it. The latter exploitation is useful for
* a command line usage of the CDOClient API. */
public static void main(String[] args){
//Create the CDOClient
CDOClient cl = new CDOClient("Administrator","0000");
CDOClient cl = null;
if (args.length == 0){
//Create the CDOClient
cl = new CDOClient("Administrator","0000");
//Creating & adding a listener to the session
MyListener listener = new MyListener();
cl.addListener(listener);
......@@ -1669,6 +1670,8 @@ public class CDOClient
String method = args[0];
boolean ok = false;
if (method.equals("importModel") || method.equals("importTextualModel")){
//Create the CDOClient
cl = new CDOClient("Administrator","0000");
if (args.length >= 3){
String filePath = args[1];
String resourcePath = args[2];
......@@ -1700,6 +1703,8 @@ public class CDOClient
}
else if (method.equals("exportModel") || method.equals("exportTextualModel")){
if (args.length == 3){
//Create the CDOClient
cl = new CDOClient("Administrator","0000");
String resourcePath = args[1];
String filePath = args[2];
if (method.equals("exportModel"))
......@@ -1711,6 +1716,8 @@ public class CDOClient
}
else if (method.equals("exportModelWithRefRec") || method.equals("exportModelWithRef")){
if (args.length == 4){
//Create the CDOClient
cl = new CDOClient("Administrator","0000");
String resourcePath = args[1];
String dirPath = args[2];
String arg3 = args[3];
......@@ -1724,6 +1731,8 @@ public class CDOClient
else log.error(method + " was called with a wrong number of arguments");
}
else if (method.equals("exportCDOContent") || method.equals("loadCDOContent")){
//Create the CDOClient
cl = new CDOClient("Administrator","0000");
if (args.length == 3){
String arg1 = args[1];
boolean xtext = Boolean.parseBoolean(args[2]);
......@@ -1738,7 +1747,7 @@ public class CDOClient
if (ok) log.info(method + " was successfully performed");
}
//Close the CDOSession once you are done
cl.closeSession();
if (cl != null) cl.closeSession();
System.exit(1);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment