Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get it to install on IntelliJ IDEA CE #72

Closed
peterwilli opened this issue Aug 22, 2016 · 8 comments
Closed

Can't get it to install on IntelliJ IDEA CE #72

peterwilli opened this issue Aug 22, 2016 · 8 comments

Comments

@peterwilli
Copy link

Hi there,

I'm currently trying to install Wasabi to use as my static file server. It doesn't get to install completely I think. What I did was:

  • Made a Kotlin project on IDEA with gradle.

  • Created a folder src/main/kotlin in my IDE. See screenshot.

    • screenshot from 2016-08-22 11-10-48
  • Included wasabi in my gradle file, which looks like this:

    group 'Viewer'
    version '1.0-SNAPSHOT'
    
    buildscript {
    ext.kotlin_version = '1.0.3'
    
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
    }
    
    apply plugin: 'java'
    apply plugin: 'kotlin'
    
    sourceCompatibility = 1.5
    
    repositories {
    mavenCentral()
    maven { url 'http://repository.jetbrains.com/all' }
    }
    
    dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    compile 'org.wasabifx:wasabi:0.1-SNAPSHOT'
    
    testCompile group: 'junit', name: 'junit', version: '4.11'
    }
    
  • Then, added the server code from the example:

fun runServer() {
    val appServer = AppServer()
    server.negotiateContent()
    server.serveStaticFilesFromFolder("/public")
}

But it cant find AppServer and it also says this about my repositories:
screenshot from 2016-08-22 11-13-19

When I do what it says, and update, I get this:
screenshot from 2016-08-22 11-13-31

This was a fresh project, if anyone has a suggestion then that's great! Thanks!

@hhariri
Copy link
Collaborator

hhariri commented Aug 22, 2016

Hi Peter, sorry, we've moved dependencies and are in the process of updating README et al. The issue seems you're missing dependencies.

You can find everything you need here:

https://bintray.com/wasabifx/wasabifx/wasabi/0.3.18

Basically the new home from now on for Wasabi will be Bintray (and soon Maven Central).

I've just tried it and it works so you should be good.

Thanks.

@hhariri hhariri closed this as completed Aug 22, 2016
@peterwilli
Copy link
Author

@hhariri thanks, will try and see how it goes!

@peterwilli
Copy link
Author

@hhariri how did you do it? Do you use Gradle too? I got the same error message with this in my settings:

repositories {
    mavenCentral()
    maven { url  "http://dl.bintray.com/wasabifx/wasabifx"  }
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    compile 'org.wasabifx:wasabi:0.3.18'

    testCompile group: 'junit', name: 'junit', version: '4.11'
}

@hhariri
Copy link
Collaborator

hhariri commented Aug 22, 2016

Yes. Using Gradle. Make sure it's refreshed dependencies. Did you hit refresh? Here's a link to the sample project I just created.

https://www.dropbox.com/s/atm8f3fcr0rngbj/sample.zip?dl=0

@peterwilli
Copy link
Author

@hhariri Thanks, for some reason it works perfectly fine when I use your sample :)
Now I know it's propably something with my setup.

Otherwise I just use yours as a boilerplate xD (just kidding)

@peterwilli
Copy link
Author

@hhariri I see the problem. I forgot to import the wasabi AppServer. I was hoping IDEA would autoimport but it didn't and the example on github didn't have any import statements either. At least now it runs! Thanks!

@hhariri
Copy link
Collaborator

hhariri commented Aug 22, 2016

Actually IDEA should auto-import it, but you need to hit Alt+Enter when it goes red. Does that not happen?

@peterwilli
Copy link
Author

@hhariri yeah it did, I was just expecting it to automatically import as I paste the code, because I checked something like 'enable autoimport' or something when creating a new project. I'm all set now :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants