Python support for maven module in intellij - maven

I am using intellij IDEA version 11.1.5 on windows and python plugin version is 2.9.2
I am using grinder maven plugin to run the performance tests using grinder. It only supports python(Jython) to run tests. I am not getting any auto suggestions for the python development even though I have installed the python plugin. Python files are also getting displayed as a text files.
Is there any other configuration to enable the auto suggestions for python development?

Your file types are not configured correctly, .py is most likely assigned to Text files instead of Python files, you can fix it in File | Settings | File Types.
There is no support for tests running via Maven, but you can create your own Run/Debug configuration for Python unit tests in IDEA.

Related

Gradle WSL: unknown property from buildSrc

I have a project with a buildSrc that has a package (eg abc).
I use that package in my other project build.gradle files (eg abc.test()). Given that it's under buildSrc, it is imported automatically, and it's been working on my macbook.
I am now trying to do the same thing with windows + WSL.
My current setup involves having java and gradle installed in windows (and working via Android Studio), while also having java and gradle installed in WSL. The short story is that WSL's gradle kept complaining about bad java_home paths when they were shared, so I installed everything as if it were pure linux.
When trying to run gradle build, the command now complains:
> Could not get unknown property 'abc' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Is there a way around this? Is there a better workaround to running gradle tasks from WSL? I'm using this in a pre-commit, so I'm even open to having it run the command "through windows" if it helps. As of now, I suspect it's a pathing issue, because build commands work fine in the IDE.

If I have Scala plugin installed in intellij, can i acces it globally?

I'm just getting started with scala, and im using intellij.
I have just installed the plugin with the tool in intellij, and this now works.
But i would like to also maybe run Scala from cmd. Is it necessary for me to download Scala via the browser also? or could I just add scala in intellij to enviorment variables, and have it working?
I think you can.
Intellij IDEA can install scala plugin with scala sdk and sbt.
If you have sbt somewhere, you can find and run it.
I was able to find my installation by opening the existing sbt project, then go to Project structure -> Modules -> sbt there would be the path.
I find myself path like this - jar:file:/C:/Users/UserName/AppData/Local/JetBrains/Toolbox/apps/IDEA-U/ch-0/193.6015.39.plugins/Scala/launcher/sbt-launch.jar
You can start sbt by java -jar sbt-launch.jar.

Some questions about the temporal relationship about gradle and gradlew

I'm learning gradle and some questions bother me
When I want to use gradle, I'd better use gradlew. But when I want to use gradlew, I need a installed gradle. So is that a story about chicken and egg?
Should be gradle-wrapper.jar uploaded to git repository? Some docs say git should track it, but it seems not good to track a binary file with git.
Using ./gradlew you are using a gradle wrapper. The wrapper is part of a project and it is able to download and install a specific version of gradle.
The Gradle Wrapper consists of a few files in your project directory:
gradlew: The shell script Unix users can run to execute Gradle tasks
gradlew.bat The bat script Windows users can run to execute Gradle tasks
gradle/wrapper/gradle-wrapper.jar The wrapper’s executable JAR; this is where the wrapper code resides
gradle/wrapper/gradle-wrapper.properties A properties file for configuring the wrapper
Using the wrapper guarantees that every developer on your team in a specified project is using the same version of Gradle and that they can run Gradle builds.
You should make sure all these are committed to version control
You can easily change the version of gradle used in the project just changing the gradle/wrapper/gradle-wrapper.properties file with the distributionUrl properties. For example:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
You can find more info about the wrapper here.
Using ./gradle you need to download and install manually the gradle version before.
It means that every developer in a team can use different version on the same project.

How to load PhantomJS in Gradle automatically

How can I configure my Gradle script to automatically download PhantomJS for my tests to use, so that I don't have to manually install it somewhere on my build server?
I see a phantomjs-maven-plugin that seems to do exactly what I want, but I don't know how to use it in Gradle.

Gradle using terminal with Android Studio install on Ubuntu 12.04

Can not get the terminal commands to work with gradle. I am trying to get Gradle to work outside of Android Studio as a prelude to scripting up various flavors of my app. I got the flavors to build within Android Studio but I find the interface confusing.
Gradle was installed either with ADT or Android Studio at: /home/mark/.gradle
Would like to use the install of Gradle at /home/mark/.gradle. Would like to avoid the Gradle in the repo since Android Studio updates frequently and their a possibility that I could wind up with two different versions of Gradle that could cause more headaches.
So far I have tried setting the PATH various ways in .bashrc bash.bashrc environment
files. Nothing worked.
Not sure if I put the wrong terms/commands in those files or the files are wrong ones. Tried the gradle term with and with out the dot as well. I would appreciate explicit instructions on terms/commands and in what files.
The gradle executable is usually installed here (when installed by by android-studio):
<user_home>/.gradle/wrapper/dists/gradle-<version>-bin/<some_key>/gradle-<version>/bin/
So be sure that your PATH variable include this path.
Alternativelly, you can download the gradle distribution, unzipping it in a more convenient location and use that location in your PATH.
Wathever your choice is (i.e. using the gradle installed by Android-Studio or download and install a distribution of gradle yourself) : you have to take care to maintain your PATH variable up-to-date when you install a newer version of Android-Studio.

Resources