Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » [Solved] WAR files creation fail(Maven's mvn-clean-verify build failure for Scout Classic application)
[Solved] WAR files creation fail [message #1859227] Sun, 21 May 2023 14:42 Go to next message
J D is currently offline J DFriend
Messages: 100
Registered: February 2021
Senior Member
Hi there everyone,

I'm having trouble building my project and creating the WAR files necessary for deployment into Apache Tomcat.

When I run mvn-clean-verify in the root directory of my project, it first starts to warn me about finding duplicate and different classes in commons-logging:commons-logging:1.2, org.slf4j:jcl-over-slf4j:2.0.4][

I don't have much experience with Maven and I would very, very much appreciate your help in resolving this issue and creating my WAR files.

My environment:
Eclipse Scout:
23.1.14

java -version:
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu122.04.2)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu122.04.2, mixed mode, sharing)

node --version:
v18.13.0

pnpm -v:
8.5.1

Cheers,

JD


jd@jd-ThinkPad-T440s:~/eclipse-scout-ygapp-workspace/ygapp$ mvn clean verify
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] YGApp Root                                                      [pom]
[INFO] YGApp                                                           [pom]
[INFO] YGApp Shared                                                    [jar]
[INFO] YGApp Server                                                    [jar]
[INFO] YGApp Client                                                    [jar]
[INFO] YGApp Server Application                                        [war]
[INFO] YGApp Server Application (Development)                          [war]
[INFO] YGApp HTML UI                                                   [jar]
[INFO] YGApp HTML UI Application                                       [war]
[INFO] YGApp HTML UI Application (Development)                         [war]
[INFO] 
[INFO] ----------------< org.eclipse.scout.apps:ygapp-root >----------------
[INFO] Building YGApp Root 1.0.0-SNAPSHOT                             [1/10]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ ygapp-root ---
[INFO] 
[INFO] --- maven-enforcer-plugin:3.1.0:enforce (enforce-rules) @ ygapp-root ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.8:prepare-agent (default) @ ygapp-root ---
[INFO] master_test_jacocoArgLine set to -javaagent:/home/jd/.m2/repository/org/jacoco/org.jacoco.agent/0.8.8/org.jacoco.agent-0.8.8-runtime.jar=destfile=/home/jd/eclipse-scout-ygapp-workspace/ygapp/../target/jacoco-all.exec
[INFO] 
[INFO] --- maven-antrun-plugin:3.1.0:run (check-node-install) @ ygapp-root ---
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] 
[INFO] --- maven-antrun-plugin:3.1.0:run (check-npm-install-workspace) @ ygapp-root ---
[INFO] Executing tasks
[INFO]     [touch] Creating /home/jd/eclipse-scout-ygapp-workspace/ygapp/target/npm_update.marker
[INFO] Executed tasks
[INFO] 
[INFO] --- frontend-maven-plugin:1.12.1:install-node-and-npm (install-node-and-npm) @ ygapp-root ---
[INFO] Installing node version v18.12.1
[INFO] Unpacking /home/jd/.m2/repository/com/github/eirslett/node/18.12.1/node-18.12.1-linux-x64.tar.gz into /home/jd/eclipse-scout-ygapp-workspace/ygapp/target/node/../node/tmp
[INFO] Copying node binary from /home/jd/eclipse-scout-ygapp-workspace/ygapp/target/node/../node/tmp/node-v18.12.1-linux-x64/bin/node to /home/jd/eclipse-scout-ygapp-workspace/ygapp/target/node/../node/node
[INFO] Extracting NPM
[INFO] Installed node locally.
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:exec (install-node-tools) @ ygapp-root ---

added 176 packages, removed 14 packages, changed 74 packages, and audited 399 packages in 30s

53 packages are looking for funding
  run `npm fund` for details

