grails / grails-wrapper Goto Github PK
View Code? Open in Web Editor NEWGrails Wrapper
License: Apache License 2.0
Grails Wrapper
License: Apache License 2.0
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)
Symptom discovered during migration of web-application from Grails v2.4.4 to v3.3.5, symptom still present in Grails v3.3.8.
$ grails create-app my-app
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"
-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
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
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.
gradle.properties
is modified by Gradle/Grails, se also Steps to Reproduce
A. explicitly add the grailsWrapperVersion=1.0.0
to gradle.properties
and commit.
B. mark gradle.properties
as readonly.
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?
Since the old repository is not available any longer (https://repo.grails.org/grails/core) my grails wrapper stopped working. The URL has changed to https://repo.grails.org/artifactory/core
Unfortunately this older URL is hardcoded in Start.java:
https://github.com/grails/grails-wrapper/blob/master/starter/src/main/java/grails/init/Start.java#L22
RunCommand
expects a gradle.properties
containing a grailsVersion
property in the working directory.
this is wrong in various scenarios, including:
build.gradle
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
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.