BUILD FAILURE Error: when executing "mvn clean package" command

469 views
Skip to first unread message

muzammil...@gmail.com

unread,
Aug 16, 2017, 6:12:14 AM8/16/17
to Swagger
I've followed below steps:

$ apt-get remove openjdk-6-jre 
$ sudo apt-get install openjdk-7-jdk openjdk-7-jre 
$ sudo apt-get install openjdk-7-jdk openjdk-7-jre icedtea-7-plugin

$ JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/"

$ source /etc/environment
$ unzip apache-maven-3.3.9-bin.zip
$ mv apache-maven-3.3.9 /opt/
$ export PATH=/opt/apache-maven-3.3.9/bin:$PATH
$ mvn clean package

[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/config/ConfigParser.java:10: Import statement for 'org.slf4j.Logger' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/config/ConfigParser.java:11: Import statement for 'org.slf4j.LoggerFactory' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/config/ConfigParser.java:17:5: Missing a Javadoc comment. [JavadocMethod]
[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/config/ConfigParser.java:38:28: Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. [CatchParameterName]
Audit done.
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ swagger-codegen ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-versions) @ swagger-codegen ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ swagger-codegen ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1563 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ swagger-codegen ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 147 source files to /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/io/swagger/codegen/examples/XmlExampleGenerator.java:[17,32] package org.codehaus.plexus.util does not exist
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] swagger-codegen-project ............................ SUCCESS [  3.055 s]
[INFO] swagger-codegen (core library) ..................... FAILURE [ 11.338 s]
[INFO] swagger-codegen (executable) ....................... SKIPPED
[INFO] swagger-codegen (maven-plugin) ..................... SKIPPED
[INFO] swagger-generator .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.927 s
[INFO] Finished at: 2017-08-16T15:04:43+05:00
[INFO] Final Memory: 40M/580M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project swagger-codegen: Compilation failure
[ERROR] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/io/swagger/codegen/examples/XmlExampleGenerator.java:[17,32] package org.codehaus.plexus.util does not exist
[ERROR] -> [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] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :swagger-codegen

Ron Ratovsky

unread,
Aug 17, 2017, 4:52:41 PM8/17/17
to swagger-sw...@googlegroups.com

Did you customize the codegen that you’re looking to build it?

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

muzammil...@gmail.com

unread,
Sep 13, 2017, 3:12:57 AM9/13/17
to Swagger
For analyse the issue, I'd cloned codegen repo from https://github.com/swagger-api/swagger-codegen and start to execute this command mvn clean package, but the error remains same.

Ron Ratovsky

unread,
Sep 13, 2017, 3:32:26 AM9/13/17
to swagger-sw...@googlegroups.com

Okay, but why are you trying to build the project?

--

muzammil...@gmail.com

unread,
Sep 26, 2017, 2:10:11 AM9/26/17
to Swagger
Because I want to build HTML documentation from yml file.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

muzammil...@gmail.com

unread,
Sep 27, 2017, 2:42:57 AM9/27/17
to Swagger
I need to customize template and java code.
Reply all
Reply to author
Forward
0 new messages