download specific version of serenity-cli jar in package.json protractor project - serenity-bdd

Is there a way I can download specific version of serenity-cli jar.
senario: I want to use the specific version of old jar of cli, where do I mention the version of the jar in the package.json .
TIA

To see the command line options of serenity-bdd update command run:
./node_modules/.bin/serenity-bdd --help update
To use a specific version of the jar, run:
serenity-bdd update --artifact net.serenity-bdd:serenity-cli:jar:all:2.1.12

Related

Importing specific package version

I'm trying to use bower the package management to add new modules to my project.
I am using travis for continuous integration
Travis CI throws an error
error: pathspec '2.4.1' did not match any file(s) known to git.
This is issued by the keyboardjs module with 2.4.1 version, not sure what would be the optimal workaround this? If you check the package.json of the keyboardjs Github It's using the version 2.4.1 aswell.
My package json line for the 2.4.1 version of keyboardjs
#bower_components/keyboardjs": "RobertWHurst/KeyboardJS#2.4.1",
What is contained in the package.json file is irrelevant. If you are using a git URL you have to provide something that references a commit.
You can see on the tags page that the tag is called v2.4.1. So:
RobertWHurst/KeyboardJS#v2.4.1
// ^

How to install a bison/flex syntax highlighter?

for my flex and bison files I am looking for a syntax highlighter.
I am trying to get this to run: http://ccode.tistory.com/77 :
I downloaded the .jar file
and followed the instructions File/import Adding jars to a Eclipse PlugIn
But nothing changed.
Can somebody explain to me how to install it?
Use the instructions in this answer to install the jar file.
After doing this and restarting eclipse, .y files should be opened with the Bison editor provided by the plugin, and syntax-highlighted.

How to define Gradle's home in IDEA?

