jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Sonar
  • SONAR-1261

Improve the script to build war file in order to prevent any use of locally installed ANT version

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.12
  • Component/s: Infrastructure
  • Labels:
    None

Description

email from John Klingler on the Sonar mailing list :

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=

Issue Links

relates to

Improvement - An improvement or enhancement to an existing feature or task. SONAR-1609 In the build.xml script used to package the war file, the property "webxml" should be defined on the "war" task

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Freddy Mallet added a comment - 08/Nov/09 8:35 AM

Here are the two scripts to modify :

http://svn.codehaus.org/sonar/trunk/sonar-application/src/main/assembly/war/build-war.bat
http://svn.codehaus.org/sonar/trunk/sonar-application/src/main/assembly/war/build-war.sh

Show
Freddy Mallet added a comment - 08/Nov/09 8:35 AM Here are the two scripts to modify : http://svn.codehaus.org/sonar/trunk/sonar-application/src/main/assembly/war/build-war.bat http://svn.codehaus.org/sonar/trunk/sonar-application/src/main/assembly/war/build-war.sh
Hide
Permalink
Sascha Scholz added a comment - 25/Nov/09 3:46 AM

I have the same problem on Linux and could it only solve by adding webxml="build/sonar-web/WEB-INF/web.xml" to the war task in build.xml.

The problem occurs both with ant-1.7.0 and ant-1.6.5.

I now get a warning, but the war is successfully created:

[war] Warning: selected war files include a WEB-INF/web.xml which will be ignored (please use webxml attribute to war task)

Show
Sascha Scholz added a comment - 25/Nov/09 3:46 AM I have the same problem on Linux and could it only solve by adding webxml="build/sonar-web/WEB-INF/web.xml" to the war task in build.xml. The problem occurs both with ant-1.7.0 and ant-1.6.5. I now get a warning, but the war is successfully created: [war] Warning: selected war files include a WEB-INF/web.xml which will be ignored (please use webxml attribute to war task)
Hide
Permalink
Simon Brandhof added a comment - 27/Nov/09 3:26 AM

Sascha, which version of sonar did you try ?

Show
Simon Brandhof added a comment - 27/Nov/09 3:26 AM Sascha, which version of sonar did you try ?
Hide
Permalink
Tuomas Kiviaho added a comment - 31/May/10 10:09 AM

I am using 2.1.2 and go the same error. I see that the script is in place but it didn't help. placing webxml="sonar-server/WEB-INF/web.xml" to the war creation of build.xml solved the problem and didn't make any further warnings.

Show
Tuomas Kiviaho added a comment - 31/May/10 10:09 AM I am using 2.1.2 and go the same error. I see that the script is in place but it didn't help. placing webxml="sonar-server/WEB-INF/web.xml" to the war creation of build.xml solved the problem and didn't make any further warnings.
Hide
Permalink
Freddy Mallet added a comment - 03/Jun/10 4:23 AM

Hi Tuomas, I've created a new JIRA ticket (SONAR-1609) to add the definition of the property "webxml" in the build.xml file.

Show
Freddy Mallet added a comment - 03/Jun/10 4:23 AM Hi Tuomas, I've created a new JIRA ticket (SONAR-1609) to add the definition of the property "webxml" in the build.xml file.

People

  • Assignee:
    Freddy Mallet
    Reporter:
    Freddy Mallet
Vote (0)
Watch (0)

Dates

  • Created:
    08/Nov/09 8:31 AM
    Updated:
    03/Jun/10 4:23 AM
    Resolved:
    12/Nov/09 3:03 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.