Jhipster - production build failure - docker

I cannot generate my JHipster application war by running mvnw -Pprod. Here's the error I get in a console:
https://pastebin.com/3wLwy2x4
And my package.json dependencies:
https://pastebin.com/txnATG6M
The solution from:
Webpack failure during JHipster Prod Package
doesn't work for me, only the error changes to:
[INFO] ERROR in ./src/main/webapp/app/app.main.ts
[INFO] Module not found: Error: Can't resolve './app.module.ngfactory' in 'D:\Programy\Web\softdog2\src\main\webapp\app'
[INFO] # ./src/main/webapp/app/app.main.ts 2:0-62
[INFO] MergetJsonsWebpackPlugin emit starts...
[INFO] MergetJsonsWebpackPlugin emit completed...
[ERROR] error Command failed with exit code 2.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:48 min
[INFO] Finished at: 2018-06-13T23:29:58+02:00
[INFO] Final Memory: 50M/532M
Also, I get following warnings from yarn:
[ERROR] warning " > angular-particle#1.0.4" has incorrect peer dependency "#angular/core#^4.0.0".
[ERROR] warning " > ng2-page-scroll#4.0.0-beta.12" has incorrect peer dependency "#angular/core#>=4.2.6 <5.0.0".
[ERROR] warning " > ng2-page-scroll#4.0.0-beta.12" has incorrect peer dependency "#angular/common#>=4.2.6 <5.0.0".
[ERROR] warning " > ng2-page-scroll#4.0.0-beta.12" has incorrect peer dependency "#angular/platform-browser#>=4.2.6 <5.0.0".
[ERROR] warning " > ng2-page-scroll#4.0.0-beta.12" has incorrect peer dependency "#angular/router#>=4.2.6 <5.0.0".

The answer to this problem is to update Angular libraries versions (in my case from 5.1.0 to 5.1.1).

Related

how to setup maven setup for jenkins

