michael-hoke commented on code in PR #253:
URL: https://github.com/apache/daffodil-vscode/pull/253#discussion_r963955123
##########
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'm not thrilled with this either, but I don't know another way of doing it.
This is here because the sbt-xjc plugin invokes java from the command line, and
it needs to find the libraries downloaded as dependencies during the build
somehow. These lines are adding the required jars to the classpath.
--
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]