1 high severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:exec (npm-run-version:snapshot:dependencies) @ ygapp-root ---
use given workspace root: /home/jd/eclipse-scout-ygapp-workspace/ygapp//..
updating version/dependency for module: @ygapp/root
updating version/dependency for module: undefined
updating version/dependency for module: @ygapp/ui
version:snapshot:dependencies done
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:exec (npm-run-version:release:dependencies) @ ygapp-root ---
[INFO] skipping execute as per configuration
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:exec (npm-run-version:release) @ ygapp-root ---
[INFO] skipping execute as per configuration
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:exec (npm-update) @ ygapp-root ---
Scope: all 3 projects
ygapp/target/node                     |  WARN  Moving @eclipse-scout/releng that was installed by a different package manager to "node_modules/.ignored
ygapp/target/node                     |  WARN  Moving npm that was installed by a different package manager to "node_modules/.ignored
ygapp/target/node                     |  WARN  Moving pnpm that was installed by a different package manager to "node_modules/.ignored
ygapp/ygapp.ui.html                | Progress: resolved 1, reused 0, downloaded 0, added 0
ygapp                                 | Progress: resolved 1, reused 0, downloaded 0, added 0
ygapp/target/node                     | Progress: resolved 1, reused 0, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 5, reused 4, downloaded 0, added 0
ygapp                                 | Progress: resolved 50, reused 2, downloaded 0, added 0
ygapp/target/node                     | Progress: resolved 2, reused 0, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 6, reused 5, downloaded 0, added 0
ygapp                                 | Progress: resolved 113, reused 2, downloaded 0, added 0
ygapp/target/node                     | Progress: resolved 86, reused 38, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 6, reused 6, downloaded 0, added 0
ygapp                                 | Progress: resolved 131, reused 130, downloaded 0, added 0
ygapp/target/node                     | Progress: resolved 140, reused 96, downloaded 0, added 0
ygapp                                 |   +7 -576 +--------------------------
Packages are hard linked from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/jd/.local/share/pnpm/store/v3
  Virtual store is at:             ygapp/target/node/node_modules/.pnpm
ygapp                                 | Progress: resolved 131, reused 130, downloaded 0, added 7, done
ygapp/target/node                     | Progress: resolved 162, reused 125, downloaded 0, added 0
ygapp/target/node                     | Progress: resolved 163, reused 126, downloaded 0, added 0
ygapp/target/node                     | +177 ++++++++++++++++++
ygapp/target/node                     | Progress: resolved 177, reused 136, downloaded 0, added 177, done
ygapp/ygapp.ui.html                | Progress: resolved 7, reused 6, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 217, reused 36, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 362, reused 248, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 517, reused 349, downloaded 0, added 0
ygapp/ygapp.ui.html                |  WARN  deprecated stable@0.1.8
ygapp/ygapp.ui.html                | Progress: resolved 658, reused 426, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 665, reused 433, downloaded 0, added 0
ygapp/ygapp.ui.html                | +646 ++++++++++++++++++++++++++++++++
ygapp/ygapp.ui.html                | Progress: resolved 668, reused 436, downloaded 0, added 0
ygapp/ygapp.ui.html                | Progress: resolved 668, reused 436, downloaded 0, added 380
ygapp/ygapp.ui.html                | Progress: resolved 668, reused 436, downloaded 0, added 646, done
Done in 15.8s
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:exec (pnpm-list) @ ygapp-root ---
Legend: production dependency, optional only, dev only

@ygapp/root@1.0.0-SNAPSHOT /home/jd/eclipse-scout-ygapp-workspace/ygapp (PRIVATE)

dependencies:
@eclipse-scout/eslint-config 23.1.1
eslint 8.27.0

Legend: production dependency, optional only, dev only

/home/jd/eclipse-scout-ygapp-workspace/ygapp/target/node

dependencies:
@eclipse-scout/releng 22.0.2
npm 9.6.7
pnpm 7.32.4

Legend: production dependency, optional only, dev only

@ygapp/ui@1.0.0-SNAPSHOT /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.ui.html

