Grails4 url-mappings broken? - grails

Is the url-mappings-report broken?
$ grails -v
| Grails Version: 4.0.0
| JVM Version: 11.0.3
$ grails create-app --profile rest-api UrlMappingsTest
$ cd UrlMappingsTest
$ grails url-mappings-report
| Error Command [url-mappings-report] error: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-5.1.1-bin.zip'. (Use --stacktrace to see the full trace)
Do you confirm you have the same result (if so, is this a known bug)? Or is there something wrong on my end?

Related

Install specific version of a plugin with install-plugin command

I cant see examples of how to do this:
https://jenkins.io/doc/book/managing/plugins/
I backup a list of all plugins installed and their versions.
I want to use install-plugin command to install all plugins (and their specific versions) from the list.
I dont see option to specify version to install-plugin command
To install a specific version you can run the command and pass a parameter with a colon like this:
install-plugins.sh git:3.9.1
or alternatively add the list of plugins to a file (plugins.txt for instance):
git:3.9.1
saml:1.0.7
and run it with the following command:
install-plugins.sh plugins.txt
You can download jar file from here: https://github.com/jenkinsci/plugin-installation-manager-tool
$ rm -rf /usr/share/jenkins/plugins/ldap*
$ ls /usr/share/jenkins/plugins/ldap*
ls: cannot access '/usr/share/jenkins/plugins/ldap*': No such file or directory
$ echo $JAVA_OPTS
-Djenkins.install.runSetupWizard=false
$ java $JAVA_OPTS -jar /opt/jenkins-plugin-manager-2.12.8.jar --plugins ldap:2.7
Done
$ ls /usr/share/jenkins/plugins/ldap*
/usr/share/jenkins/plugins/ldap.jpi
$ echo "http://<jenkins-url>/restart"
http://<jenkins-url>/restart
$ ls /usr/share/jenkins/plugins/ldap*
/usr/share/jenkins/plugins/ldap.jpi
/usr/share/jenkins/plugins/ldap:
META-INF WEB-INF
$ cat /usr/share/jenkins/plugins/ldap/META-INF/MANIFEST.MF
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: rsandell
Build-Jdk: 1.8.0_211
Extension-Name: ldap
Specification-Title: The Jenkins Plugins Parent POM Project
Implementation-Title: ldap
Implementation-Version: 2.7
Group-Id: org.jenkins-ci.plugins
Short-Name: ldap
Long-Name: LDAP Plugin
Url: https://github.com/jenkinsci/ldap-plugin
Compatible-Since-Version: 1.16
Minimum-Java-Version: 1.8
Plugin-Version: 2.7
Hudson-Version: 2.277.1
Jenkins-Version: 2.277.1
Plugin-Dependencies: mailer:1.34
Plugin-Developers:
Plugin-License-Name: The MIT license
Plugin-License-Url: https://opensource.org/licenses/MIT
Plugin-ScmUrl: https://github.com/jenkinsci/ldap-plugin

How to get the ZFTool working?

The ZFTool isn't working (anymore) on my Debian VM.
$ which zf
/usr/local/bin/zf
$ ls -lia /usr/local/bin/ | grep "zf"
... zf -> /usr/share/.composer/vendor/bin/zf.php
$ cd /usr/share/.composer
$ composer info | grep "zftool"
zendframework/zftool v0.1.0 Utility module for Zend Framework 2 applications.
$ echo $COMPOSER_HOME
/usr/share/.composer
Now when I start it:
$ zf create module Foo
OR
$ $COMPOSER_HOME/vendor/bin/zf.php create module Foo
OR
$ php $COMPOSER_HOME/vendor/bin/zf.php create module Foo
I get this error:
Reason for failure: Invalid arguments or no arguments provided
So I cannot run the ZFTool jobs like config, classmap generate etc.
What is the issues caused by and how to get the ZFTool working?
You're simply providing incorrect arguments as it says. That error is coming from withing ZF2 so you're triggering it, but there's There's no -h option.
try
./vendor/zendframework/zftool/zf.php
or
./vendor/bin/zf.php
no arguments and from within your root directory, you'll get a list of options.

Grails: command not found with Travis-CI

