How to show sbt a custom repo? - scala

I’m not a developer. I need to launch a scala code without access to Internet. Where and what I should place a lines to launch “sbt clean test”?
Dependencies and plugins are there.
Now I have an error that some plugin dependencies are needed (connection timeout).

Related

Minecraft Server Paused after my Custom Plugin Loading

this problem has started after I fixed my Plugin in the maven file with erasing this.
<outputDirectory>D:\My New Plugins\Server\plugins</outputDirectory>
this breaked my first test Server erasing all the Plugin Folder Files and damaged the code. Then after reopening the server, the server always stops at this part:
Which I was worried considering my Plugin is broken. Do I have to make a new Plugin and transfer most of the files?
Note: the Last Yellow Lines in the picture Indicate the Use of the JScoreboard dependency used in my plugin. Thanks.
Edit: There is also a warning in the build log:
maven-shade-plugin has detected that some class files are
present in two or more JARs. When this happens, only one
single version of the class is copied to the uber jar.
Usually this is not harmful and you can skip these warnings,
otherwise try to manually exclude artifacts based on
mvn dependency:tree -Ddetail=true and the above output.
See http://maven.apache.org/plugins/maven-shade-plugin/
This might be Related.
The problem appears to be JScoreBoards. It does not support Minecraft version 1.18, and therefore is unable to load up properly.

Prevent the download of Gradle and Maven dependencies

Before asking my question I'd like to apologize if this is really a
simple question.
I'm trying to find out the way, where we can locate and reuse the dependencies of Gradle and Maven. I want to find the possibilities of reusing them within multiple projects at the same time, opened in STS, Eclipse or Intellij.
Instead of download them every time when we create a new project. It will save me the data, time and disk space.
Maven dependencies are not downloaded again every time you create a new project.
They are downloaded to the local repository of your computer once and then they are read from there. So as long as you open a new project on the same account, Maven does not redownload dependencies.
The exception are SNAPSHOT dependencies, for which Maven periodically looks for new updates in the remote repositories.
Gradle, like Maven, has an Offline Mode, which means you're telling it to always try to re-use cached dependencies instead of resolving them from network.
Each of the dependency manager has a command line option for this, but in IntelliJ IDEA you can enable/disable it simply by toggling an icon-button in the Gradle toolbar.
And the same for Maven.

Fixing my Scala Intellij project when loading it from an existing project in sbt and dependencies download fails

Oftentimes I have troubles with sbt downloading its dependencies when behind a corporate firewall when trying to "Load a project from existing sources" -> sbt. It eventually times out and leaves my project in the following state:
there is some problem when
I can at this point download all my dependencies through the sbt-terminal tool (or the command-line) but Intellij will still keep this "view", instead of correctly showing me the diverse folders the project contains (like src/, test/, etc).
Is there a way to fix this?
Thanks
I also have had this problem multiple times. I usually close IntelliJ, clean its repository rm -rf .idea/, and then open the project folder (instead of importing it). It's always done the job for me.

Gradle Eclipse Plugin only half-working

I am trying to achieve the following between Eclipse and Gradle:
Allow Gradle to handle 100% of my local build logic; only use Eclipse as an IDE for syntax highlighting, refactoring, etc. Every time I wish to build my app I want to drop into a command line and run a Gradle build invocation from there.
I want the dependencies closure of my build.gradle file to be the sole location for configuring 3rd party dependencies; every time I make a change to this closure (adding/removing a dependency/JAR), I want Eclipse to automagically "see" this change and adjust my project's classpath accordingly
I installed the Gradle-Eclipse Integration plugin and then I followed this tutorial for configuring it correctly.
First I ran:
gradle clean build
And then I added:
apply plugin: 'eclipse'
To my build.gradle, and then ran:
gradle eclipse
I saw a lot of output, the tail end of which is:
gradle eclipse
:myapp:eclipseClasspath
Download http://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2-sources.jar
Download http://repo1.maven.org/maven2/org/sonatype/sisu/inject/cglib/2.2.1-v20090111/cglib-2.2.1-v20090111-sources.jar
Download http://repo1.maven.org/maven2/asm/asm/3.1/asm-3.1-sources.jar
Download http://repo1.maven.org/maven2/com/google/inject/guice/3.0/guice-3.0-sources.jar
Download http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.3.7/groovy-all-2.3.7-sources.jar
Download http://repo1.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar
Download http://repo1.maven.org/maven2/javax/inject/javax.inject/1/javax.inject-1-sources.jar
:myapp:eclipseJdt
:myapp:eclipseProject
:myapp:eclipse
I then opened my .classpath file and see that its been correctly updated with all the transitive dependencies defined in my dependencies closure back inside build.gradle.
However, there is not visual indication inside Eclipse that anything is wired correctly. With Ivy or Maven, you usally get something like a Ivy Repository Manager or Maven Dependency Library that automatically changes anytime you modify ivy.xml or pom.xml.
Most importantly, this just doesn't seem to be working! As you see above, Apache Commons Lang 3 is a dependency, but when I try to add org.apache.commons.lang3.exception.ExceptionUtils to a Groovy source file, Eclipse can't find it. I have already tried restarting Eclipse to see if that shook any bugs out.
Am I just not using this plugin correctly, or does it just not work? Using Groovy/Grails Tool Suite 3.6.0.RELEASE here, which is based on Eclipse Luna 4.4.

sbt cannot resolve ensime-sbt-cmd in a Play2-Scala project

I'm trying to configure Sublime Text 2 to better support working with Scala and Play! 2 Framework by following instructions from http://engineering.panaxiom.co.uk/post/34631917299/sublime-text-2-with-sbt-and-play-2. (I made just one change: I updated the plugin version to 0.1.1.)
I was able to almost complete the steps given in the tutorial but the second one always fails (generate ensime config file) simply because sbt is unable to resolve ensime-sbt-cmd plugin (when I enter a project directory and execute play command). I'm not able to find the cause of the problem but sbt gives me an error like:
[error] Server access Error: connect: Address is invalid on local machine, or port is
not valid on remote machine url=http://repo1.maven.org/maven2/org/ensime/
ensime-sbt-cmd_2.9.2_012/0.1.1/ensime-sbt-cmd-0.1.1.pom
(The command output shows other urls to: scalasbt.artifactoryonline.com and repo.typesafe.com, but the maven repo url exists). After that, some warnings are displayed, again with urls of repositories.
sbt is able to resolve all other plugins or dependencies that the project has (I just finished create the project, so there are no other extra plugins or dependencies except from ensime-sbt-cmd).
I tried to change scalaVersion (on project_dir/build.sbt) but it make no difference. sbt version is 0.12, scala version is 2.9.2.
Someone knows what I can do to solve this problem? Is it possible to be something related to Java 7 on Windows 8 64 bits machine and Kaspersky Internet Security 2013? With this combination of softwares I was unable to launch Eclipse Marketplace and Netbeans plugins updates until I configured KIV exclusion rules with Java commands (java.exe, javaw.exe, javaws.exe).
Thanks and sorry because of the long text.
Make sure that your project/build.sbt file contains
sbt.version=0.12.4
According to your error message, your sbt version has been set to "012" not "0.12"