grails 2.4 - jquery not being included - grails

I'm trying to do the example from the Manning "Grails in Action": the gsp's
<g:javascript library="jquery" />
is becoming
<script src="/qotd/js/jquery/jquery-1.11.1.js" type="text/javascript" library="jquery"></script>
but that URL doesn't work. BuildConfig.groovy has
plugins {
//...
runtime ":jquery:1.11.1"
I might have missed a step in typing things in, or it might be a 2.3->2.4 Asset issue?

Related

Missing files (404) in Ionic App only in iOS

I have an app I developed in Android. I installed a VM with Mac, and I'm testing it in iOS. The app worked perfectly in Android, but in iOS it is not. When I use 'ionic serve' or 'ionic serve --lab' the browser show a white screen, and in the console I get this errors (link of image below):
Console
Here is some code from the index.html:
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="lib/ionic/css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/bluebird.min.js"></script>
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ionic.cloud.min.js"></script>
<script src="lib/ionic/js/ionic-modal-select.min.js"></script>
<script src="lib/ionic/js/ionic-toast.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="js/ng-cordova.min.js"></script>
<script src="cordova.js"></script>
I'm really lost here because the exact same files works OK for Android.
Which error you are posted, not library error.Error coming from app.js file.If you dont mind create a new ionic app and replace your file in new app.it will works.

Jenkins upload artifact to nexus plugin not working with Nexus 3

I have a Jenkins project that does a gradle build and uploads build artifacts to a Nexus maven hosted repository using the Jenkins upload artifact to nexus plugin. This was working fine when I was using Nexus 2.13 - but after upgrading to Nexus 3, the upload to Nexus is no longer working. I have made sure that I have configured Nexus 3 repository just like my Nexus 2.13 repository. When I build my Jenkins project I get a response
GroupId: com.company
ArtifactId: hello-world-util
Version: 1.0.0
File: hello-world-util-1.0.0.jar
Repository:companyDevops
Uploading artifact hello-world-util-1.0.0.jar started....
Reason Phrase: Method Not Allowed
<!DOCTYPE html>
<html>
<head>
<title>405 - Nexus Repository Manager</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--[if lt IE 9]>
<script>(new Image).src="http://192.168.99.100:18081/favicon.ico?3.0.1-01"</script>
<![endif]-->
<link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-32x32.png?3.0.1-01" sizes="32x32">
<link rel="mask-icon" href="http://192.168.99.100:18081/safari-pinned-tab.svg?3.0.1-01" color="#5bbad5">
<link rel="icon" type="image/png" href="http://192.168.99.100:18081/favicon-16x16.png?3.0.1-01" sizes="16x16">
<link rel="shortcut icon" href="http://192.168.99.100:18081/favicon.ico?3.0.1-01">
<meta name="msapplication-TileImage" content="http://192.168.99.100:18081/mstile-144x144.png?3.0.1-01">
<meta name="msapplication-TileColor" content="#00a300">
<link rel="stylesheet" type="text/css" href="http://192.168.99.100:18081/static/css/nexus-content.css?3.0.1-01"/>
</head>
<body>
<div class="nexus-header">
<a href="http://192.168.99.100:18081">
<div class="product-logo">
<img src="http://192.168.99.100:18081/static/images/nexus.png?3.0.1-01"/>
</div>
<div class="product-id">
<div class="product-id__line-1">
<span class="product-name">Nexus Repository Manager</span>
</div>
<div class="product-id__line-2">
<span class="product-spec">OSS 3.0.1-01</span>
</div>
</div>
</a>
</div>
<div class="nexus-body">
<div class="content-header">
<img src="http://192.168.99.100:18081/static/rapture/resources/icons/x32/exclamation.png?3.0.1-01"/>
<span class="title">Error 405</span>
<span class="description">Method Not Allowed</span>
</div>
<div class="content-body">
<div class="content-section">
HTTP method POST is not supported by this URL
</div>
</div>
</div>
</body>
</html>
My Jenkins nexus upload is configured like (and this has not changed between Nexus 2.13 and 3)
Upload artifact to nexus
Nexus Details
Protocol HTTP
Nexus URL 192.168.99.100:18081
User admin
Password admin123
Credentials com.company
GroupId com.company
ArtifactId hello-world-ui
Version 1.0.0
Packaging jar
Repository companyDevops
File build/libs/hello-world-util-1.0.0.jar
My Nexus 3 maven hosted repository is configured like
Name companyDevops
Format maven2
Type hosted
URL http://192.168.99.100:18081/repository/companyDevops/
Online
Maven 2
Version policy Release
Layout policy Strict
Storage
Blog store default
Strict content type validation X
Hosted
Deployment policy Allow redeploy
Not sure why I’m getting this error
-I’ve validated that the Nexus admin user has permission to upload artifacts
-I’ve validated that allow redeploy is enabled
What might be happening
-possibly the Jenkins ‘upload artifact to nexus’ plugin is not compatible with Nexus 3?
Has anyone got this to work with Nexus 3? Any suggestions?
Thanks!
Nexus Artifact Uploader plugin now supports Nexus-2.x & Nexus-3.x.
Support for Nexus-3.x with plugin version 2.6
https://wiki.jenkins-ci.org/display/JENKINS/Nexus+Artifact+Uploader
Please use "Nexus Artifact Uploader", below is the url and also support nexus 3 as well.
https://plugins.jenkins.io/nexus-artifact-uploader
After the installation of plugin, we would get nexus artifact uploader in build section.
This plugin doesn't support Nexus-3.x, We are working to provide capability uploading artifacts to Nexus-3.x

Phonegap / iOS - Unable to make inAppBrowser work

I've trying for some days to get inAppBrowser to work in a simple Phonegap App for iOS with no luck.
Nothing happens... No log con the console.log...
What I've done so far is:
Install inAppBrowser using: plugman --platform ios --project /path/to/app --plugin inappbrowser
If I try to install it using
phonegap plugin add
https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git
it says it's already installed, so I assume installation is OK.
Add the plugin call in the main config.xml file this way: <gap:plugin name="org.apache.cordova.inappbrowser" version="0.2.4" />
My index.html file looks like this:
<!DOCTYPE html>
<html>
<head>
<title>InAppBrowser Example</title>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for Cordova to load
//
document.addEventListener("deviceready", onDeviceReady, false);
// Cordova is ready
//
function onDeviceReady() {
var ref = window.open('http://apache.org', '_blank', 'location=yes');
}
</script>
</head>
<body>
Hello World
</body>
</html>
I understand, on launch, it should open the Apache home, or stay blank (because of Phonegap URL permissions), but it just shows up the "Hello World" text and nothing happens.
Any ideas of what am I doing wrong?
Thanks in advance, and sorry about my poor english!
Make sure you have the following in your config.xml:
I used to have org.apache.cordova.InAppBroweser - maybe from an older version and it caused issues.
Also make sure your config.xml (in your apk file) is created properly.

Should web components be placed under "web" folder?

Is the purpose to place web components under the web folder somewhere, or under the lib folder?
I'm asking because I'm unsure and it's not mentioned as far as I can tell.
Put your components under the lib directory.
lib/
control1.html
control2.html
control3.html
Let's say you configure your pubspec.yaml file and name your package 'my_controls'.
name: my_controls
dependencies:
html5lib: '>=0.3.1+2'
web_ui: '>=0.3.2'
Since your project now defines a package, you can reference files in your lib directory as:
<link rel="components" href="packages/my_controls/control1.html">
<link rel="components" href="packages/my_controls/control2.html">
<link rel="components" href="packages/my_controls/control3.html">
You can point to components:
<link rel="components" href="component/ui/login.html">
in which case your components are in web/component/
and in web/component/ui/
you have the login.html file

cometd javascript path to use with h:outputScript

I'm trying to configure CometD in my web application. This web application is the client of CometD, it uses JSF 2.0, primefaces 3.3.1 and run on glassfish. In this application this global var is undefined:
var cometd = $.cometd;
Probably the source of my problem is the linkage of javascript libraries:
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/jquery-1.7.2.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/json2.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/org/cometd.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/jquery.cometd.js"></script>
I know this is JSP way to import javascript files, but I simply don't know which path to use for h:outputScript...
PS. I just added this dependency for this module:
<dependency>
<groupId>org.cometd.javascript</groupId>
<artifactId>cometd-javascript-jquery</artifactId>
<version>2.4.3</version>
<type>war</type>
</dependency>
It was my fault, I didn't see that maven archetype created all javascripts files in a directory of the project...

Resources