
|
Problems building war
Hello. I'm having trouble building the WAR for Sonar 1.11.1 though this has been an issue for me since 1.10. My java version is 1.6.0_11 although I don't think that's necessarily related to this issue.
The output of the build-war script is: Buildfile: build.xml
clean:
war:
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web [copy] Copying 1518 files to C:\sonar-1.11.1\war\build\sonar-web
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\data [copy] Copying 24 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\lib
[copy] Copying 27 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions [copy] Copied 9 empty directories to 1 empty directory under C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions
[copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes [copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes
[war] Building war: C:\sonar-1.11.1\war\sonar.war
BUILD FAILED C:\sonar-1.11.1\war\build.xml:38: webxml attribute is required
Total time: 1 minute 28 seconds
Line 38 is "<war destfile="sonar.war">". If I change it to "<war destfile="sonar.war" webxml="sonar-web\WEB-INF\web.xml">", then the build finishes successfully, but I have the following messages:
[war] Building war: C:\sonar-1.11.1\war\sonar.war [war] Warning: selected war files include a WEB-INF/web.xml which will be
ignored (please use webxml attribute to war task) [echo] sonar.war is built.
If I deploy the WAR, it works just fine despite the warning. Changing line 38 to "<war destfile="sonar.war" webxml="build\sonar-web\WEB-INF\web.xml">" yields the same result. Changing it to "<war destfile="sonar.war" webxml="WEB-INF\web.xml">" gives me the error "Deployment descriptor: C:\sonar-1.11.1\war\WEB-INF\web.xml does not exist.", which it doesn't - I was just covering the bases.
Has anyone else seen this? I found 0 results on the mail archives and JIRA for anything containing "webxml". Unless I'm missing something, it seems like a trivial fix.
|

|
Re: Problems building war
Hello John, Looks very strange. Can you start from scratch ? Unzip the 1.11.1 in a fresh directory, copy any plugin / extension you need, copy your sonar.property and run the command again. Olivier
On Thu, Nov 5, 2009 at 3:51 PM, John Klingler <jfklingler@...> wrote:
Hello. I'm having trouble building the WAR for Sonar 1.11.1 though this has been an issue for me since 1.10. My java version is 1.6.0_11 although I don't think that's necessarily related to this issue.
The output of the build-war script is: Buildfile: build.xml
clean:
war:
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web [copy] Copying 1518 files to C:\sonar-1.11.1\war\build\sonar-web
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\data [copy] Copying 24 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\lib
[copy] Copying 27 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions [copy] Copied 9 empty directories to 1 empty directory under C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions
[copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes [copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes
[war] Building war: C:\sonar-1.11.1\war\sonar.war
BUILD FAILED C:\sonar-1.11.1\war\build.xml:38: webxml attribute is required
Total time: 1 minute 28 seconds
Line 38 is "<war destfile="sonar.war">". If I change it to "<war destfile="sonar.war" webxml="sonar-web\WEB-INF\web.xml">", then the build finishes successfully, but I have the following messages:
[war] Building war: C:\sonar-1.11.1\war\sonar.war [war] Warning: selected war files include a WEB-INF/web.xml which will be
ignored (please use webxml attribute to war task) [echo] sonar.war is built.
If I deploy the WAR, it works just fine despite the warning. Changing line 38 to "<war destfile="sonar.war" webxml="build\sonar-web\WEB-INF\web.xml">" yields the same result. Changing it to "<war destfile="sonar.war" webxml="WEB-INF\web.xml">" gives me the error "Deployment descriptor: C:\sonar-1.11.1\war\WEB-INF\web.xml does not exist.", which it doesn't - I was just covering the bases.
Has anyone else seen this? I found 0 results on the mail archives and JIRA for anything containing "webxml". Unless I'm missing something, it seems like a trivial fix.
|

|
Re: Problems building war
Same result. I tried it again without adding any plugins or changing any configuration - same result. I do have Ant 1.6.5 installed on the machine but sonar appears to be using it's own local version. I'll try removing ant from the system path (WinXP if it matters) to see if that makes any difference.
On Fri, Nov 6, 2009 at 2:40 AM, Olivier Gaudin <gaudol@...> wrote:
Hello John,
Looks very strange. Can you start from scratch ? Unzip the 1.11.1 in a fresh directory, copy any plugin / extension you need, copy your sonar.property and run the command again.
Olivier
On Thu, Nov 5, 2009 at 3:51 PM, John Klingler <jfklingler@...> wrote:
Hello. I'm having trouble building the WAR for Sonar 1.11.1 though this has been an issue for me since 1.10. My java version is 1.6.0_11 although I don't think that's necessarily related to this issue.
The output of the build-war script is: Buildfile: build.xml
clean:
war:
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web [copy] Copying 1518 files to C:\sonar-1.11.1\war\build\sonar-web
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\data [copy] Copying 24 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\lib
[copy] Copying 27 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions [copy] Copied 9 empty directories to 1 empty directory under C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions
[copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes [copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes
[war] Building war: C:\sonar-1.11.1\war\sonar.war
BUILD FAILED C:\sonar-1.11.1\war\build.xml:38: webxml attribute is required
Total time: 1 minute 28 seconds
Line 38 is "<war destfile="sonar.war">". If I change it to "<war destfile="sonar.war" webxml="sonar-web\WEB-INF\web.xml">", then the build finishes successfully, but I have the following messages:
[war] Building war: C:\sonar-1.11.1\war\sonar.war [war] Warning: selected war files include a WEB-INF/web.xml which will be
ignored (please use webxml attribute to war task) [echo] sonar.war is built.
If I deploy the WAR, it works just fine despite the warning. Changing line 38 to "<war destfile="sonar.war" webxml="build\sonar-web\WEB-INF\web.xml">" yields the same result. Changing it to "<war destfile="sonar.war" webxml="WEB-INF\web.xml">" gives me the error "Deployment descriptor: C:\sonar-1.11.1\war\WEB-INF\web.xml does not exist.", which it doesn't - I was just covering the bases.
Has anyone else seen this? I found 0 results on the mail archives and JIRA for anything containing "webxml". Unless I'm missing something, it seems like a trivial fix.
-- John Klingler jfklingler@...
|

|
Re: Problems building war
Hello John, I would expect you need ant 1.7+. Olivier
On Fri, Nov 6, 2009 at 5:02 PM, John Klingler <jfklingler@...> wrote:
Same result. I tried it again without adding any plugins or changing any configuration - same result. I do have Ant 1.6.5 installed on the machine but sonar appears to be using it's own local version. I'll try removing ant from the system path (WinXP if it matters) to see if that makes any difference.
On Fri, Nov 6, 2009 at 2:40 AM, Olivier Gaudin <gaudol@...> wrote:
Hello John,
Looks very strange. Can you start from scratch ? Unzip the 1.11.1 in a fresh directory, copy any plugin / extension you need, copy your sonar.property and run the command again.
Olivier
On Thu, Nov 5, 2009 at 3:51 PM, John Klingler <jfklingler@...> wrote:
Hello. I'm having trouble building the WAR for Sonar 1.11.1 though this has been an issue for me since 1.10. My java version is 1.6.0_11 although I don't think that's necessarily related to this issue.
The output of the build-war script is: Buildfile: build.xml
clean:
war:
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web [copy] Copying 1518 files to C:\sonar-1.11.1\war\build\sonar-web
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\data [copy] Copying 24 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\lib
[copy] Copying 27 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions [copy] Copied 9 empty directories to 1 empty directory under C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions
[copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes [copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes
[war] Building war: C:\sonar-1.11.1\war\sonar.war
BUILD FAILED C:\sonar-1.11.1\war\build.xml:38: webxml attribute is required
Total time: 1 minute 28 seconds
Line 38 is "<war destfile="sonar.war">". If I change it to "<war destfile="sonar.war" webxml="sonar-web\WEB-INF\web.xml">", then the build finishes successfully, but I have the following messages:
[war] Building war: C:\sonar-1.11.1\war\sonar.war [war] Warning: selected war files include a WEB-INF/web.xml which will be
ignored (please use webxml attribute to war task) [echo] sonar.war is built.
If I deploy the WAR, it works just fine despite the warning. Changing line 38 to "<war destfile="sonar.war" webxml="build\sonar-web\WEB-INF\web.xml">" yields the same result. Changing it to "<war destfile="sonar.war" webxml="WEB-INF\web.xml">" gives me the error "Deployment descriptor: C:\sonar-1.11.1\war\WEB-INF\web.xml does not exist.", which it doesn't - I was just covering the bases.
Has anyone else seen this? I found 0 results on the mail archives and JIRA for anything containing "webxml". Unless I'm missing something, it seems like a trivial fix.
--
|

|
Re: Problems building war
Removing the ANT_HOME environment variable did the trick. I didn't even think about it since build-war.bat is calling ant in the internal ant 1.7 distribution. The ant.bat however looks for the ANT_HOME environment variable, which was pointing my 1.6.5 distribution. So the bundled ant 1.7 is only used if you don't have ANT_HOME defined (or it's already pointing at 1.7+ distribution). I modified the build-war script to force use of the bundled ant and it seems to work:
set ORIG_ANT_HOME=%ANT_HOME% set ANT_HOME=%CD%\apache-ant-1.7.0
call apache-ant-1.7.0\bin\ant
set ANT_HOME=%ORIG_ANT_HOME% set ORIG_ANT_HOME=
On Fri, Nov 6, 2009 at 10:17 AM, Olivier Gaudin <gaudol@...> wrote:
Hello John,
I would expect you need ant 1.7+.
Olivier
On Fri, Nov 6, 2009 at 5:02 PM, John Klingler <jfklingler@...> wrote:
Same result. I tried it again without adding any plugins or changing any configuration - same result. I do have Ant 1.6.5 installed on the machine but sonar appears to be using it's own local version. I'll try removing ant from the system path (WinXP if it matters) to see if that makes any difference.
On Fri, Nov 6, 2009 at 2:40 AM, Olivier Gaudin <gaudol@...> wrote:
Hello John,
Looks very strange. Can you start from scratch ? Unzip the 1.11.1 in a fresh directory, copy any plugin / extension you need, copy your sonar.property and run the command again.
Olivier
On Thu, Nov 5, 2009 at 3:51 PM, John Klingler <jfklingler@...> wrote:
Hello. I'm having trouble building the WAR for Sonar 1.11.1 though this has been an issue for me since 1.10. My java version is 1.6.0_11 although I don't think that's necessarily related to this issue.
The output of the build-war script is: Buildfile: build.xml
clean:
war:
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web [copy] Copying 1518 files to C:\sonar-1.11.1\war\build\sonar-web
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\data [copy] Copying 24 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\lib
[copy] Copying 27 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions [copy] Copied 9 empty directories to 1 empty directory under C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions
[copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes [copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes
[war] Building war: C:\sonar-1.11.1\war\sonar.war
BUILD FAILED C:\sonar-1.11.1\war\build.xml:38: webxml attribute is required
Total time: 1 minute 28 seconds
Line 38 is "<war destfile="sonar.war">". If I change it to "<war destfile="sonar.war" webxml="sonar-web\WEB-INF\web.xml">", then the build finishes successfully, but I have the following messages:
[war] Building war: C:\sonar-1.11.1\war\sonar.war [war] Warning: selected war files include a WEB-INF/web.xml which will be
ignored (please use webxml attribute to war task) [echo] sonar.war is built.
If I deploy the WAR, it works just fine despite the warning. Changing line 38 to "<war destfile="sonar.war" webxml="build\sonar-web\WEB-INF\web.xml">" yields the same result. Changing it to "<war destfile="sonar.war" webxml="WEB-INF\web.xml">" gives me the error "Deployment descriptor: C:\sonar-1.11.1\war\WEB-INF\web.xml does not exist.", which it doesn't - I was just covering the bases.
Has anyone else seen this? I found 0 results on the mail archives and JIRA for anything containing "webxml". Unless I'm missing something, it seems like a trivial fix.
--
-- John Klingler jfklingler@...
|

|
Re: Problems building war
Hi John,
Thanks
Freddy On Fri, Nov 6, 2009 at 6:15 PM, John Klingler <jfklingler@...> wrote:
Removing the ANT_HOME environment variable did the trick. I didn't even think about it since build-war.bat is calling ant in the internal ant 1.7 distribution. The ant.bat however looks for the ANT_HOME environment variable, which was pointing my 1.6.5 distribution. So the bundled ant 1.7 is only used if you don't have ANT_HOME defined (or it's already pointing at 1.7+ distribution). I modified the build-war script to force use of the bundled ant and it seems to work:
set ORIG_ANT_HOME=%ANT_HOME% set ANT_HOME=%CD%\apache-ant-1.7.0
call apache-ant-1.7.0\bin\ant
set ANT_HOME=%ORIG_ANT_HOME% set ORIG_ANT_HOME=
On Fri, Nov 6, 2009 at 10:17 AM, Olivier Gaudin <gaudol@...> wrote:
Hello John,
I would expect you need ant 1.7+.
Olivier
On Fri, Nov 6, 2009 at 5:02 PM, John Klingler <jfklingler@...> wrote:
Same result. I tried it again without adding any plugins or changing any configuration - same result. I do have Ant 1.6.5 installed on the machine but sonar appears to be using it's own local version. I'll try removing ant from the system path (WinXP if it matters) to see if that makes any difference.
On Fri, Nov 6, 2009 at 2:40 AM, Olivier Gaudin <gaudol@...> wrote:
Hello John,
Looks very strange. Can you start from scratch ? Unzip the 1.11.1 in a fresh directory, copy any plugin / extension you need, copy your sonar.property and run the command again.
Olivier
On Thu, Nov 5, 2009 at 3:51 PM, John Klingler <jfklingler@...> wrote:
Hello. I'm having trouble building the WAR for Sonar 1.11.1 though this has been an issue for me since 1.10. My java version is 1.6.0_11 although I don't think that's necessarily related to this issue.
The output of the build-war script is: Buildfile: build.xml
clean:
war:
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web [copy] Copying 1518 files to C:\sonar-1.11.1\war\build\sonar-web
[mkdir] Created dir: C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\data [copy] Copying 24 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\lib
[copy] Copying 27 files to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions [copy] Copied 9 empty directories to 1 empty directory under C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes\extensions
[copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes [copy] Copying 1 file to C:\sonar-1.11.1\war\build\sonar-web\WEB-INF\classes
[war] Building war: C:\sonar-1.11.1\war\sonar.war
BUILD FAILED C:\sonar-1.11.1\war\build.xml:38: webxml attribute is required
Total time: 1 minute 28 seconds
Line 38 is "<war destfile="sonar.war">". If I change it to "<war destfile="sonar.war" webxml="sonar-web\WEB-INF\web.xml">", then the build finishes successfully, but I have the following messages:
[war] Building war: C:\sonar-1.11.1\war\sonar.war [war] Warning: selected war files include a WEB-INF/web.xml which will be
ignored (please use webxml attribute to war task) [echo] sonar.war is built.
If I deploy the WAR, it works just fine despite the warning. Changing line 38 to "<war destfile="sonar.war" webxml="build\sonar-web\WEB-INF\web.xml">" yields the same result. Changing it to "<war destfile="sonar.war" webxml="WEB-INF\web.xml">" gives me the error "Deployment descriptor: C:\sonar-1.11.1\war\WEB-INF\web.xml does not exist.", which it doesn't - I was just covering the bases.
Has anyone else seen this? I found 0 results on the mail archives and JIRA for anything containing "webxml". Unless I'm missing something, it seems like a trivial fix.
--
--
|