bigfatony
2013-12-27 19:12:13 UTC
I am having trouble building my Grails 2.2.3 project from Groovy/Grails Tool
Suite. The war filename is dynamic and seems to be cached. The first build
will be fine, but any successive builds will have the previous filename. The
output war should be something like myapp-1.3-TEST-2013_12_02-11_31.war or
myapp-1.3-PRODUCTION-2013_12_02-12_00.war
The BuildConfig.groovy is as follows:
grails.project.war.file =
"target/${appName}-${appVersion}-${grails.util.Environment.current}-${new
Date().format('yyyy_MM_dd-HH_mm')}.war"
This problem does NOT exist if I build from the command line. I am using
Groovy/Grails Tool Suite Version 3.3.0.Release with build ID 201307091644.
Java version is 1.6. I am on a Windows 7 64 bit machine. I have also been
able to reproduce this issue using the latest GGTS (3.4.0) on Windows and a
co-worker has been able to reproduce the issue on Mac. I have discovered
that this issue did not exist when using GGTS 3.1.0 (based on Eclipse 4.2).
The issue is present on at least GGTS 3.3.0 (based on Eclipse 4.3) and up.
The first time I ever run "test war" the following is properly
generated/output:
Loading Grails 2.2.3
| Configuring classpath.
| Environment set to test.....
| Packaging Grails application..
| Compiling 179 source files
Note:
C:\Users\me\.grails\2.2.3\projects\myapp\plugins\cache-1.0.0\src\java\grails\plugin\cache\web\GenericResponseWrapper.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
| Compiling 179 source files..
| Compiling 31 source files.....
| Compiling 66 GSP files for package [myapp]..
| Compiling 4 GSP files for package [mail]..
| Building WAR file.....
| Done creating WAR target\myapp-1.3-TEST-2013_12_02-11_31.war
The second time I run "prod war" the following is incorrectly
generated/output:
Loading Grails 2.2.3
| Environment set to production.....
| Packaging Grails application.....
| Compiling 66 GSP files for package [myapp]..
| Compiling 4 GSP files for package [mail]..
| Building WAR file.....
| Done creating WAR target\myapp-1.3-TEST-2013_12_02-11_31.war
The environment and date/time is incorrect! A new war is generated in place
of the previous one, but with the previously environment and previous date!
Inspecting the war reveals that is a production war was generated (despite
the filename). Specifically I checked out the web.xml and observed that the
display-name has a value of /myapp-production-1.3.
I have also created a new dummy project and observed the issue in this new
dummy project as well.
Is anyone aware of a fix? Should this be reported in the STS/GGTS forum?
Thanks in advance!
Tony
--
View this message in context: http://grails.1312388.n4.nabble.com/grails-project-war-file-name-cached-tp4652848.html
Sent from the Grails - dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Suite. The war filename is dynamic and seems to be cached. The first build
will be fine, but any successive builds will have the previous filename. The
output war should be something like myapp-1.3-TEST-2013_12_02-11_31.war or
myapp-1.3-PRODUCTION-2013_12_02-12_00.war
The BuildConfig.groovy is as follows:
grails.project.war.file =
"target/${appName}-${appVersion}-${grails.util.Environment.current}-${new
Date().format('yyyy_MM_dd-HH_mm')}.war"
This problem does NOT exist if I build from the command line. I am using
Groovy/Grails Tool Suite Version 3.3.0.Release with build ID 201307091644.
Java version is 1.6. I am on a Windows 7 64 bit machine. I have also been
able to reproduce this issue using the latest GGTS (3.4.0) on Windows and a
co-worker has been able to reproduce the issue on Mac. I have discovered
that this issue did not exist when using GGTS 3.1.0 (based on Eclipse 4.2).
The issue is present on at least GGTS 3.3.0 (based on Eclipse 4.3) and up.
The first time I ever run "test war" the following is properly
generated/output:
Loading Grails 2.2.3
| Configuring classpath.
| Environment set to test.....
| Packaging Grails application..
| Compiling 179 source files
Note:
C:\Users\me\.grails\2.2.3\projects\myapp\plugins\cache-1.0.0\src\java\grails\plugin\cache\web\GenericResponseWrapper.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
| Compiling 179 source files..
| Compiling 31 source files.....
| Compiling 66 GSP files for package [myapp]..
| Compiling 4 GSP files for package [mail]..
| Building WAR file.....
| Done creating WAR target\myapp-1.3-TEST-2013_12_02-11_31.war
The second time I run "prod war" the following is incorrectly
generated/output:
Loading Grails 2.2.3
| Environment set to production.....
| Packaging Grails application.....
| Compiling 66 GSP files for package [myapp]..
| Compiling 4 GSP files for package [mail]..
| Building WAR file.....
| Done creating WAR target\myapp-1.3-TEST-2013_12_02-11_31.war
The environment and date/time is incorrect! A new war is generated in place
of the previous one, but with the previously environment and previous date!
Inspecting the war reveals that is a production war was generated (despite
the filename). Specifically I checked out the web.xml and observed that the
display-name has a value of /myapp-production-1.3.
I have also created a new dummy project and observed the issue in this new
dummy project as well.
Is anyone aware of a fix? Should this be reported in the STS/GGTS forum?
Thanks in advance!
Tony
--
View this message in context: http://grails.1312388.n4.nabble.com/grails-project-war-file-name-cached-tp4652848.html
Sent from the Grails - dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email