Grails 1.3.4 plugin downloading issues - grails

I am running application on grails 1.3.4 but I am getting this error while running applicaton.
Base Directory: /projects/upwork/jhon/jbilling-community-3.1.0_2
WARNING: Configurational method [inherits] in grails-app/conf/BuildConfig.groovy doesn't exist. Ignoring..
Resolving dependencies...
Dependencies resolved in 804ms.
Running script /apps/grails-1.3.4/scripts/RunApp.groovy
Environment set to development
Plugin [release-2.2.1] not installed. ...
Plugin [release-1.0.0] not installed. ...
Plugin [rest-client-builder-1.0.3] not installed. ...
Resolving new plugins. Please wait... ...
Installing zip /Users/bilalshah/.ivy2/cache/org.grails.plugins/release/zips/release-2.2.1.zip... ...
[mkdir] Created dir: /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
[unzip] Expanding: /Users/bilalshah/.ivy2/cache/org.grails.plugins/release/zips/release-2.2.1.zip into /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
Installed plugin release-2.2.1 to location /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1. ...
Plugin release-2.2.1 requires version [2.0 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails.
[delete] Deleting directory /Users/bilalshah/.grails/1.3.4/projects/jbilling-community-3.1.0_2/plugins/release-2.2.1
Process finished with exit code 1
I haven't mentioned any plugin named above in my application.properties file. Here it is:
#Grails Metadata file
#Wed Jun 15 19:34:11 PKT 2016
app.grails.version=1.3.4
app.name=jbilling
app.servlet.version=2.4
app.version=community-3.1.0
plugins.cookie=0.2
plugins.cxf=0.5.1
plugins.hibernate=1.3.4
plugins.include=0.3
plugins.jquery=1.11.1
plugins.jquery-ui=1.8.7
plugins.log4j-xml=0.2
plugins.remote-pagination=0.2.4
plugins.remoting=1.1
plugins.spring-security-core=1.0.1
plugins.tomcat=1.3.4
plugins.webflow=1.3.8
Can anyone let me know why it is happening and its solution.

Related

Karma not running in Jenkins CI, Cannot find module 'karma-jasmine'

I'm setting up an Angular 4 SPA with automatic testing in Jenkins CI. The SPA is part of a larger, Maven-managed project, so the build is also Maven-managed. So far I've:
Installed the NodeJS plugin on Jenkins, using install from nodejs.org with version 8.6.0
Configured "Global npm packages to install" = "karma-cli phantomjs-prebuilt jasmine-core karma-jasmine karma-phantomjs-launcher karma-junit-reporter karma-coverage"
Added the "maven-karma-plugin" in pom.xml with browsers=PhantomJS / singleRun=true / reporters=dots,junit
Enabled "Provide Node & npm bin/ folder to PATH" on the Jenkins job configuration
The build process starts up quite ok, but eventually I get:
[INFO] --- maven-karma-plugin:1.6:start (default) # webclient ---
[INFO] Executing Karma Test Suite ...
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/karma start /var/lib/jenkins/workspace/funnel_build/webclient/karma.conf.js --browsers PhantomJS --reporters dots,junit --single-run
07 10 2017 17:07:52.801:ERROR [config]: Error in config file!
{ Error: Cannot find module 'karma-jasmine'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at module.exports (/var/lib/jenkins/workspace/funnel_build/webclient/karma.conf.js:9:7)
at Object.parseConfig (/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/karma/lib/config.js:410:5)
The npm install at the very beginning of the build logs:
$ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/npm install -g karma-cli phantomjs-prebuilt jasmine-core karma-jasmine karma-phantomjs-launcher karma-junit-reporter karma-coverage
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/karma -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/karma-cli/bin/karma
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/phantomjs -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/bin/phantomjs
> phantomjs-prebuilt#2.1.15 install /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt
> node install.js
Considering PhantomJS found at /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/phantomjs
Looks like an `npm install -g`
Could not link global install, skipping...
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1507388835905/phantomjs-2.1.1-linux-x86_64 -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
npm WARN karma-jasmine#1.1.0 requires a peer of karma#* but none was installed.
npm WARN karma-junit-reporter#1.2.0 requires a peer of karma#>=0.9 but none was installed.
npm WARN karma-phantomjs-launcher#1.0.4 requires a peer of karma#>=0.9 but none was installed.
+ karma-phantomjs-launcher#1.0.4
+ karma-coverage#1.1.1
+ karma-jasmine#1.1.0
+ karma-cli#1.0.1
+ karma-junit-reporter#1.2.0
+ jasmine-core#2.8.0
+ phantomjs-prebuilt#2.1.15
updated 7 packages in 10.553s
(The reason the package 'karma' is currently not on the list is that I read somewhere that karma-cli should be used in place of karma. Adding the 'karma' package doesn't change anything, however.)
Any idea why that "Cannot find module 'karma-jasmine'" pops up? In (2) you'll see that the karma-jasmine package is listed, I find it on the server, but still it's not found by the NodeJS plugin.
Thanks, Simon
I managed to get it to work by running "npm install" as part of the build process, and then run everything on local npm packages.
The entire setup is described here: https://funneltravel.wordpress.com/2017/10/16/running-karma-with-maven-on-jenkins-ci/

Error: The following plugins failed to load due to missing dependencies:

I updated a plugin to use cxf 2.0.3 - previously the plugin was using cxf 1.4.7.
Following is the updated buildconfig of the plugin.
plugins {
// starting with Grails 2.3 the tomcat plugin is not updated/released along with Grails, so hard code version
build(":tomcat:2.2.5",
":release:2.2.1",) {
export = false
}
compile ":cxf-client:2.0.3"
}
When my application tries to load the plugin, I get the following error.
I tried using the plugin on an existing project and new project and still get the error.
|Loading Grails 2.5.3
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
....
|Compiling 1 source files
..........................................................Error
|
Error: The following plugins failed to load due to missing dependencies: [msApi]
- Plugin: msApi
- Dependencies:
! cxf-client (Required: 1.4.7, Found: 2.0.3) [INVALID]
Process finished with exit code 1
Is there some cache file I need to delete?
Search for string: "1.4.7" in whole plugin project f.e. by grep -rn "1.4.7" and you will find all occurences of this string in project (and then you will decide to change it or to delete such a file from result).

Creating Ldap Plug ii Grails 2.3

I'm trying to move my project from Grails 2.2.4 to Grails 2.3.5, and I need some plugins, one of them is Ldap's. To access to my repository I have an URL:
grailsRepo "http:// svn................"
and my dependency resolver is maven
an Y have this code after:
plugins {
// plugins for the build system only
build ":tomcat:7.0.50"
// plugins for the compile step
compile ":scaffolding:2.0.1"
compile ':cache:1.1.1'
// plugins needed at runtime but not for compilation
runtime ":hibernate:3.6.10.7"// or ":hibernate4:4.1.11.6" or hibernate:3.6.10.7
runtime ":database-migration:1.3.8"
runtime ":jquery:1.10.2.2"
runtime ":resources:1.2.1"
compile ":ldap:0.8.3.2"
}
and I got the next error
The following artifacts could not be resolved: org.grails.plugins:ldap:zip:0.8.3.2, org.grails.plugins:spring-security-ldap-dcas:zip:1.0.6: Could not find artifact org.grails.plugins:ldap:zip:0.8.3.2 in grailsCentral (http://repo.grails.org/grails/plugins)
|Run 'grails dependency-report' for further information.
It looks like the latest version of the ldap plugin is 0.8.2 - see http://grails.org/plugin/ldap
If this is a custom build that's in your local repo, try switching to the ivy resolver

Grails Release plugin is not deploying plugin on a remote maven repository

I'm having problems to deploy a plugin with the command maven-deploy on a remote repo.
I installed the latest version of the Release plugin (2.0.2).
I get this error:
| Loading Grails 2.0.4
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Compiling 33 GSP files for package [myPackage].....
| Plugin packaged grails-plugin-myPlugin.jar
| Skipping POM generation because 'pom.xml' exists in the root of the project..
| Error Error executing script MavenDeploy: : Error downloading wagon provider from the remote repository: Missing:
----------
1) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) unspecified:unspecified:jar:0.0
2) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2
----------
1 required artifact is missing.
for artifact:
unspecified:unspecified:jar:0.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
(Use --stacktrace to see the full trace)
Thanks for your help
I had the same problem and could handle it this way:
Install Maven2
Configure proxy as described here
This is enough to solve your problem.
If your maven server requires authentication you can proceed as described here or here
~/.m2/settings.xml:
<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxyserver.mydomain.com</host>
<port>8080</port>
<username>user</username>
<password>pass</password>
<nonProxyHosts>*.bla.com.br|*.blabla.biz</nonProxyHosts>
</proxy>
</proxies>
<servers>
<server>
<id>myrepo</id>
<username>user</username>
<password>pass</password>
</server>
</servers>
</settings>
This looks like a Maven issue:
Maven fails to download a required dependency
org.apache.maven.wagon:wagon-http:jar:1.0-beta-2 from
http://repo1.maven.org/maven2
Since the required artifact can be found in Maven central this may be a result of a networking issue
I found a workaround for this issue. Since something tries to retrieve wagon-http dependency using deprecated http maven repository url, we can manually preinstall this dependency in our local repository:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get -Dartifact=org.apache.maven.wagon:wagon-http:1.0-beta-2 -Dpackaging=jar -DrepoUrl=https://repo1.maven.org/maven2
After that publish-plugin command should work.
Possible fix for that issue would be upgrade grails-release plugin to v3.1.3(didn't work for me): link

Grails/Gradle Plugin for Grails 2.0

I'm trying to use the grails-gradle plugin with grails version 2.0. Here is my build script:
buildscript {
repositories {
mavenRepo url: "http://repo.grails.org/grails/core/"
}
dependencies {
classpath "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT",
"org.grails:grails-bootstrap:2.0.0"
}
grailsVersion="2.0.0"
}
apply plugin: "grails"
repositories {
mavenCentral()
mavenRepo url: "http://repo.grails.org/grails/core/"
}
dependencies {
compile "org.grails:grails:2.0.0",
"org.grails:grails-core:2.0.0",
"org.grails:grails-crud:2.0.0",
"org.grails:grails-datastore-core:1.0.2.RELEASE",
"org.grails:grails-datastore-gorm:1.0.2.RELEASE",
"org.grails:grails-hibernate:2.0.0",
"org.grails:grails-logging:2.0.0"
}
The dependencies at the bottom of the script are different than the original "1.3.4" located here. When I use this script to create a grails project with gradle grails-init it works correctly, creating the project. When I try to use gradle grails-run-app I receive the following errors:
~>gradle grails-run-app
:grails-run-app
| Configuring classpath
| Error log4j:WARN No appenders could be found for logger (org.springframework.core.io.support.PathMatchingResourcePatternResolver).
| Error log4j:WARN Please initialize the log4j system properly.
| Error log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
| Compiling 38 source files
| Compiling 8 source files.....
| Error Error: The following plugins failed to load due to missing dependencies: [hibernate]
- Plugin: hibernate
- Dependencies:
! dataSource (Required: 2.0 > *, Found: Not Installed) [INVALID]
- i18n (Required: 2.0 > *, Found: 2.0.0)
- core (Required: 2.0 > *, Found: 2.0.0)
- domainClass (Required: 2.0 > *, Found: 2.0.0)
I'm assuming that this means I'm missing a dependency, but I have no idea what dependency. It looks like hibernate is the culprit, but I have included the grails hibernate jar above. The list of jars between the two versions of grails are different, so I'm not sure which should be included (or maybe there isn't one and this will not work). The list of dependencies can be see here.
Any help resolving these errors would be much appreciated.
Using:
gradle 1.0, milestone-7 & grails 2.0.0
NOTE: the dependency "org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT" is a local copy of the tip revision from github.
Thanks a lot. This is a very helpful thread, to answer your question, you need to add "org.grails:grails-plugin-datasource:2.0.1" on compile, it solved the problem on my machine.
Looks like you're missing a few dependencies... Check Gradle / Grails application for a complete example of how to do this.
Hope this helps!

Resources