dependencies:
@eclipse-scout/chart 23.1.14
@eclipse-scout/core 23.1.14
jquery 3.6.0
[INFO] 
[INFO] --- exec-maven-plugin:3.1.0:exec (npm-run-version:snapshot) @ ygapp-root ---
[INFO] skipping execute as per configuration
[INFO] 
[INFO] --- maven-jar-plugin:3.3.0:test-jar (attach-tests) @ ygapp-root ---
[INFO] Skipping packaging of the test-jar
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ ygapp-root ---
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:test-jar-no-fork (attach-test-sources) @ ygapp-root ---
[INFO] 
[INFO] --- duplicate-finder-maven-plugin:1.5.1:check (default) @ ygapp-root ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[INFO] 
[INFO] ------------------< org.eclipse.scout.apps:ygapp >-------------------
[INFO] Building YGApp 1.0.0-SNAPSHOT                                  [2/10]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ ygapp ---
[INFO] 
[INFO] --- maven-enforcer-plugin:3.1.0:enforce (enforce-rules) @ ygapp ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.8:prepare-agent (default) @ ygapp ---
[INFO] master_test_jacocoArgLine set to -javaagent:/home/jd/.m2/repository/org/jacoco/org.jacoco.agent/0.8.8/org.jacoco.agent-0.8.8-runtime.jar=destfile=/home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp/../target/jacoco-all.exec
[INFO] 
[INFO] --- maven-jar-plugin:3.3.0:test-jar (attach-tests) @ ygapp ---
[INFO] Skipping packaging of the test-jar
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ ygapp ---
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:test-jar-no-fork (attach-test-sources) @ ygapp ---
[INFO] 
[INFO] --- duplicate-finder-maven-plugin:1.5.1:check (default) @ ygapp ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[INFO] 
[INFO] ---------------< org.eclipse.scout.apps:ygapp.shared >---------------
[INFO] Building YGApp Shared 1.0.0-SNAPSHOT                           [3/10]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ ygapp.shared ---
[INFO] Deleting /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/target
[INFO] 
[INFO] --- maven-enforcer-plugin:3.1.0:enforce (enforce-rules) @ ygapp.shared ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.8:prepare-agent (default) @ ygapp.shared ---
[INFO] master_test_jacocoArgLine set to -javaagent:/home/jd/.m2/repository/org/jacoco/org.jacoco.agent/0.8.8/org.jacoco.agent-0.8.8-runtime.jar=destfile=/home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/../target/jacoco-all.exec
[INFO] 
[INFO] --- build-helper-maven-plugin:3.3.0:add-source (add-source) @ ygapp.shared ---
[INFO] Source directory: /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/src/generated/java added.
[INFO] 
[INFO] --- maven-resources-plugin:3.3.0:resources (default-resources) @ ygapp.shared ---
[INFO] Copying 4 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ ygapp.shared ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 449 source files to /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/target/classes
[INFO] 
[INFO] --- jandex-maven-plugin:3.0.5:jandex (make-index) @ ygapp.shared ---
[INFO] Saving Jandex index: /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/target/classes/META-INF/jandex.idx
[INFO] 
[INFO] --- maven-resources-plugin:3.3.0:testResources (default-testResources) @ ygapp.shared ---
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ ygapp.shared ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ ygapp.shared ---
[INFO] 
[INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ ygapp.shared ---
[INFO] Building jar: /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/target/ygapp.shared-1.0.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-jar-plugin:3.3.0:test-jar (attach-tests) @ ygapp.shared ---
[INFO] Building jar: /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/target/ygapp.shared-1.0.0-SNAPSHOT-tests.jar
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ ygapp.shared ---
[INFO] Building jar: /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/target/ygapp.shared-1.0.0-SNAPSHOT-sources.jar
[INFO] 
[INFO] --- maven-source-plugin:3.2.1:test-jar-no-fork (attach-test-sources) @ ygapp.shared ---
[INFO] Building jar: /home/jd/eclipse-scout-ygapp-workspace/ygapp/ygapp.shared/target/ygapp.shared-1.0.0-SNAPSHOT-test-sources.jar
[INFO] 
[INFO] --- duplicate-finder-maven-plugin:1.5.1:check (default) @ ygapp.shared ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different classes in [commons-logging:commons-logging:1.2, org.slf4j:jcl-over-slf4j:2.0.4]:
[WARNING]   org.apache.commons.logging.Log
[WARNING]   org.apache.commons.logging.LogConfigurationException
[WARNING]   org.apache.commons.logging.LogFactory
[WARNING]   org.apache.commons.logging.impl.NoOpLog
[WARNING]   org.apache.commons.logging.impl.SimpleLog
[WARNING] Found duplicate classes/resources in compile classpath.
[WARNING] Found duplicate and different classes in [commons-logging:commons-logging:1.2, org.slf4j:jcl-over-slf4j:2.0.4]:
[WARNING]   org.apache.commons.logging.Log
[WARNING]   org.apache.commons.logging.LogConfigurationException
[WARNING]   org.apache.commons.logging.LogFactory
[WARNING]   org.apache.commons.logging.impl.NoOpLog
[WARNING]   org.apache.commons.logging.impl.SimpleLog
[WARNING] Found duplicate classes/resources in runtime classpath.
[WARNING] Found duplicate and different classes in [commons-logging:commons-logging:1.2, org.slf4j:jcl-over-slf4j:2.0.4]:
[WARNING]   org.apache.commons.logging.Log
[WARNING]   org.apache.commons.logging.LogConfigurationException
[WARNING]   org.apache.commons.logging.LogFactory
[WARNING]   org.apache.commons.logging.impl.NoOpLog
[WARNING]   org.apache.commons.logging.impl.SimpleLog
[WARNING] Found duplicate classes/resources in test classpath.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for YGApp Root 1.0.0-SNAPSHOT:
[INFO] 
[INFO] YGApp Root ...................................... SUCCESS [ 55.222 s]
[INFO] YGApp ........................................... SUCCESS [  0.067 s]
[INFO] YGApp Shared .................................... FAILURE [  8.692 s]
[INFO] YGApp Server .................................... SKIPPED
[INFO] YGApp Client .................................... SKIPPED
[INFO] YGApp Server Application ........................ SKIPPED
[INFO] YGApp Server Application (Development) .......... SKIPPED
[INFO] YGApp HTML UI ................................... SKIPPED
[INFO] YGApp HTML UI Application ....................... SKIPPED
[INFO] YGApp HTML UI Application (Development) ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:04 min
[INFO] Finished at: 2023-05-21T16:10:05+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.basepom.maven:duplicate-finder-maven-plugin:1.5.1:check (default) on project ygapp.shared: Found duplicate classes/resources! -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ygapp.shared
jd@jd-ThinkPad-T440s:~/eclipse-scout-ygapp-workspace/ygapp$ 

[Updated on: Thu, 25 May 2023 14:10]

Report message to a moderator

Re: WAR files creation fail [message #1859239 is a reply to message #1859227] Mon, 22 May 2023 03:05 Go to previous messageGo to next message
Matthias OtterbachFriend
Messages: 55
Registered: August 2015
Location: Munich
Member
It seems like your ygapp.shared is failing complaining about duplicate classes. What dependencies are listed (directly) in the pom.xml of this project?
Re: WAR files creation fail [message #1859242 is a reply to message #1859239] Mon, 22 May 2023 08:29 Go to previous messageGo to next message
J D is currently offline J DFriend
Messages: 100
Registered: February 2021
Senior Member
Thanks a lot for your reply Matthias. Here is the pom.xml in question:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.eclipse.scout.apps</groupId>
    <artifactId>ygapp</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <relativePath>../ygapp</relativePath>
  </parent>

  <artifactId>ygapp.shared</artifactId>

  <name>YGApp Shared</name>

  <dependencies>
    <dependency>
      <artifactId>org.eclipse.scout.rt.shared</artifactId>
      <groupId>org.eclipse.scout.rt</groupId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.scout.rt</groupId>
      <artifactId>org.eclipse.scout.rt.shared.test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jul-to-slf4j</artifactId>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
    </dependency>  
	<!-- Villes de France -->	
	<!-- https://github.com/DevLab-umontp/Librairie-Java-Villes-de-France -->
	<dependency>
	  <groupId>com.github.devlab-umontp</groupId>
	  <artifactId>villes-et-departements-de-france</artifactId>
	  <version>1.1.0</version>
	</dependency>

	<!-- Scout charting dependency -->
	<dependency>
	  <groupId>org.eclipse.scout.rt</groupId>
	  <artifactId>org.eclipse.scout.rt.chart.shared</artifactId>
	</dependency>
  </dependencies>
</project>


Cheers,

JD

[Updated on: Mon, 22 May 2023 08:31]

Report message to a moderator

Re: WAR files creation fail [message #1859246 is a reply to message #1859242] Mon, 22 May 2023 11:50 Go to previous messageGo to next message
Matthias OtterbachFriend
Messages: 55
Registered: August 2015
Location: Munich
Member
I would take a closer look at your dependency:

	<dependency>
	  <groupId>com.github.devlab-umontp</groupId>
	  <artifactId>villes-et-departements-de-france</artifactId>
	  <version>1.1.0</version>
	</dependency>


This one provides itself an dependency to com.opencsv:opencsv which again depends on commons-beanutils:commons-beanutils which depends on commons-logging:commons-logging. The last one however conflicts with org.slf4j:jcl-over-slf4j (jcl standing for Jakarta Commons Logging).

You might be able to get around it by using (not sure):

	<dependency>
	  <groupId>com.github.devlab-umontp</groupId>
	  <artifactId>villes-et-departements-de-france</artifactId>
	  <version>1.1.0</version>
               <exclusions>
                <exclusion>
                   <groupId>commons-logging</groupId>
                   <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
	</dependency>


But there may also be more conflicting dependencies.
Re: WAR files creation fail [message #1859272 is a reply to message #1859246] Thu, 25 May 2023 14:09 Go to previous message
J D is currently offline J DFriend
Messages: 100
Registered: February 2021
Senior Member
Hi there Matthias,

Thanks a lot for your advice. After inserting the exclusions, I'm now able to build the project and generate the WAR files.

Cheers,

JD
Previous Topic:Build Failing at Ant Step for UI
Next Topic:Persistent session (e.g. with cookies)
Goto Forum:
  


Current Time: Wed May 08 08:54:27 GMT 2024

Powered by FUDForum. Page generated in 0.04263 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top