Repository: Vantiq/vantiq-extension-sources (language: python)

Issue:
camelConnector build creates a seemingly invalid windows bat file that does not run
After doing a clean gradle build of the camelConnector I cannot run the windows bat file that is built. I can open an Ubuntu shell and run the shell script no problem, I can also just run the java command manually and that works, I suspect there is a typo in the file somewhere (see attached). 

[camelConnector.txt](https://github.com/Vantiq/vantiq-extension-sources/files/11092896/camelConnector.txt)

Here is the error: 

> \>  camelConnector.bat  server.config
The input line is too long.
The syntax of the command is incorrect.




Discussion / hints:

Fix patch:
diff --git a/camelConnector/build.gradle b/camelConnector/build.gradle
index 0e943e3d..48d616db 100644
--- a/camelConnector/build.gradle
+++ b/camelConnector/build.gradle
@@ -12,6 +12,8 @@ plugins {
 mainClassName = 'io.vantiq.extsrc.camelconn.connector.CamelMain'
 
 startScripts{
+    // Use shorter classpath here. We've injected the complete list into the main jar file's manifest.
+    classpath = jar.outputs.files
     doLast{
         def windowsScriptFile = file getWindowsScript()
         def unixScriptFile = file getUnixScript()
@@ -78,6 +80,21 @@ dependencies {
     testRuntimeOnly("org.junit.vintage:junit-vintage-engine:${junitVintageEngineVersion}")
 }
 
+jar {
+    doFirst {
+        // Add all the jar files to the manifest here.  This allows us to avoid having to set a huge classpath,
+        // which is known to fail on windows due to command line length limits. The failure depends upon the
+        // installation location (since the "app path" is included), but by setting it here, we avoid that issue
+        // completely.
+        manifest {
+            attributes (
+                "Main-Class": "${mainClassName}",
+                "Class-Path": configurations.runtimeClasspath.files.collect { it.name }.join(" ")
+            )
+        }
+    }
+}
+
 group = 'io.vantiq.extsrc.camelconnector'
 version = 'unspecified'
 description = 'Vantiq Camel Connector'


Test patch:
diff --git a/objectRecognitionSource/src/test/java/io/vantiq/extsrc/objectRecognition/imageRetriever/TestNetworkStreamRetriever.java b/objectRecognitionSource/src/test/java/io/vantiq/extsrc/objectRecognition/imageRetriever/TestNetworkStreamRetriever.java
index f6cff313..79ff166c 100644
--- a/objectRecognitionSource/src/test/java/io/vantiq/extsrc/objectRecognition/imageRetriever/TestNetworkStreamRetriever.java
+++ b/objectRecognitionSource/src/test/java/io/vantiq/extsrc/objectRecognition/imageRetriever/TestNetworkStreamRetriever.java
@@ -11,6 +11,7 @@
 import io.vantiq.extsrc.objectRecognition.ObjRecTestBase;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import io.vantiq.extsrc.objectRecognition.NoSendORCore;
@@ -62,6 +63,7 @@ public void testIpCamera() {
     }
 
     @Test
+    @Ignore("Test camera seems to have disappeared.  Need a more reliable strategy for these things")
     public void testRtspCamera() {
         // Don't fail if camera's offline...
         assumeTrue("Could not open requested url", isIpAccessible(IP_CAMERA_URL));