michael-hoke commented on code in PR #253:
URL: https://github.com/apache/daffodil-vscode/pull/253#discussion_r963990673


##########
build.sbt:
##########
@@ -88,3 +89,180 @@ lazy val core = project
     packageName := s"${name.value}-$daffodilVer"
   )
   .enablePlugins(commonPlugins: _*)
+  .dependsOn(sbtXjcProject)
+  .aggregate(sbtXjcProject)
+
+lazy val sbtXjcProject = project
+  .in(file("server/sbtXjc"))
+  .enablePlugins(SbtXjcPlugin)
+  .settings(
+    name := "daffodil-xjc",
+    libraryDependencies ++= Seq(
+      "javax.activation" % "activation" % "1.1.1",
+      "com.sun.xml.bind" % "jaxb-xjc" % "2.1.6"
+    ),
+    xjcCommandLine += "-nv",
+    xjcCommandLine += "-p",
+    xjcCommandLine += "org.apache.daffodil.tdml",
+    xjcBindings += "bindings.xjb",
+    xjcJvmOpts += "-classpath",
+    xjcJvmOpts += Seq(
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "javax",
+        "activation",
+        "activation",
+        "1.1.1",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "javax",
+        "activation",
+        "javax.activation-api",
+        "1.2.0",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "org",
+        "glassfish",
+        "jaxb",
+        "txw2",
+        "2.2.11",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "relaxngDatatype",
+        "relaxngDatatype",
+        "20020414",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "com",
+        "sun",
+        "xsom",
+        "xsom",
+        "20140925",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "com",
+        "sun",
+        "xml",
+        "bind",
+        "external",
+        "rngom",
+        "2.2.11",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "com",
+        "sun",
+        "istack",
+        "istack-commons-runtime",
+        "2.21",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "org",
+        "glassfish",
+        "jaxb",
+        "codemodel",
+        "2.2.11",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "org",
+        "glassfish",
+        "jaxb",
+        "jaxb-core",
+        "2.2.11",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "javax",
+        "xml",
+        "bind",
+        "jaxb-api",
+        "2.1",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "com",
+        "sun",
+        "istack",
+        "istack-commons-tools",
+        "2.21",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "org",
+        "glassfish",
+        "jaxb",
+        "jaxb-xjc",
+        "2.2.11",
+        "*"
+      ).mkString(java.io.File.separator),
+      Seq(
+        s"${csrCacheDirectory.value}",
+        "https",
+        "repo1.maven.org",
+        "maven2",
+        "com",
+        "sun",
+        "xml",
+        "bind",
+        "jaxb-impl",
+        "2.2.11",
+        "*"

Review Comment:
   I also would expect it to handle this automatically, but it was throwing 
ClassNotFoundExceptions before I added all of this. Maybe there is some extra 
configuration needed, but nothing jumps out at me from their documentation.
   
   @arosien is there a smarter way to have the java process recognize/find the 
jars?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to