Giter VIP home page Giter VIP logo

grails-wrapper's Introduction

Grails Wrapper

Build Status

grails-wrapper's People

Contributors

abcfy2 avatar cosenmarco avatar jameskleeh avatar puneetbehl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grails-wrapper's Issues

Grails Wrapper Fails on Redirect to HTTPS

Discovered during grails/grails-core#11825

With the $HOME/.grails/wrapper cache I can run the ./grailsw locally or in our pipelines and everything works, but when there is no cache and the grailsw is run for the first time I receive this message:

You must be connected to the internet the first time you use the Grails wrapper
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>".
        at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
        at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1471)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1685)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2883)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
        at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
        at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
        at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:324)
        at java.xml/javax.xml.parsers.SAXParser.parse(SAXParser.java:197)
        at grails.init.Start.getVersion(Start.java:36)
        at grails.init.Start.main(Start.java:83)

grailsWrapperVersion is added to gradle.properties (3.3.8)

Symptom discovered during migration of web-application from Grails v2.4.4 to v3.3.5, symptom still present in Grails v3.3.8.

Task List

  • Steps to reproduce provided
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. create a Grails app (symptom is also present for plugins etc.)
$ grails create-app my-app
  1. commit create-app to version control, ex. using Git.
my-app$ git init
my-app$ git add .
my-app$ git commit --message="grails create-app my-app"
  1. execute a Gradle/Grails command, ex. -version where side-effects are unexpected (symptom is also present for create-service etc.)
my-app$ ./grailsw -version
| Grails Version: 3.3.8
| Groovy Version: 2.4.7
| JVM Version: 1.8.0_172
  1. now gradle.properties has been modified.
my-app$ git status 
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   gradle.properties
my-app$ git diff gradle.properties
diff --git a/gradle.properties b/gradle.properties
index df75075..c19fdd5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,3 +1,5 @@
+#Sat Dec 01 14:08:20 CET 2018
 grailsVersion=3.3.8
+grailsWrapperVersion=1.0.0
 gormVersion=6.1.10.RELEASE
 gradleWrapperVersion=3.5

Expected Behaviour

gradle.properties isn't expected to be modified by Gradle/Grails after initial create-app.

The Grails wrapper is expected to be self-contained, ie. it's unexpected that redundant configuration leaks into gradle.properties.
In my experience the grailsWrapperVersion isn't needed in-order for Gradle/Grails wrapper to function as expected.

Actual Behaviour

gradle.properties is modified by Gradle/Grails, se also Steps to Reproduce

Work-around(s)

A. explicitly add the grailsWrapperVersion=1.0.0 to gradle.properties and commit.

B. mark gradle.properties as readonly.

Environment Information

  • Operating System: Ubuntu 16.04 (64-bit)
  • Grails Version: 3.3.8
  • JDK Version: OpenJDK Runtime Environment (Zulu 8.30.0.1-linux64) (build 1.8.0_172-b01)

Problem behind a proxy

Hi @jameskleeh ,

I am running grails 3.2.6 behind a proxy. I am trying to run grailsw.bat wrapper
I got the following mistake:
You must be connected to the internet the first time you use the Grails wrapper java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.URL.openStream(Unknown Source) at grails.init.Start.getVersion(Start.java:34) at grails.init.Start.main(Start.java:79)

I am running the code on a Windows 7 64 bits.

It looks like the problem is coming from this line.

I tried to set proxy settings manually by running:
grailsw.bat -Dhttp.proxyHost=http://myproxy.com -Dhttp.proxyPort=8080 but without success.

Any clue?

grails version lookup error

RunCommand expects a gradle.properties containing a grailsVersion property in the working directory.

this is wrong in various scenarios, including:

  • gradle.properties does not exist at all because user prefers to set the versions directly in build.gradle
  • multi-project builds where only the root project contains gradle.properties but the app is launched from its submodule directory (which again is mandatory for correct exploded multi-module reloading)

i think it would be ok to use a wrapper with a static grails version - just like gradle does for gradlew?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.