I want to use Travis-CI with my Grails 3.0.9 app. For this I created a .travis.yml file:
language: groovy
jdk:
- oraclejdk7
before_install:
- curl -s get.sdkman.io | bash
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk install grails 3.0.9
- sdk default grails 3.0.9
script: grails test-app --stacktrace
When the Travis-CI service wants to build my application, it ends up with this error:
$ export GRAILS_HOME=/home/travis/.sdkman/candidates/grails/3.0.9/
$ export PATH=$PATH:$GRAILS_HOME/bin
$ ./gradlew assemble
...
(downloading a lot of gradle dependencies)
...
BUILD SUCCESSFUL
$ grails test-app
/home/travis/build.sh: line 45: grails: command not found
So do I have to install Grails somehow else or is it because of a missing/wrong path variable?
I've found a working .travis.yml here:
language: groovy
jdk:
- oraclejdk7
before_install:
- curl -s http://get.sdkman.io | bash
- echo sdkman_auto_answer=true > ~/.sdkman/etc/config
- source "/home/travis/.sdkman/bin/sdkman-init.sh"
- sdk install grails 3.0.9
script: grails test-app --stacktrace
Update:
Use get.sdkman.io since get.gvmtool.net doesn't work anymore.

Install grails on ubuntu 13.10 amd64

I am new to use grails and i use amd64's ubuntu 13.10 . When i use gvm to install grails 2.3.2 successfully then type grails create-app test in my bash, it will appear to be some errors as follow:
Loading Grails 2.3.2
Error Error executing script sun.reflect.GeneratedConstructorAccessor1 cannot access
its superclass sun.reflect.ConstructorAccessorImpl
(Use --stacktrace to see the full trace)
When I just type grails,it will appears so errors:
Loading Grails 2.3.2
| Error java.lang.reflect.InvocationTargetException
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error at java.lang.reflect.Method.invoke(Method.java:606)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:235)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:263)
| Error Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor1 cannot access its superclass sun.reflect.ConstructorAccessorImpl
| Error at sun.misc.Unsafe.defineClass(Native Method)
| Error at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
| Error at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
| Error at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
| Error at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:94)
| Error at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:48)
| Error at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
| Error at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
...
I also use gvm to install groovy, but when i type groovy, it also has errors.
what's wrong about it ?
Please execute and allow Permission to the entire Grails folder like this one
Make grails executable have the right permission by just typing
`sudo chmod u+x /grailsdirectory/./grails`
`sudo chmod u+x grails-2.3.4 `
`chmod -R 777 /Your/folder/path/`
If you just want to make the files read and write assign permission to 766 instead.
Dude please re-install grails as follow :
sudo add-apt-repository ppa:groovy-dev/grails
sudo apt-get update
sudo apt-get install grails-ppa
to add grails 2.3.0 //in my case
sudo apt-get install grails 2.3.0
Then Don't forget to set permission to grails folder and executable also and Add the nessary environemnt varibles :
your JAVA_HOME directory setting
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.xx
#your GRAILS_HOME directory setting
export GRAILS_HOME=~/grails-1.0-RC2
#your PATH setting to append the Grails bin directory
export PATH=$PATH:$GRAILS_HOME/bin
And , groovy and grails zip package can also be downloaded and extracted to a folder that you want , thens setpermission and then Open or Insatll STS configure grails and groovy thier and ENVIRONEMNTVARIABLES to run grails from Command Line then That is all pretty simple trust me!
Usefull links :
Usefull Links:

Possible Neo4j bug

I am using
Ubuntu 12.04
Neo4j - Graph Database Kernel 2.0.0-M04
javac 1.7.0_25
java version "1.7.0_25
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Even though, I am using Oracle Java, I was getting warning:
"WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7."
When I debug utils file in neo4j directory, I found a function with following comment:
# check if running JDK 6, warn if not
checkjvmcompatibility() {
$JAVACMD -version 2>&1 | egrep -q "Java HotSpot\\(TM\\) (64-Bit Server|Client) VM"
if [ $? -eq 1 ]
then
echo "WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7."
else
$JAVACMD -version 2>&1 | egrep -q "java version \"1.7"
if [ $? -eq 1 ]
then
echo "WARNING! You are using an unsupported version of the Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7."
fi
fi
}
Some confusion :
comment of function shows that it is checking for java 6 but error message displayed use 'echo' shows that you are not using java run time 7.
So actually what Java is being expected by neo4j ?
I was using Oracle-Java-1.7 still it was throwing me error not using Oracle-Java1.7 .
Thanks
Amit Aggarwal
Neo4j 2.0 is supposed to run with Java 7 only. I guess the comment in the script is misleading. Please make JAVA_HOME points to the right directory. On linux this is not necessary valid if java -version shows version 7.
JAVA_HOME=/usr/lib/jvm/java-7-oracle
To check which version Neo4j is actually using run
grep "JVM information" -A 5 <neo4j_dir>/data/graph.db/messages.log
It is a bug, I got
ERROR! Neo4j cannot be started using java version 1.7.0_25.
...
http://localhost:7474/ is ready.
So it seems to start up OK, even though it gives this error message.

Resources