apache isis simple-app clean install fails - maven-3

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).

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]

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

I am unable to bulid Maven Project

Please I am very new when comes to maven project and wildfly (JBoss) Server. I have a Java EE 7 project which I developed with NetBeans for Apache Tomcat 8. For some good reason I want to migrate to WildFly 8.
I have recreated the project on JBoss Studio 7.1 with all the Maven Dependencies. First attempt to run the project returns "Forbidden".
I tried to be sure the project is complied and deployed by running
mvn clean package
Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ProjectName 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # ProjectName ---
[INFO] Deleting /path/to/the/ProjectName/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ProjectName ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # ProjectName ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 74 source files to /path/to/the/ProjectName/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.062 s
[INFO] Finished at: 2014-11-18T10:58:47+01:00
[INFO] Final Memory: 8M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ProjectName: Compilation failure -> [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
I re-run the command with -e
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project nants: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project nants: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:862)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
[ERROR]
These tips contains my environment
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T21:58:10+01:00)
Maven home: /path/to/maven
Java version: 1.8.0_20, vendor: Oracle Corporation
Java home: /usr/lib/jvm/oracle_jdk_8/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-24-generic", arch: "amd64", family: "unix"
I read the suggested wiki but could't solve the issue still. Maybe because I am still new.Please I will appreciate your help on resolving this errors.
You are using Java 8, please try on Java 7 as some components may not support Java 8.
Similar problem is described here: maven-compilation-fails-without-explaining-why
I finally found what problem for failed compilation was, I have fixed that by correcting my POM.xml there was an error on my JAVA_HOME settings. though I am still getting "Forbidden" from the url which will need a different question thread if I am unable to resolve it.
<maven.compiler.executable>/absolute/path/to/bin/javac</maven.compiler.executable>
TO:
<maven.compiler.executable>${JAVA_HOME}/bin/javac</maven.compiler.executable>

Resources