OHDSI Home | Forums | Wiki | Github

Did it work? WebAPI mvn warnings: [WARNING] The requested profile “{webapi-postgresql}” could not be activated

Is it because I have installed PostgreSQL15?

mvn cmd its output followed by versions of everything I installed for this project. Merci

Ubuntu 22.04 workstation.
firstuser@sandbox01:~/WebAPI$ mvn clean package -DskipUnitTests -DskipITtests -s WebAPIConfig/settings.xml -P {webapi-postgresql}
[INFO] Scanning for projects…
[INFO] --------------------------< org.ohdsi:WebAPI >--------------------------
[INFO] Building WebAPI 2.13.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO] — maven-clean-plugin:2.5:clean (default-clean) @ WebAPI —
[INFO] — git-commit-id-plugin:4.0.0:revision (default) @ WebAPI —
[INFO] — gmaven-plugin:1.5:execute (add-git-branch-info) @ WebAPI —
[INFO] — spring-boot-maven-plugin:1.5.22.RELEASE:build-info (default) @ WebAPI —
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ WebAPI —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/firstuser/WebAPI/src/main/resources
[INFO] skip non existing resourceDirectory /home/firstuser/WebAPI/src/main/resources
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ WebAPI —
[INFO] No sources to compile
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ WebAPI —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/firstuser/WebAPI/src/test/resources
[INFO] skip non existing resourceDirectory /home/firstuser/WebAPI/src/test/resources
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ WebAPI —
[INFO] No sources to compile
[INFO] — maven-surefire-plugin:2.18.1:test (default-test) @ WebAPI —
[INFO] Tests are skipped.
[INFO] — maven-failsafe-plugin:2.18.1:integration-test (default) @ WebAPI —
[INFO] Tests are skipped.
[INFO] — maven-war-plugin:3.3.1:war (default-war) @ WebAPI —
[INFO] Packaging webapp
[INFO] Assembling webapp [WebAPI] in [/home/firstuser/WebAPI/target/WebAPI]
[INFO] Processing war project
[INFO] Building war: /home/firstuser/WebAPI/target/WebAPI.war
[INFO] Packaging classes
[INFO] Building jar: /home/firstuser/WebAPI/target/WebAPI-classes.jar
[INFO] — spring-boot-maven-plugin:1.5.22.RELEASE:repackage (default) @ WebAPI —
[INFO] — miredot-plugin:2.2:restdoc (default) @ WebAPI —
Downloading from ohdsi: https://repo.ohdsi.org/nexus/content/groups/public/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
Downloaded from ohdsi: https://repo.ohdsi.org/nexus/content/groups/public/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar (53 kB at 137 kB/s)
[WARNING] Rest Framework not explicitly set, using JAX-RS by default.
[INFO] Building reflective model of API and reading annotations…
[ERROR] Your project doesn’t contain any REST interfaces, so no output will be generated.
Maybe it is incorrectly configured.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.869 s
[INFO] Finished at: 2023-07-14T14:07:21-04:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile “{webapi-postgresql}” could not be activated because it does not exist.

sudo update-alternatives --config java
[sudo] password for firstuser: 
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 
java -version
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-8u372-ga~us1-0ubuntu1~22.04-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)

mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_362, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux", version: "5.19.0-46-generic", arch: "amd64", family: "unix"

cd ~/WebAPI
git describe --tags

diff sample_settings.xml WebAPIConfig/settings.xml
<       <datasource.password>app1</datasource.password>
>       <datasource.password>*****</datasource.password>
<       <flyway.datasource.password>!PASSWORD!</flyway.datasource.password>
>       <flyway.datasource.password>*****</flyway.datasource.password>

dpkg -l | grep postgres
ii  postgresql                                 15+250.pgdg22.04+1                      all          object-relational SQL database (supported version)
ii  postgresql-15                              15.3-1.pgdg22.04+1                      amd64        The World's Most Advanced Open Source Relational Database
ii  postgresql-client-15                       15.3-1.pgdg22.04+1                      amd64        front-end programs for PostgreSQL 15
ii  postgresql-client-common                   250.pgdg22.04+1                         all          manager for multiple PostgreSQL client versions
ii  postgresql-common                          250.pgdg22.04+1        

Try to run again, but remove curly braces {} around the profile.

Wow, that’s embarassing. Thank you

That bit worked :slight_smile: Thank you for asking. Now I get an exception on deployment. About to post about that.