OPAL-How to build code in Docker in local machine (faced compile error)? - sbt

I access code in Docker($docker pull mreif/fse2016:evaluation), the code could be compiled and run without errors in remote server. While i download it to local machine, i suffered some errors in compiling(using: sbt compile):
[error] (*:update) sbt.ResolveException: unresolved dependency: de.opal-project#abstract-interpretation-framework_2.11;0.9.0-SNAPSHOT: not
[What i have done] I added follow lines into "build.sbt":
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
[error] evaluation/src/main/scala/org/opalj/evaluation/EntryPointAndCallEdgeCountAnalysis.scala:90: not found:
[What i have done] I added follow lines into "build.sbt":
libraryDependencies += "de.opal-project" % "fixpoint-computations-framework-analyses_2.11" % "0.9.0- SNAPSHOT"
3.[error] /src/main/scala/org/opalj/evaluation/EntryPointAndCallEdgeCountAnalysis.scala:130: not found: value LibraryEntryPointsAnalysis
I have checked the related code, LibraryEntryPointsAnalysis has been actually imported but doesn't work.
Could you please help me to confirm is there any operations i missed for compile the source code?
Thank you very much!
Jiang

The reason why it is not working is a version mismatch of the OPAL framework. The reason why it doesn't find the "LibraryEntryPointAnalysis" is, that it has been renamed.
You have to options:
Use the version of OPAL that is used in the Docker container
make a check out of OPAL at from version tag "ArtifactEvaluationFSE2016"
copy OPAl from the container like you did with the evaluation project
Adapt the Evaluation Project to the new API
the LibraryEntryPointsAnalysis is now called EntryPointAnalysis
there are probably other breaking changes that you have to fix
If you want to go with option one you have to build OPAL on your own because the eval version is not published on maven.

Related

Sbt Cannot Resolve "latest.integration" Version

When I try to resolve the following dependency with Sbt "com.dixa" % "conversation-thrift-protocol" % "latest.integration", it fails with:
[error] (ssExtractDependencies) sbt.librarymanagement.ResolveException: Error downloading com.dixa:conversation-thrift-protocol:latest.integration
[error] not found: https://repo.dixa.io/content/repositories/snapshots/com/dixa/conversation-thrift-protocol/maven-metadata.xml
As a matter of fact, the referred maven-metadata.xml file does exist in Nexus repo, which leaves me puzzled. Where should I look for a problem?
The contents of the maven-metadata.xml file:
<metadata>
<groupId>com.dixa</groupId>
<artifactId>conversation-thrift-protocol</artifactId>
<versioning>
<versions>
<version>7.10.1-SNAPSHOT</version>
<version>7.10.1--v2-SNAPSHOT</version>
<version>7.10.1-v2-SNAPSHOT</version>
<version>7.10.1-v6-SNAPSHOT</version>
<version>7.10.1-v7-SNAPSHOT</version>
</versions>
<lastUpdated>20220517141646</lastUpdated>
</versioning>
</metadata>
It appeared to be a problem with indexing of the repository: the published artifacts were not visible straight away, they needed some time before becoming visible for resolvers

cannot create luminus project with sqlite and clojurescript support

I am trying to create a luminus project with sqlite and cljs support with this command:
lein new dbscript +sqlite +cljs
but I keep getting this error message all the time:
Failed to resolve version for dbscript:lein-template:jar:RELEASE: Could not find metadata dbscript:lein-template/maven-metadata.xml in local (/home/jonas/.m2/repository)
Failed to read artifact descriptor for dbscript:lein-template:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template dbscript on the classpath.
and I cannot find any solution to this. Any suggestions?

How to add scalax.io as dependency in SBT?

I want to use scalax.io._ to manipulate file operations with SBT.
When I ran it, I got the error message showing scalax is not found.
>sbt run
import scalax.io._
[error] ^
[error] iotest.scala:49: not found: object scalax
How to find the library dependency for this particular one?
A more general question, how to obtain the library dependency information for any library?
For example, if I need use actor in scala, I need specify a library dependency. How to find the library dependency?
"the library dependency information for any library" is part of the library's documentation and the author(s) is supposed to publish the info for different project management tools, sbt including. After all, what would be the purpose of developing a library that's hard to use?
Use http://search.maven.org/ to search for a library, and when you search for scala-io you'll get a list of available scala-io libraries.
Since I've never worked with the library I copied the ScalaIOExample example from Scala IO Documentation to have a working example. It needs the scalax.io and scalax.file packages that are distributed as scala-io-file artifact. Searching for the artifact leads to Artifact Details For com.github.scala-incubator.io:scala-io-file_2.10:0.4.2 with information on how to use it with Scala SBT in Dependency Information section.
With this, I created the following build.sbt in a sbt project:
scalaVersion := "2.10.3"
libraryDependencies += "com.github.scala-incubator.io" %% "scala-io-file" % "0.4.2"
It will add scala-io-file_2.10-0.4.2.jar to classpath and executing run in the project gives the following results:
$ sbt run
[info] Loading global plugins from /Users/jacek/.sbt/0.13/plugins
[info] Loading project definition from /Users/jacek/sandbox/stackoverflow/sbt-scala-io/project
[info] Set current project to sbt-scala-io (in build file:/Users/jacek/sandbox/stackoverflow/sbt-scala-io/)
[info] Running ScalaIOExample
Not interrupting system thread Thread[Keep-Alive-Timer,8,system]
Not interrupting system thread Thread[Keep-Alive-SocketCleaner,8,system]
[success] Total time: 5 s, completed Dec 31, 2013 11:16:42 PM

Specifying a relative source directory

I have just recently forked an outdated SBT project (which you can find here https://github.com/mdedetrich/sbt-bower) that was last working with an outdated version of SBT 0.11.0. I am trying to get the sbt plugin to work with SBT versions 0.12.3 and 0.13.0, however I am getting an issue on this line
https://github.com/mdedetrich/sbt-bower/blob/master/src/main/scala/SbtBowerPlugin.scala#L37
When I run sbt compile, I get the following error
[error] /Users/mdedetrich/github/sbt-bower/src/main/scala/SbtBowerPlugin.scala:37: value / is not a member of java.io.File
[error] sourceDirectory in Bower <<= (sourceDirectory).apply (_ / "main" / "webapp" )
Does anyone know what is causing this issue?
Thanks to Mark Harrah, this is actually due to this https://groups.google.com/forum/#!topic/simple-build-tool/0k1No2kfvm8/discussion
I had to remove the import Path._ in the SbtBowerPlugin.scala file and it now compiles fine!

Maven build(with Flexmojos) for multi module project throwing an error

I am trying to setup a Flex/Java multi module project in Eclipse. Using Maven to run the build and generate the war file. The details of the versions I am using are as follows:
Flexmojos : 3.5.0
Flex framework/compiler : 4.5.1.21328
Target player : 10.2.0
And the playerglobal dependency in my pom file uses classifier as 10.2 with version 4.5.1.21328
Now when I run the build using 'mvn install', I get the following error:
[ERROR] Failed to execute goal
org.sonatype.flexmojos:flexmojos-maven-plugin:3.5.0:compile-swf
(default-compile-swf) on project client: TargetPlayer and
playerglobal dependency version doesn't match! Target player: 10.2.0,
player global: 10.2 -> [Help 1]
Any ideas why this might be happening?
I tried just playing around changing those version numbers, but still couldn't make it work for Flex 4.5.1. Please let me know how to go about this (and if you need more information). Thanks.
Regards
Basith
Have you tried simply referencing "10.2" instead of "10.2.0"? I think there was only one Flash player deployed with a 3-segment version number.

Resources