I am trying to import a Gradle project into IntelliJ, and when I get to the Gradle Home textbox, it is not automatically populated, nor will typing in the path of Gradle Home result in a valid location - I have the GRADLE_USER_HOME environment variable set (to what I think is!) the correct path, and I have been able to successfully import this same project into Eclipse. Any suggestions?
You can write a simple gradle script to print your GRADLE_HOME directory.
task getHomeDir {
doLast {
println gradle.gradleHomeDir
}
}
and name it build.gradle.
Then run it with:
gradle getHomeDir
If you installed with homebrew, use brew info gradle to find the base path (i.e. /usr/local/Cellar/gradle/1.10/), and just append libexec.
The same task in Kotlin in case you use build.gradle.kts:
tasks.register("getHomeDir") {
println("Gradle home dir: ${gradle.gradleHomeDir}")
}
Installed on a Mac via Homebrew, the path
/usr/local/opt/gradle/libexec
is preferable to
/usr/local/Cellar/gradle/X.X/libexec
since the former will survive version upgrades.
If you installed gradle with homebrew, then the path is:
/usr/local/Cellar/gradle/X.X/libexec
Where X.X is the version of gradle (currently 2.1)
If you are using IntelliJ, just do the following.
Close the project
(re)Open the project
you will see "Import gradle project" message on the right bottom. click.
select "Use default gradle wrapper". not "Use local gradle distribution"
That's all.
This is what helped me solve the problem of not having Gradle home set for the IDEA when importing a Gradle project.
THREE OPTIONS -- (A) Default Wrapper (B) "gradle 'wrapper' task configuration" OR (C) "local gradle distribution" defined by jetbrains: https://www.jetbrains.com/help/idea/gradle-settings.html
A. Default Wrapper (recommended)
If you are able, select this recommended option. If it is grayed out, see option C, which should then set your default for all subsequent projects.
B. Gradle 'Wrapper' Task Configuration
If you want IDEA to define your gradle version for you from your build script
Set this option if you define your gradle build versions as a task within your actual gradle build.
Example below from jetbrains: https://www.jetbrains.com/help/idea/gradle-settings.html
(useful if you do not want to share gradle builds between projects)
C. Local Gradle Distribution
1. Run the following command to get gradle location:
brew info gradle (if gradle was installed with homebrew)
2. You are looking for something like this:
/usr/local/Cellar/gradle/4.8.1
3. Next, append 'libexec' to the gradle location you just found:
/usr/local/Cellar/gradle/4.8.1/libexec
This is because "libexec is to be used by other daemons and system utilities executed by other programs" (i.e. IDEA). Please see https://unix.stackexchange.com/questions/312146/what-is-the-purpose-of-usr-libexec
4. Finally, put that new path in the Gradle home input box if IDEA prompts you.
IDEA should now have allowed you to hit OK
C:\Users\<_username>\.gradle\wrapper\dists\gradle-<_version>-all\<_number_random_maybe>\gradle-<_version>
\Android studio\gradle didn't worked for me.
And "Default gradle wrapper" wasn't configured while importing (cloning) the project from bitbucket
If it causes problem to figure out the path, here is my path :
C:\Users\prabs\.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx\gradle-5.4.1
This is instruction for MAC only.
I had the same problem. I solved it by configuring $GRADLE_HOME in .bash_profile. Here's how you do it:
Open .bash_profile (usually it's located in the user’s home directory).
Add the following lines to update $PATH variable:
export GRADLE_HOME=/usr/local/opt/gradle/libexec
export PATH=$GRADLE_HOME/bin:$PATH
Save it.
Apply your changes by running
source .bash_profile
I wrote my own article with instruction in a case if somebody will encounter the same problem.
On a mac it should ideally be at : /Applications/Android Studio.app/Contents/gradle/gradle-2.14.1
(Replace the version string with the latest)
AFAIK it is GRADLE_HOME not GRADLE_USER_HOME (see gradle installation http://www.gradle.org/installation).
On the other hand I played a bit with Gradle support in Idea 13 Cardea and I think the gradle home is not automatically discover by Idea. If so you can file a issue in youtrack.
Also, if you use gradle 1.6+ you can use the Graldle support for setting the build and wrapper. I think idea automatically discover the wrapper based gradle project.
$ gradle setupBuild --type java-library
$ gradle wrapper
Note: Supported library types: basic, maven, java
Regards
If you're using MacPorts, the path is
/opt/local/share/java/gradle
I had to setup the Project SDK before selecting gradle path. Once that was set correctly, I had to choose "Use default gradle wrapper (recommended) in "Import Project from Gradle" dialog.
Still works if I remove gradle using brew:
$ brew remove gradle
This is where my gradle home is (Arch Linux):
/usr/share/java/gradle/
I had some weird errors where it could not find my class, I had to right click on my src folder (was red) to "Make Directory as" -> Source Folder Root
Click New -> Project from existing sources -> Import gradle project...
Then Idea recognized gradle automatically.
I couldn't get it to accept my Gradle JVM selection until I deleted a broken JDK
Th window below is from File -> Other Settings -> Structure For New Projects...
I had a red 1.8 JDK SDK entry here, once I deleted that Gradle JVM error below disappeared and I could move on to the next step
In case you are using Mac, most probably your gradle home should be /usr/local/gradle-2.0 for example.
In preference of IDEA search for gradle and set gradle home as given above.
It should work

How do you set up Gradle properly and create a new Gradle project for IntelliJ IDEA?

So, I downloaded Gradle but I don't know how to set it up correctly. After I unzipped the zip file, what do I do next? I want to use Gradle in IntelliJ IDEA. From a livestream I've seen I know that there's a settings.gradle and a build.gradle file in the project folder in IntelliJ.
Also, I've seen that they used the windows console.
First of all, how do I access gradle through the windows console and tell it to generate a new project for IntelliJ?
As you can see, I don't have any experience with Gradle. Unfortunately I can't really find out how to use it.
I want the IntelliJ project then to have LWJGL and Slick.
Additionally, I know what it says in the build.gradle file I've seen on the livestream (I only want to create my project with the same structure like theirs).
Can anybody give a detailed description of what to do to achieve all this?
Lets' say you unpacked gradle to d:\tools\gradle.
To add its bin directory it to the PATH in a console window, execute the following command:
set PATH=d:\tools\gradle\bin;%PATH%
The above prepends the bin path to the current value of the PATH environment variable. This will only change the path for this specific command window.
If you want to add it to the PATH globally, then go to your control panel and choose System, then Advanced parameters (it might be something a little bit different: I'm translating from my French version of Windows). Then in the Advanced system parameters tab, click the button Environment variables.... Find the Path environment variable in the list, and add the directory, separated from the others using a semicolon (;).
Note: you can also define a new environment variable called GRADLE_HOME:
set GRADLE_HOME=d:\tools\gradle
or globally, as explained above, and reference it inside the PATH variable:
set PATH=%GRADLE_HOME%\bin;%PATH%
Just intall homebrew.
Then you can just open the terminal and install easy like:
brew install gradle
Done! It's installed!
For test just type in your terminal:
gradle -v
And you'll have something like this:
------------------------------------------------------------
Gradle 2.7
------------------------------------------------------------
Build time: 2015-09-14 07:26:16 UTC
Build number: none
Revision: xxxxxxxxxxxxxxxxxxxxxxxxxx
Groovy: 2.3.10
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_60 (Oracle Corporation 25.60-b23)
OS: Mac OS X 10.11.1 x86_64
Then, open your IntelliJ and create a new gradle project as normal, just setting the gradle's path when necessary (normally in /usr/local/Cellar when installed with homebrew or /opt when installed other ways).
Good luck!
For linux Users,
User SDK Man to easily manage your gradle installation and path settings for development as well as gradle update
GET SDK MAN HERE
(for mac os users) Let's assume, you unpacked zip file into /Users/onuryilmaz/gradle-3.3 folder. Then open terminal and define a new environment variable called GRADLE_HOME:
export GRADLE_HOME=/Users/onuryilmaz/gradle-3.3
After that reference it inside the PATH variable:
export PATH=$PATH:$GRADLE_HOME/bin
just update the brew and install and set path that's all
brew update && brew install gradle
export PATH=$PATH:/opt/gradle/gradle-5.1.1/bin
https://gradle.org/install/

IntelliJ bad plugin how to start

Hi I have just started using IntelliJ again and have version 9. I just installed the Mercurial plugin and now the ide won't start anymore.
Has an error of
Fatal error initializing class com.intellij.openapi.actionSystem.ActionManager:
java.lang.VerifyError: class com.dcx.hg.MercurialVcs overrides final method getName.()Ljava/lang/String;
I now know that I should be using the plugin hg4idea
Is there a way I can remove this plugin so I can start the ide, I am sure there must be..
Thanks in advance.
I am running on a Mac, the Plugin directory is located in ~/Library/Application Support/IntelliJIDEA60/ You can just delete the offending plugin. Note, depending on your edition of the IDE, the directory may be different. For example, IdeaIC2016.3
Version 11 for Windows stores plugins also in c:\Users\<username>\.IntelliJIdea11\config\plugins\ so delete plugins from that location as suggested by #duffymo.
If you look in the directory where you installed IntelliJ, you'll see a /plugins directory. Perhaps if you delete the Mercurial plugin folder you'll be able to restart the UI. Worth a try.
NOTE: Check here for OS/version related plugin path.
Ran into the same problem with another plugin. The solution was to remove the offending plugin folder or jar from the Plugins folder - see the exact location below for your OS.
The locations of the user plugins folder for different platforms are listed at https://intellij-support.jetbrains.com/entries/23358108-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs:
OSX
Configuration:
~/Library/Preferences/<PRODUCT><VERSION>
# e.g.:
~/Library/Preferences/IntelliJIdea14
Caches:
~/Library/Caches/<PRODUCT><VERSION>
Plugins:
~/Library/Application Support/<PRODUCT><VERSION>
Logs:
~/Library/Logs/<PRODUCT><VERSION>
Linux/Unix
~/.<PRODUCT><VERSION>
Windows
Windows Vista, 7, 8:
<SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>
Windows XP:
<SYSTEM DRIVE>\Documents and Settings\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>
Version 15 on Ubuntu:
cd ~/.IntelliJIdea15/config/plugins
rm -r <offending_plugin>
Just delete the plugin. In my MacOS, the path to the plugins folder is:
/Users/<username>/Library/Application Support/JetBrains/<your version>/plugins