Closed HaomiaoLuoLlanio closed 1 year ago
I saw this but it will be a couple of hours before I can look closely.
I didn't find the folder called 'reach-processors_2.12/1.6.2' on org.clulab.
Can you say what command you issued and which directory you were in at the time? The output does not match what I see. Also, how did you get the files to your computer and are you using the master branch? Thanks.
This was caused by command sbt compile and the directory is /Users/luohaomiao/reach. For getting files, I use command git clone ... under directory: /Users/luohaomiao. Also, I'm not sure if my build.sbt is configured well or not. I add the equivalent SBT dependencies into /Users/luohaomiao/reach/build.sbt: lazy val commonSettings = Seq(
organization := "org.clulab",
// Default to 2.12, but still cross-build for 2.11. // 2.12.12 results in an exception when trying to access // a resource through getResource(). There might be a // change related to the leading / or something similar. scalaVersion := "2.12.8",
crossScalaVersions := Seq("2.11.12", "2.12.8"),
scalacOptions ++= Seq("-feature", "-unchecked", "-deprecation"),
testOptions in Test += Tests.Argument("-oD"),
libraryDependencies ++= Seq( "org.clulab" %% "reach-main" % "1.6.2"),
parallelExecution in Global := false,
// publish to a maven repo publishMavenStyle := true,
// the standard maven repository publishTo := { val nexus = "https://oss.sonatype.org/" if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots") else Some("releases" at nexus + "service/local/staging/deploy/maven2") },
// let’s remove any repositories for optional dependencies in our artifact pomIncludeRepository := { _ => false },
// mandatory stuff to add to the pom for publishing pomExtra :=
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/clulab/reach</url>
<connection>https://github.com/clulab/reach</connection>
</scm>
<developers>
<developer>
<id>mihai.surdeanu</id>
<name>Mihai Surdeanu</name>
<email>mihai@surdeanu.info</email>
</developer>
</developers>
// // end publishing settings //
)
lazy val root = (project in file(".")) .settings(commonSettings: _) .aggregate(processors, main, causalAssembly, export) .dependsOn(main % "test->test;compile", causalAssembly, export) // so that we can import from the console .settings( name := "reach-exe", aggregate in test := true, aggregate in assembly := false, test in assembly := {}, assemblyMergeStrategy in assembly := { // The following line of code deals with these two conflicting files by thowing both away. // [error] (root/:assembly) deduplicate: different file contents found in the following: // [error] ~/.ivy2/cache/com.sun.xml.bind/jaxb-impl/jars/jaxb-impl-2.4.0-b180830.0438.jar:module-info.class // [error] ~/.ivy2/cache/javax.xml.bind/jaxb-api/jars/jaxb-api-2.4.0-b180830.0359.jar:module-info.class case PathList("module-info.class") => MergeStrategy.discard case other => (assemblyMergeStrategy in assembly).value(other) }, mainClass in assembly := { val sysMainOpt = Option(System.getProperty("mainClass")) sysMainOpt.orElse(Some("org.clulab.reach.RunReachCLI")) }, assemblyJarName in assembly := s"reach-${version.value}-FAT.jar" )
lazy val bioresources = project .settings(commonSettings:_*)
// this stores BioNLPProcessor and its models lazy val processors = project .settings(commonSettings:_*) .dependsOn(bioresources % "test->test;compile->compile")
lazy val main = project .settings(commonSettings:_*) .dependsOn(processors % "test->test;compile->compile") // .dependsOn(context % "test->test;compile->compile")
lazy val causalAssembly = project.in(file("assembly")) .settings(commonSettings:_*) .dependsOn(main % "test->test;compile->compile")
lazy val context = project.in(file("context")) .settings(commonSettings:_*) .dependsOn(main % "test->test;compile->compile")
lazy val export = project .settings(commonSettings:_*) .dependsOn(main % "test->test;compile->compile", causalAssembly % "test;compile") // need access to assembly/src/resources
// // publishing settings //
// these are the steps to be performed during release releaseProcess := SeqReleaseStep
It sounds like you are saying that you changed the build.sbt
file. That should not be necessary. The lines
libraryDependencies ++= Seq(
"org.clulab" %% "reach-main" % "1.6.2"),
likely cause a problem. The build file in this repo is used to create reach-main
and can't depend on reach-main
itself. Are you trying to build this reach project or do you want to create a different project that depends on reach? In the first case, don't change the build file. In the second case, you need a new build file with only the libraryDependencies
parts and a few other lines that define your own project. Does that make sense? If starting your own sbt
project, examples might help.
Okey, this is first time to use sbt. Thanks for your suggestion. Also, where should I run sbt compile and sbt assembly to compile the source code, in my new created project, or in the reach?
I guess I should run sbt compile and sbt assembly to install REACH locally. I delete the lines you mentioned, but when I run sbt assembly it actually caused the error:
(base) MacBook-Pro-81:reach luohaomiao$ sbt assembly
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[info] welcome to sbt 1.4.0 (Homebrew Java 11.0.19)
[info] loading settings for project reach-build from plugins.sbt ...
[info] loading project definition from /Users/luohaomiao/reach/project
[info] loading settings for project root from build.sbt,version.sbt ...
[info] loading settings for project bioresources from build.sbt ...
[info] loading settings for project processors from build.sbt ...
[info] loading settings for project main from build.sbt ...
[info] loading settings for project causalAssembly from build.sbt ...
[info] loading settings for project context from build.sbt ...
[info] loading settings for project export from build.sbt ...
[info] set current project to reach-exe (in build file:/Users/luohaomiao/reach/)
[warn] there are 2 keys that are not used by any other settings/tasks:
[warn]
[warn] bioresources / releaseProcess
[warn] +- /Users/luohaomiao/reach/bioresources/build.sbt:11
[warn] root / releaseProcess
[warn] +- /Users/luohaomiao/reach/build.sbt:119
[warn]
[warn] note: a setting might still be used by a command; to exclude a key from this lintUnused
check
[warn] either append it to Global / excludeLintKeys
or call .withRank(KeyRanks.Invisible) on the key
[warn] multiple main classes detected: run 'show discoveredMainClasses' to see the list
[error] 6 errors were encountered during merge
[error] java.lang.RuntimeException: deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/Pool$Impl.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/Pool$Impl.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/XMLStreamReaderToContentHandler.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/XMLStreamReaderToContentHandler.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/localization/LocalizableMessage.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/localization/LocalizableMessage.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/localization/Localizer.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/localization/Localizer.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/localization/NullLocalizable.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/localization/NullLocalizable.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/logging/Logger.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/logging/Logger.class
[error] at sbtassembly.Assembly$.applyStrategies(Assembly.scala:161)
[error] at sbtassembly.Assembly$.x$1$lzycompute$1(Assembly.scala:43)
[error] at sbtassembly.Assembly$.x$1$1(Assembly.scala:41)
[error] at sbtassembly.Assembly$.stratMapping$lzycompute$1(Assembly.scala:41)
[error] at sbtassembly.Assembly$.stratMapping$1(Assembly.scala:41)
[error] at sbtassembly.Assembly$.inputs$lzycompute$1(Assembly.scala:86)
[error] at sbtassembly.Assembly$.inputs$1(Assembly.scala:76)
[error] at sbtassembly.Assembly$.apply(Assembly.scala:103)
[error] at sbtassembly.Assembly$.$anonfun$assemblyTask$1(Assembly.scala:278)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:829)
[error] (assembly) deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/Pool$Impl.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/Pool$Impl.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/XMLStreamReaderToContentHandler.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/XMLStreamReaderToContentHandler.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/localization/LocalizableMessage.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/localization/LocalizableMessage.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/localization/Localizer.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/localization/Localizer.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/localization/NullLocalizable.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/localization/NullLocalizable.class
[error] deduplicate: different file contents found in the following:
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.7/istack-commons-runtime-3.0.7.jar:com/sun/istack/logging/Logger.class
[error] /Users/luohaomiao/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar:com/sun/istack/logging/Logger.class
[error] Total time: 81 s (01:21), completed Jun 27, 2023, 6:12:06 PM
It looks like we haven't run assembly
recently and need to clean up those problems. However, you probably don't need to run assembly
at all. If you are making your own project that uses reach as a library dependency, then your project will fetch the pre-compiled jar files from maven central. For that you don't even need to compile reach. If you want to directly use something that is already in reach, which is the reason you might want to run assembly, you can instead just use runMain
from sbt
. That only requires compilation and not assembly.
I need to use: sbt 'runMain org.clulab.reach.RunReachCLI' to get output.
Great. It will take a couple of days until I can fix assembly.
On Wed, Jun 28, 2023, 2:44 AM HaomiaoLuoLlanio @.***> wrote:
I need to use: sbt 'runMain org.clulab.reach.RunReachCLI' to get output.
— Reply to this email directly, view it on GitHub https://github.com/clulab/reach/issues/796#issuecomment-1610413579, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCHCOXGNJO6N7QVK2MW7E3XNN45JANCNFSM6AAAAAAZV5H6QU . You are receiving this because you commented.Message ID: @.***>
Assembly should be fixed as of #798. I'll close the issue, but if it doesn't work for you as intended, please reopen. Thanks again for alerting us of the issue.
Hi, I was unable to compile the reach, the error: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. [info] welcome to sbt 1.4.0 (Homebrew Java 11.0.19) [info] loading settings for project reach-build from plugins.sbt ... [info] loading project definition from /Users/luohaomiao/reach/project [info] loading settings for project root from build.sbt,version.sbt ... [info] loading settings for project bioresources from build.sbt ... [info] loading settings for project processors from build.sbt ... [info] loading settings for project main from build.sbt ... [info] loading settings for project causalAssembly from build.sbt ... [info] loading settings for project context from build.sbt ... [info] loading settings for project export from build.sbt ... [info] set current project to reach-exe (in build file:/Users/luohaomiao/reach/) [warn] there are 2 keys that are not used by any other settings/tasks: [warn]
[warn] bioresources / releaseProcess [warn] +- /Users/luohaomiao/reach/bioresources/build.sbt:11 [warn] root / releaseProcess [warn] +- /Users/luohaomiao/reach/build.sbt:122 [warn]
[warn] note: a setting might still be used by a command; to exclude a key from this
lintUnused
check [warn] either append it toGlobal / excludeLintKeys
or call .withRank(KeyRanks.Invisible) on the key [info] Executing in batch mode. For better performance use sbt's shell [info] Updating [info] Resolved dependencies [warn] [warn] Note: Unresolved dependencies path: [error] sbt.librarymanagement.ResolveException: Error downloading org.clulab:reach-processors_2.12:1.6.2 [error] Not found [error] Not found [error] not found: /Users/luohaomiao/.ivy2/local/org.clulab/reach-processors_2.12/1.6.2/ivys/ivy.xml [error] not found: https://repo1.maven.org/maven2/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom [error] at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:258) [error] at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:227) [error] at scala.util.Either$LeftProjection.map(Either.scala:573) [error] at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:227) [error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60) [error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:53) [error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:103) [error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73) [error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:116) [error] at scala.util.control.Exception$Catch.apply(Exception.scala:228) [error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:116) [error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:97) [error] at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219) [error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:130) [error] at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:3440) [error] at scala.Function1.$anonfun$compose$1(Function1.scala:49) [error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) [error] at sbt.std.Transform$$anon$4.work(Transform.scala:68) [error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282) [error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23) [error] at sbt.Execute.work(Execute.scala:291) [error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282) [error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265) [error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64) [error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [error] at java.base/java.lang.Thread.run(Thread.java:829) [error] (bioresources / update) sbt.librarymanagement.ResolveException: Error downloading org.clulab:reach-processors_2.12:1.6.2 [error] Not found [error] Not found [error] not found: /Users/luohaomiao/.ivy2/local/org.clulab/reach-processors_2.12/1.6.2/ivys/ivy.xml [error] not found: https://repo1.maven.org/maven2/org/clulab/reach-processors_2.12/1.6.2/reach-processors_2.12-1.6.2.pom [error] Total time: 2 s, completed Jun 27, 2023, 1:06:41 PM