signal-setup-guide icon indicating copy to clipboard operation
signal-setup-guide copied to clipboard

how to fix the error? thanks

Open hejinlong opened this issue 4 years ago • 12 comments

Server version:Signal-Server-5.31,Os version:Ubuntu 20.04,Apache Maven 3.6.3,Java version: 11.0.10

mvn install

[INFO] Results:
[INFO] 
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:3.1.1:jar (default-jar) @ redis-dispatch ---
[INFO] 
[INFO] --- maven-dependency-plugin:3.1.2:analyze-only (analyze) @ redis-dispatch ---
[WARNING] Used undeclared dependencies found:
[WARNING]    org.slf4j:slf4j-api:jar:1.7.30:compile
[WARNING]    junit:junit:jar:4.13:test
[WARNING] Unused declared dependencies found:
[WARNING]    org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[WARNING]    io.dropwizard:dropwizard-servlets:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-core:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-jdbi3:jar:2.0.13:compile
[WARNING]    javax.xml.bind:jaxb-api:jar:2.3.1:compile
[WARNING]    io.dropwizard:dropwizard-migrations:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-client:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-auth:jar:2.0.13:compile
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] TextSecureServer 1.0 ............................... SUCCESS [  2.097 s]
[INFO] redis-dispatch 5.31 ................................ FAILURE [  3.605 s]
[INFO] websocket-resources 5.31 ........................... SKIPPED
[INFO] gcm-sender-async 5.31 .............................. SKIPPED
[INFO] service 5.31 ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.091 s
[INFO] Finished at: 2021-04-21T19:43:07-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:analyze-only (analyze) on project redis-dispatch: Dependency problems found -> [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 :redis-dispatch

mvn -e -B package

[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   RemoteConfigsManagerTest.testUpdate » IllegalState Process [/tmp/embedded-pg/P...
[ERROR]   AbusiveHostRulesTest.testBlockedCidr » IllegalState Process [/tmp/embedded-pg/...
[ERROR]   AbusiveHostRulesTest.testBlockedHost » IllegalState Process [/tmp/embedded-pg/...
[ERROR]   AbusiveHostRulesTest.testInsertBlocked » IllegalState Process [/tmp/embedded-p...
[ERROR]   AbusiveHostRulesTest.testRestricted » IllegalState Process [/tmp/embedded-pg/P...
[ERROR]   AbusiveHostRulesTest.testUnblocked » IllegalState Process [/tmp/embedded-pg/PG...
[ERROR]   AccountsTest.testBreaker » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f1...
[ERROR]   AccountsTest.testDelete » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f15...
[ERROR]   AccountsTest.testMissing » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f1...
[ERROR]   AccountsTest.testOverwrite » IllegalState Process [/tmp/embedded-pg/PG-12c02d3...
[ERROR]   AccountsTest.testRetrieve » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f...
[ERROR]   AccountsTest.testRetrieveFrom » IllegalState Process [/tmp/embedded-pg/PG-12c0...
[ERROR]   AccountsTest.testStore » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f154...
[ERROR]   AccountsTest.testStoreMulti » IllegalState Process [/tmp/embedded-pg/PG-12c02d...
[ERROR]   AccountsTest.testUpdate » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f15...
[ERROR]   AccountsTest.testVacuum » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f15...
[ERROR]   PendingAccountsTest.testOverwrite » IllegalState Process [/tmp/embedded-pg/PG-...
[ERROR]   PendingAccountsTest.testOverwriteWithPushToken » IllegalState Process [/tmp/em...
[ERROR]   PendingAccountsTest.testRemove » IllegalState Process [/tmp/embedded-pg/PG-12c...
[ERROR]   PendingAccountsTest.testRetrieve » IllegalState Process [/tmp/embedded-pg/PG-1...
[ERROR]   PendingAccountsTest.testRetrieveWithPushChallenge » IllegalState Process [/tmp...
[ERROR]   PendingAccountsTest.testStore » IllegalState Process [/tmp/embedded-pg/PG-12c0...
[ERROR]   PendingAccountsTest.testStoreWithPushChallenge » IllegalState Process [/tmp/em...
[ERROR]   PendingAccountsTest.testVacuum » IllegalState Process [/tmp/embedded-pg/PG-12c...
[ERROR]   PendingDevicesTest.testOverwrite » IllegalState Process [/tmp/embedded-pg/PG-1...
[ERROR]   PendingDevicesTest.testRemove » IllegalState Process [/tmp/embedded-pg/PG-12c0...
[ERROR]   PendingDevicesTest.testRetrieve » IllegalState Process [/tmp/embedded-pg/PG-12...
[ERROR]   PendingDevicesTest.testStore » IllegalState Process [/tmp/embedded-pg/PG-12c02...
[ERROR]   ProfilesTest.testDelete » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f15...
[ERROR]   ProfilesTest.testMissing » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f1...
[ERROR]   ProfilesTest.testMultipleVersions » IllegalState Process [/tmp/embedded-pg/PG-...
[ERROR]   ProfilesTest.testSetGet » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f15...
[ERROR]   ProfilesTest.testSetGetNullOptionalFields » IllegalState Process [/tmp/embedde...
[ERROR]   ProfilesTest.testSetReplace » IllegalState Process [/tmp/embedded-pg/PG-12c02d...
[ERROR]   RemoteConfigsTest.testDelete » IllegalState Process [/tmp/embedded-pg/PG-12c02...
[ERROR]   RemoteConfigsTest.testStore » IllegalState Process [/tmp/embedded-pg/PG-12c02d...
[ERROR]   RemoteConfigsTest.testUpdate » IllegalState Process [/tmp/embedded-pg/PG-12c02...
[ERROR]   ReservedUsernamesTest.testReservedLiteral » IllegalState Process [/tmp/embedde...
[ERROR]   ReservedUsernamesTest.testReservedRegexp » IllegalState Process [/tmp/embedded...
[ERROR]   UsernamesTest.testDelete » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f1...
[ERROR]   UsernamesTest.testGetByUsername » IllegalState Process [/tmp/embedded-pg/PG-12...
[ERROR]   UsernamesTest.testGetByUsernameMissing » IllegalState Process [/tmp/embedded-p...
[ERROR]   UsernamesTest.testGetByUuid » IllegalState Process [/tmp/embedded-pg/PG-12c02d...
[ERROR]   UsernamesTest.testGetByUuidMissing » IllegalState Process [/tmp/embedded-pg/PG...
[ERROR]   UsernamesTest.testPut » IllegalState Process [/tmp/embedded-pg/PG-12c02d3f1541...
[ERROR]   UsernamesTest.testPutChange » IllegalState Process [/tmp/embedded-pg/PG-12c02d...
[ERROR]   UsernamesTest.testPutConflict » IllegalState Process [/tmp/embedded-pg/PG-12c0...
[INFO] 
[ERROR] Tests run: 625, Failures: 0, Errors: 47, Skipped: 6
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] TextSecureServer 1.0 ............................... SUCCESS [  1.842 s]
[INFO] redis-dispatch 5.31 ................................ SUCCESS [  3.419 s]
[INFO] websocket-resources 5.31 ........................... SUCCESS [ 13.076 s]
[INFO] gcm-sender-async 5.31 .............................. SUCCESS [ 16.354 s]
[INFO] service 5.31 ....................................... FAILURE [01:49 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:24 min
[INFO] Finished at: 2021-04-21T19:49:00-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test (default-test) on project service: There are test failures.
[ERROR] 
[ERROR] Please refer to /usr/local/src/Signal-Server-5.31/service/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test (default-test) on project service: There are test failures.

Please refer to /usr/local/src/Signal-Server-5.31/service/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to /usr/local/src/Signal-Server-5.31/service/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
    at org.apache.maven.plugin.surefire.SurefireHelper.throwException (SurefireHelper.java:271)
    at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution (SurefireHelper.java:159)
    at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary (SurefirePlugin.java:362)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:1007)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:837)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[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/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :service

hejinlong avatar Apr 21 '21 07:04 hejinlong

@hejinlong Not enough info, which server version? What os?

madeindra avatar Apr 22 '21 01:04 madeindra

@hejinlong Not enough info, which server version? What os?

Server version:Signal-Server-5.31,Os version:Ubuntu 20.04

hejinlong avatar Apr 22 '21 02:04 hejinlong

Try mvn clean install or delete .m2 directory first to make sure the dependencies are matching

madeindra avatar Apr 22 '21 14:04 madeindra

Try mvn clean install or delete .m2 directory first to make sure the dependencies are matching

Thank you for your reply!The problem has not been resolved, there is still this error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:analyze-only (analyze) on project redis-dispatch: Dependency problems found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:analyze-only (analyze) on project redis-dispatch: Dependency problems found
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems found

hejinlong avatar Apr 23 '21 02:04 hejinlong

@hejinlong I've seen people reporting this, but I seem not able to reproduce the error. I've not tried Ubuntu 20.04 but in 18.04 it never show this problem

madeindra avatar Apr 23 '21 11:04 madeindra

I have problems like this too, but i don't how to fix it..

Any solution for this problem?

taftazaniadi avatar Apr 30 '21 06:04 taftazaniadi

As I commented, please try in 18.04, if you found the same error please report here

madeindra avatar May 01 '21 11:05 madeindra

This problem has been solved, but i don't it working properly or not..

taftazaniadi avatar May 03 '21 07:05 taftazaniadi

How did you solve the problem? I can't build it on Ubuntu (tried 20.04 and 18) same error occurs. Server version 3.21 builds correctly

thebadking avatar May 04 '21 15:05 thebadking

@taftazaniadi @madeindra I 'm also facing the same issue.

OS - Ubunut 20.04 openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Please let us know, how you fixed this issue. So that we can also follow the same.

aartivshegokar avatar May 04 '21 17:05 aartivshegokar

This is my best solution to solved problem when build Signal Server..

Server Version : (Server v5.48) Ubuntu Version : (Ubuntu 20.04) JDK Version : (OpenJDK v11.0.11)

How to Solved Problems

If you guys seeing error like this :

[INFO] ------------< org.whispersystems.textsecure:redis-dispatch >------------
[INFO] Building redis-dispatch 5.48                                       [2/5]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ redis-dispatch ---
[INFO] Deleting /home/taftazaniadi/Signal-Server/redis-dispatch/target
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ redis-dispatch ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /home/taftazaniadi/Signal-Server/redis-dispatch/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ redis-dispatch ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 10 source files to /home/taftazaniadi/Signal-Server/redis-dispatch/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ redis-dispatch ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /home/taftazaniadi/Signal-Server/redis-dispatch/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ redis-dispatch ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /home/taftazaniadi/Signal-Server/redis-dispatch/target/test-classes
[INFO] 
[INFO] --- maven-dependency-plugin:3.1.2:copy-dependencies (copy) @ redis-dispatch ---
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ redis-dispatch ---
[INFO] Surefire report directory: /home/taftazaniadi/Signal-Server/redis-dispatch/target/surefire-reports
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.whispersystems.dispatch.redis.PubSubConnectionTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.125 s - in org.whispersystems.dispatch.redis.PubSubConnectionTest
[INFO] Running org.whispersystems.dispatch.redis.protocol.ArrayReplyHeaderTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 s - in org.whispersystems.dispatch.redis.protocol.ArrayReplyHeaderTest
[INFO] Running org.whispersystems.dispatch.redis.protocol.IntReplyHeaderTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 s - in org.whispersystems.dispatch.redis.protocol.IntReplyHeaderTest
[INFO] Running org.whispersystems.dispatch.redis.protocol.StringReplyHeaderTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 s - in org.whispersystems.dispatch.redis.protocol.StringReplyHeaderTest
[INFO] Running org.whispersystems.dispatch.DispatchManagerTest
10:53:53.403 [Thread-1] INFO org.whispersystems.dispatch.DispatchManager - Received subscribe event for non-existing channel: foo
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.638 s - in org.whispersystems.dispatch.DispatchManagerTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-jar-plugin:3.1.1:jar (default-jar) @ redis-dispatch ---
[INFO] Building jar: /home/taftazaniadi/Signal-Server/redis-dispatch/target/redis-dispatch-5.48.jar
[INFO] 
[INFO] --- maven-dependency-plugin:3.1.2:analyze-only (analyze) @ redis-dispatch ---
[WARNING] Unused declared dependencies found:
[WARNING]    com.google.code.findbugs:jsr305:jar:3.0.2:compile
[WARNING]    org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:compile
[WARNING]    io.dropwizard:dropwizard-core:jar:2.0.13:compile
[WARNING]    com.fasterxml.jackson.core:jackson-annotations:jar:2.10.5:compile
[WARNING]    javax.xml.bind:jaxb-api:jar:2.3.1:compile
[WARNING]    io.dropwizard:dropwizard-jersey:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-migrations:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-client:jar:2.0.13:compile
[WARNING]    org.glassfish.jersey.core:jersey-server:jar:2.31:compile
[WARNING]    org.glassfish.jersey.core:jersey-common:jar:2.31:compile
[WARNING]    ch.qos.logback:logback-core:jar:1.2.3:compile
[WARNING]    org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.31.v20200723:compile
[WARNING]    jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile
[WARNING]    org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[WARNING]    io.dropwizard:dropwizard-servlets:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-logging:jar:2.0.13:compile
[WARNING]    com.google.guava:guava:jar:29.0-jre:compile
[WARNING]    org.eclipse.jetty.websocket:websocket-server:jar:9.4.31.v20200723:compile
[WARNING]    io.dropwizard:dropwizard-jdbi3:jar:2.0.13:compile
[WARNING]    jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[WARNING]    io.dropwizard:dropwizard-auth:jar:2.0.13:compile
[WARNING]    org.junit:junit-bom:pom:5.7.1:compile
[WARNING]    com.fasterxml.jackson.core:jackson-databind:jar:2.10.5:compile
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] TextSecureServer 1.0 ............................... SUCCESS [  4.576 s]
[INFO] redis-dispatch 5.48 ................................ FAILURE [ 17.180 s]
[INFO] websocket-resources 5.48 ........................... SKIPPED
[INFO] gcm-sender-async 5.48 .............................. SKIPPED
[INFO] service 5.48 ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  22.481 s
[INFO] Finished at: 2021-05-05T10:53:55+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:analyze-only (analyze) on project redis-dispatch: Dependency problems found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:analyze-only (analyze) on project redis-dispatch: Dependency problems found
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems found
    at org.apache.maven.plugins.dependency.analyze.AbstractAnalyzeMojo.execute (AbstractAnalyzeMojo.java:250)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[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 :redis-dispatch

You just add Dependency and add ignoredDependency to pom.xml, when showing error :

[INFO] --- maven-dependency-plugin:3.1.2:analyze-only (analyze) @ redis-dispatch ---
[WARNING] Unused declared dependencies found:
[WARNING]    com.google.code.findbugs:jsr305:jar:3.0.2:compile
[WARNING]    org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:compile
[WARNING]    io.dropwizard:dropwizard-core:jar:2.0.13:compile
[WARNING]    com.fasterxml.jackson.core:jackson-annotations:jar:2.10.5:compile
[WARNING]    javax.xml.bind:jaxb-api:jar:2.3.1:compile
[WARNING]    io.dropwizard:dropwizard-jersey:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-migrations:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-client:jar:2.0.13:compile
[WARNING]    org.glassfish.jersey.core:jersey-server:jar:2.31:compile
[WARNING]    org.glassfish.jersey.core:jersey-common:jar:2.31:compile
[WARNING]    ch.qos.logback:logback-core:jar:1.2.3:compile
[WARNING]    org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.31.v20200723:compile
[WARNING]    jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile
[WARNING]    org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[WARNING]    io.dropwizard:dropwizard-servlets:jar:2.0.13:compile
[WARNING]    io.dropwizard:dropwizard-logging:jar:2.0.13:compile
[WARNING]    com.google.guava:guava:jar:29.0-jre:compile
[WARNING]    org.eclipse.jetty.websocket:websocket-server:jar:9.4.31.v20200723:compile
[WARNING]    io.dropwizard:dropwizard-jdbi3:jar:2.0.13:compile
[WARNING]    jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[WARNING]    io.dropwizard:dropwizard-auth:jar:2.0.13:compile
[WARNING]    org.junit:junit-bom:pom:5.7.1:compile
[WARNING]    com.fasterxml.jackson.core:jackson-databind:jar:2.10.5:compile

Screenshots

image

add Dependency :

image

add IgnoredDependency :

image image image image

Additional context

NB :

  • When showing Used undeclared dependencies, add Depencency to pom.xml.
  • When showing Unused declared dependencies, add ignoredDependency to pom.xml.
  • Remove text Compile or Test in the last dependency when showing Unused declared dependencies.

Example :

  • org.junit:junit-bom:pom:5.7.1:compile => org.junit:junit-bom:pom:5.7.1

Sorry guys if my explain to much.. Thank you..

taftazaniadi avatar May 05 '21 04:05 taftazaniadi

Hi All,

I found one solution which helps me build success.

Add below code snippet (execution) in parent project "TextSecureServer" pom.xml under maven-dependency-plugin plugin. Hence your this plugin block will looks as below.

      `<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.1.2</version>
            <executions>
             
                <!-- Execution block starts here, add below exectuion block in this plugin as mentioned below -->
                <execution>
                	<id>analyze</id>
                    <phase>test-compile</phase>
                    <goals>
                        <goal>analyze-only</goal>
                    </goals>
                    <configuration>
                    	<failOnWarning>false</failOnWarning>
                    </configuration>
                </execution>
                <!-- Execution block ends here -->

                <execution>
                    <id>copy</id>
                    <phase>test-compile</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <includeScope>test</includeScope>
                        <includeTypes>so,dll,dylib</includeTypes>
                        <outputDirectory>${project.build.directory}/lib</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>`

Enjoy.

aartivshegokar avatar May 15 '21 07:05 aartivshegokar