buildWar failed with reporting modules checked

Hi,
i’m trying to deploy (single war mode) to local company tomcat server using this guide

[url=]https://doc.cuba-platform.com/manual-6.2/build.gradle_buildWar.html[/url]

i have extendend the sample-sales sample application with report support (only 1 simple report) and other stuff

when i try build application with this gradle task

task buildWar(type: CubaWarBuilding) {
appHome = ‘.’
webXmlPath = ‘modules/web/web/WEB-INF/single-war-web.xml’
}

gradle return this errore

gradlew buildWar
:app-core:assembleDbScripts UP-TO-DATE
:app-core:dbScriptsArchive
:app-global:compileJava

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all dependencies for configuration ‘:app-global:compile’.

Could not resolve com.haulmont.reports:reports-global:6.2.0.
Required by:
com.company.sales:app-global:0.1-SNAPSHOT
Could not resolve com.haulmont.reports:reports-global:6.2.0.
Could not get resource ‘https://repo.cuba-platform.com/content/groups/premium/com/haulmont/reports/reports-global/6.2.0/reports-global-6.2.0.pom’.
Could not HEAD ‘https://repo.cuba-platform.com/content/groups/premium/com/haulmont/reports/reports-global/6.2.0/reports-global-6.2.0.pom’. Received status code 401 from server: Unauthorized

if i remove this module from the project everything work fine

Any suggests?
Saro

1 Like

Hi Saro,

the reports add on is a premium addon. The server response code in the error message: 401 Unauthorized indicates that you have to pass your premium account credentials to the gradle binary in order to make it work. Here’s an example:

./gradlew buildWar -PpremiumRepoUser=1234567890 -PpremiumRepoPass=1234567890

.

More information about this can be found in the docs.

Bye,
Mario

2 Likes

Hi Mario,
thanks for the quick response

I received a temporary license ( validity of a month) in order to try all the features of the platform , how can I run a full test (deploy application on production server) ?

regards
Saro

Trial licence is time-limited. You are able to use all the platform features during the trial period.

You can launch the "buildWar’ gradle-task from Studio. If you have registered the Studio using a licence key, the required credentials are filled automatically, so there is no need to type them.

To launch the gradle task from Studio:

  1. open the search panel by clicking on the icon (see the attached screenshot) or using the “Alt + /” shortcut
  2. start typing the name of the task
  3. choose the required task from the dropdown
  4. press Enter

RunTask

2 Likes

now work :slight_smile:

i run gradle task from Eclipse IDE instead of Cuba Studio features