I'm quite new to Jenkins setup.
Using Eclipse,spring,maven project
Jenkins 의 Global Tool Configuration 에서
NAME: MAVEN_HOME
install from apache 3.6.0
error is following
[INFO] Copying 19 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # egov
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to
C:\Users\Administrator.jenkins\workspace\TestJob1\target\classes
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 2.154 s
[INFO] Finished at: 2018-12-01T01:44:07Z
[INFO]
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project egov: Fatal error compiling:
CompilerException: NullPointerException -> [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
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
In your pipeline (which you should post) run a maven --version and make sure the JRE that is running Maven is also a JDK.
Also, it looks like your Jenkins is running as an administrator. That's not a good idea because the jobs (pipelines) will have admin access to the host.

Building Jenkins fails

Did a git clone https://github.com/jenkinsci/jenkins.git
cd jenkins
mvn install
I am getting the below error.
`
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: java.nio.file.NoSuchFileException: C:\jenkins\cli\target\classes\META-INF\annotations\org.kohsuke.accmod.Restricted
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Jenkins main module 2.142-SNAPSHOT ................. SUCCESS [ 2.720 s]
[INFO] Jenkins cli ........................................ FAILURE [ 1.985 s]
[INFO] Jenkins core ....................................... SKIPPED
[INFO] Jenkins war ........................................ SKIPPED
[INFO] Tests for Jenkins core 2.142-SNAPSHOT .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.255 s
[INFO] Finished at: 2018-09-18T23:34:03-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project cli: Compilation failure
[ERROR] error: java.nio.file.NoSuchFileException: C:\jenkins\cli\target\classes\META-INF\annotations\org.kohsuke.accmod.Restricted
[ERROR]
[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] [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 <goals> -rf :cli
`
Any idea why the mvn install is failing on a project downloaded directly from stash.

SonarQube server [https://localhost:9000] can not be reached in Jenkins

I want to build a code coverage from sonarqube in Jenkins. The project is from github. I have configure everything that are necessary but the following errors still arise. Can someone please help me to solve this?
Established TCP socket on 59508
[OData] $ java -cp "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.12-alpha-1.jar;D:\downloads\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar;D:\downloads\apache-maven-3.5.4/conf/logging" jenkins.maven3.agent.Maven35Main D:\downloads\apache-maven-3.5.4 "D:\Program Files\war\WEB-INF\lib\remoting-3.21.1.jar" "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.12-alpha-1.jar" "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.12-alpha-1.jar" 59508
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f D:\Program Files\workspace\OData\pom.xml clean sonar:sonar
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------------< OData:OData >-----------------------------
[INFO] Building OData 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # OData ---
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO]
[INFO] ----------------------------< OData:OData >-----------------------------
[INFO] Building OData 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:3.4.1.1168:sonar (default-cli) # OData ---
[INFO] User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
[ERROR] SonarQube server [https://localhost:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.056 s
[INFO] Finished at: 2018-08-27T00:09:08+08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.1.1168:sonar (default-cli) on project OData: Unable to execute SonarQube: Fail to get bootstrap index from server: Unrecognized SSL message, plaintext connection? -> [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]
[JENKINS] Archiving D:\Program Files\workspace\OData\pom.xml to OData/OData/0.0.1-SNAPSHOT/OData-0.0.1-SNAPSHOT.pom
[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
channel stopped
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
Skipping sonar analysis due to bad build status FAILURE
Finished: FAILURE
for your OData project, when your way to scan the code is via jenkins, you have to set in the settings of jenkins with the hostname, don´t recommend put "localhost" or "127.0.0.1"
Try with $HOSTNAME:
Go to Settings in Jenkins
Move to "Sonarqube Servers"
SonarQube servers
-- Sonarqube instalations
--- ie: http://myserversonarqube:9000
Regards.
Error below is self explanatory. I have below questions
Is Sonarqube running on localhost with port 9000 as Secured (i.e https) ?
Which version of maven you are using? sometimes some of the Sonar plugin versions does not work with old maven versions.
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-
plugin:3.4.1.1168:sonar (default-cli) on project OData: Unable to execute SonarQube:
Fail to get bootstrap index from server: Unrecognized SSL message, plaintext connection? -> [Help 1]
[ERROR]

apache isis simple-app clean install fails

I am trying apache isis for the first time on my Windows machine (following tutorial: https://www.youtube.com/watch?v=OTNHR5EdAs8&list=PLbRpnAmQ6xsBGB_mRAUob8WRBsSL_IsBO), I executed the command:
mvn archetype:generate "-DarchetypeGroupId=org.apache.isis.archetype" "-D archetypeArtifactId=simpleapp-archetype" "-D archetypeVersion=1.16.2""-D groupId=com.mycompany""-D artifactId=myapp""-D version=1.0-SNAPSHOT" "-B"
Which created the myapp in a folder.
After that I Cd'd in myapp folder and executed mvn clean install which eventually failed with following error message:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SimpleApp Parent 1.0-SNAPSHOT ...................... SUCCESS [ 4.576 s]
[INFO] SimpleApp Simple Module ............................ FAILURE [ 22.055 s]
[INFO] SimpleApp Application .............................. SKIPPED
[INFO] SimpleApp Webapp 1.0-SNAPSHOT ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.747 s
[INFO] Finished at: 2018-03-21T08:19:19+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.datanucleus:datanucleus-maven-plugin:4.0.5:enhance (process-classes) on project myapp-module-simple: Error executing DataNucleus tool org.datanucleus.enhancer.DataNucleusEnhancer: InvocationTargetException: java/sql/Date: java.sql.Date -> [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 <goals> -rf :myapp-module-simple
PS E:\Apache isis\test_project\myapp>
Did I miss anything? Any dependencies?
As of this writing Apache Isis only runs on Java 7 and 8. We are aiming to be compatible with Java 11 when it ships in Sept/Oct (as that is the next LTS version of Java).

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

I'm using following version.
maven: 3.3.9
jdk: java-7-openjdk-amd64
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/"
I'm getting packages type error when I'm running $ mvn clean package command. I'm new to use swagger to generate documentation(.yml file to .html)
ERROR:
enter code here[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/io/swagger/codegen/auth/AuthParser.java:21:5: Missing a Javadoc comment. [JavadocMethod]
[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/io/swagger/codegen/auth/AuthParser.java:28: Line is longer than 100 characters (found 233). [LineLength]
[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/io/swagger/codegen/auth/AuthParser.java:35:5: Missing a Javadoc comment. [JavadocMethod]
[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/io/swagger/codegen/auth/AuthParser.java:37:27: Local variable name 'b' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. [LocalVariableName]
[WARN] /var/www/html/cg-api-dev-portal/codegen/swagger-codegen/modules/swagger-codegen/src/main/java/io/swagger/codegen/auth/AuthParser.java:46:36: Catch parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. [CatchParameterName]
[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 [ 2.958 s]
[INFO] swagger-codegen (core library) ..................... FAILURE [ 11.114 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.646 s
[INFO] Finished at: 2017-08-16T15:36:08+05:00
[INFO] Final Memory: 39M/553M
[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] [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 <goals> -rf :swagger-codegen
I've also run debugging mode by running mvn clean package -X, but nothing getting in mind please any one look into it save my life.
Based on the following line:
[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
Looks like you're not using the latest master, which has the following line instead:
16 import io.swagger.models.properties.AbstractNumericProperty;
17 import io.swagger.models.properties.PasswordProperty;
18 import io.swagger.models.properties.UUIDProperty;
Please clone from the latest master.
You can also use the SNAPSHOT version without building the project manually:
https://github.com/swagger-api/swagger-codegen#compatibility

Resources