I am facing issues while generating reports after successful build using maven in jenkins.
First, I have created java code into my local machine using eclipse.
Second, After creating the code I converted it to the Maven and completed all required setup of pom.xml file inside jenkins using Maven.
Third, I ran the script it gives me the success response.
Below, it is my maven success build result logs.
Started by user jenkin
Building in workspace /var/lib/jenkins/workspace/TestProject
Parsing POMs
Modules changed, recalculating dependency graph
Established TCP socket on 35275
[TestProject01] $ java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven1/boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven1/conf/logging jenkins.maven3.agent.Maven35Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven1 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.27.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12.jar 35275
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /home/user/Documents/eclipse-workspace/TestProject01/pom.xml clean install
[INFO] Scanning for projects...
[HUDSON] Collecting dependencies info
[INFO]
[INFO] ------------------< TestProject01:TestProject01 >-------------------
[INFO] Building TestProject01 0.0.1-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # TestProject01 ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # TestProject01 ---
[INFO] Installing /home/user/Documents/eclipse-workspace/TestProject01/pom.xml to /var/lib/jenkins/.m2/repository/TestProject01/TestProject01/0.0.1-SNAPSHOT/TestProject01-0.0.1-SNAPSHOT.pom
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO]
[INFO] BUILD SUCCESS
[INFO] Total time: 2.821 s
[INFO] Finished at: 2019-02-05T19:09:16+05:30
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /home/user/Documents/eclipse-workspace/TestProject01/pom.xml to TestProject01/TestProject01/0.0.1-SNAPSHOT/TestProject01-0.0.1-SNAPSHOT.pom
/home/user/Documents/eclipse-workspace/TestProject01/pom.xml is not inside /var/lib/jenkins/workspace/TestProject/home/user/Documents/eclipse-workspace/TestProject01/; will archive in a separate pass
channel stopped
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level /home/user/Documents/eclipse-workspace/TestProject01/test-output to /var/lib/jenkins/jobs/TestProject/htmlreports/HTML_20Report
Finished: SUCCESS
Now, The issue is I do not know how can I check if all testcases covered with success. Here, HTML report been generated but it stays the same after every build success which creating lot of confusion.
Please help!!!!!!!!
Related
I try to run Play project in IntelliJ IDEA. i follow this document.
this is my config. api is my sub project
But when I hit run icon, my service start successful and immediately AkkaHttpServer - Stopping server. then I type api/run in sbt shell, my service start successful and work normally. this issue only happen when I check User sbt shell in config
this is my log in sbt shell
"C:\Program Files\Java\jdk1.8.0_251\bin\java.exe" -server -Xmx1536M -Dsbt.supershell=false -Didea.managed=true -Dfile.encoding=UTF-8 -Dsbt.version=1.3.8 -Dsbt.log.noformat=true -jar C:\Users\LAP13556-local\AppData\Roaming\JetBrains\IntelliJIdea2020.1\plugins\Scala\launcher\sbt-launch.jar early(addPluginSbtFile=\"\"\"C:\Users\LAP13556-local\AppData\Local\Temp\idea979.sbt\"\"\") "; set ideaPort in Global := 51722 ; idea-shell"
[info] Loading global plugins from C:\Users\LAP13556-local\.sbt\1.0\plugins
[info] Loading settings for project crm-server-build from plugins.sbt,idea979.sbt ...
[info] Loading project definition from C:\Users\...\crm-server\project
[info] Loading settings for project crm-server from build.sbt ...
[info] Set current project to crm-server (in build file:/C:/Users/.../crm-server/)
[info] Defining Global / ideaPort
[info] The new value will be used by Compile / compile, Test / compile and 3 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] Set current project to crm-server (in build file:/C:/Users/.../crm-server/)
[IJ]sbt:crm-server> api/run
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Enter to stop and go back to the console...)
[info] p.c.s.AkkaHttpServer - Stopping server...
[success] Total time: 26 s, completed Jul 31, 2020 9:26:28 AM
[IJ]sbt:crm-server> api/run // I type this command
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Enter to stop and go back to the console...)
Can anyone tell me the reason. Thank you.
I am migrating an Apache Isis application from version 1.12.2 and currently using the legacy addons Security, Audit, and SessionLogger. I plan on updating to the latest Isis version and using the latest Incode addons here.
When changing the Isis version to 1.13.0 it fails the build. I did not see anything in the migration notes that will fix this. The build error is unkown repository for ApplicationRole, ApplicationTenancy, ApplicationUser. The bootstrap class lists the addon modules and there are no errors using Isis 1.12.2.
(update)
I thought it possible that Isis and the Incode addons should upgrade together at some point and someone would mention it, but I wasn't sure. Then looking more into this, I noticed the Apache Isis isis-app-todoapp uses an Isis version one major release higher, as well as the Incode addons, which are also one major release higher than what I have. Any idea about this? I would like to get to the latest Isis and Incode versions.
[ERROR]
[ERROR] #DomainObject annotation on org.isisaddons.module.security.dom.role.ApplicationRole specifies unknown repository 'org.isisaddons.module.security.dom.role.ApplicationRoleRepository'
[ERROR] #DomainObject annotation on org.isisaddons.module.security.dom.tenancy.ApplicationTenancy specifies unknown repository 'org.isisaddons.module.security.dom.tenancy.ApplicationTenancyRepository'
[ERROR] #DomainObject annotation on org.isisaddons.module.security.dom.user.ApplicationUser specifies unknown repository 'org.isisaddons.module.security.dom.user.ApplicationUserRepository'
[ERROR]
[ERROR]
[INFO] calling #PreDestroy on all domain services
[INFO] shutting down
org.apache.isis.core.metamodel.specloader.SpecificationLoader#1e2fe282
[INFO] ---------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] App ................................. SUCCESS [ 0.652s]
[INFO] App DOM ............................. FAILURE [ 37.945s]
[INFO] App Fixtures ........................ SKIPPED
[INFO] App App ............................. SKIPPED
[INFO] App Webapp .......................... SKIPPED
[INFO] ---------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.974 s
[INFO] Finished at: 2018-05-25T09:47:05-04:00
[INFO] Final Memory: 84M/692M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.isis.tool:isis-maven-plugin:1.13.2:validate (default) on project App-dom: 3 meta-model problems found. -> [Help 1]
[ERROR]
Solved by removing a maven build-profile slash validation step, after reading similar SO question, and updating the Incode addon modules with each major Isis release. I successfully went through Apache Isis release 1.13.0, 1.14.0, 1.15.0, 1.16.2.
I've juste created an new app in cloudbees with clickStart "Jetty 9 Embedded App" and when Jenkins build the generated project(without any change) I get this error.
Can you help me to find the problem origin ?
thanks.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.919s
[INFO] Finished at: Fri Sep 27 06:49:44 EDT 2013
[INFO] Final Memory: 16M/40M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving /scratch/jenkins/workspace/code-elevator-2/pom.xml to /home/flagadajones/hudson_home/jobs/code-elevator-2/modules/localdomain.localhost$jetty9-embedded-clickstart/builds/2013-09-27_10-48-58/archive/localdomain.localhost/jetty9-embedded-clickstart/0.1-SNAPSHOT/jetty9-embedded-clickstart-0.1-SNAPSHOT.pom
[JENKINS] Archiving /scratch/jenkins/workspace/code-elevator-2/target/jetty9-embedded-clickstart-0.1-SNAPSHOT.jar to /home/flagadajones/hudson_home/jobs/code-elevator-2/modules/localdomain.localhost$jetty9-embedded-clickstart/builds/2013-09-27_10-48-58/archive/localdomain.localhost/jetty9-embedded-clickstart/0.1-SNAPSHOT/jetty9-embedded-clickstart-0.1-SNAPSHOT.jar
[JENKINS] Archiving /scratch/jenkins/workspace/code-elevator-2/target/jetty9-embedded-clickstart-0.1-SNAPSHOT-jar-with-dependencies.jar to /home/flagadajones/hudson_home/jobs/code-elevator-2/modules/localdomain.localhost$jetty9-embedded-clickstart/builds/2013-09-27_10-48-58/archive/localdomain.localhost/jetty9-embedded-clickstart/0.1-SNAPSHOT/jetty9-embedded-clickstart-0.1-SNAPSHOT-jar-with-dependencies.jar
Waiting for Jenkins to finish collecting data
channel stopped
[cloudbees-deployer] Deploying as (jenkins) to the flagadajones account
[cloudbees-deployer] Deploying code-elevator-2
[cloudbees-deployer] Resolved from archived artifacts as /home/flagadajones/hudson_home/jobs/code-elevator-2/modules/localdomain.localhost$jetty9-embedded-clickstart/builds/2013-09-27_10-48-58/archive/localdomain.localhost/jetty9-embedded-clickstart/0.1-SNAPSHOT/jetty9-embedded-clickstart-0.1-SNAPSHOT-jar-with-dependencies.jar
com.cloudbees.plugins.deployer.exceptions.DeployException
at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl.newDeployActor(RunEngineImpl.java:150)
at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl.newDeployActor(RunEngineImpl.java:52)
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:173)
at com.cloudbees.plugins.deployer.engines.Engine.perform(Engine.java:112)
at com.cloudbees.plugins.deployer.DeployPublisher.perform(DeployPublisher.java:103)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:812)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:784)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:957)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:734)
at hudson.model.Run.execute(Run.java:1600)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:485)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: java.lang.NullPointerException
at com.cloudbees.plugins.deployer.impl.run.RunTargetImpl.getClickStackConfigMap(RunTargetImpl.java:256)
at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl$DeployFileCallable.<init>(RunEngineImpl.java:297)
at com.cloudbees.plugins.deployer.impl.run.RunEngineImpl.newDeployActor(RunEngineImpl.java:141)
... 13 more
Build step 'Deploy applications' marked build as failure
Finished: FAILURE
The clickstart generates an invalid configuration for the deployer plugin. Remove the target from the deploy publisher and add it back again. The issue is that the Maven artifact selector is not selected and the clickstart has fed incorrect configuration for the target, which means that you can't just select the maven artifact selector, instead you need to remove the target and add it back again...
Nuts I know, I shall be chastising the clickstart maintainers on Monday rest assured ;-)
i am using maven i don't have more knowledge about maven when i am install my project then it will successfully build but when i am test my project with maven it will give me an error like
Unable to copy an artifact to the working directory
i gave all permission to my project directory detail error as below so how can i resolve my
problem and how to run my project
so please help me
E
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 24 seconds
[INFO] Finished at: Thu Jan 27 17:44:59 IST 2011
[INFO] Final Memory: 35M/84M
[INFO] ------------------------------------------------------------------------
[INFO] Unable to copy an artifact to
the working directory Embedded error:
/home/nayan/workspace/ONiT/mediaPlayer/target/classes
(Is a directory) [INFO]
This looks like some of the previous tests are still running at this point and blocking maven from writing in the target directory.
As this seems to be an reactor build, do the modules themself build correctly ? I.e. can you run mvn test in each module directory seperately ?
I have a Nexus instance with Maven 2 repositories hosted on a non-Internet-connected corporate development domain. I need to use the maven-jaxb-schemagen plugin from Sun, however, it was only available in Maven 1 format (along with many other Maven 1 dependencies, so this is not a one-off edge case).
I made a new Maven 1 hosted repository in Nexus (maven1), then made a Maven1-to-Maven2 virtual repository as well (maven1as2). Because some of the needed artifacts are snapshots, the policy for maven1 (and by extension maven1as2) is Snapshot.
I imported all of the Maven 1 artifacts through the filesystem to this repository's overridden local storage location.
I then added maven1as2 to my Public Repositories group. Some of the reference I have found says that Nexus will not allow you to browse or search a Maven1 repository. I have had mixed results. If I select Public Repositories or maven1as2 in Nexus, I can go to Browse Storage and drill down to com/sun/tools/jxc/maven2/maven-jaxb-schemagen-plugin/1.3-SNAPSHOT/ and view the maven-jaxb-schemagen-plugin-1.3-SNAPSHOT.pom file and its checksum. However, I cannot view the JAR artifact that should be there and is on the filesystem.
When I try to use Maven to build, I get the following:
$ mvn clean compile
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] MyProject
[INFO] MyModule1
[INFO] MyModule2
...
[INFO] ---------------------------------------------------------------------------
[INFO] Building MyProject
[INFO] task-segment: [clean, compile]
[INFO] ---------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [cobertura:clean {execution: default}]
[INFO] No goals needed for project - skipping
[INFO] ---------------------------------------------------------------------------
[INFO] Building MyModule1
[INFO] task-segment: [clean, compile]
[INFO] ---------------------------------------------------------------------------
Downloading: http://my.nexus.server:8081/nexus/content/groups/public/com/sun/tools/jxc/maven2/maven-jaxb-schemagen-plugin/1.3-SNAPSHOT/maven-jaxb-schemagen-plugin-1.3-SNAPSHOT.pom
6K downloaded (maven-jaxb-schemagen-plugin-1.3-SNAPSHOT.pom)
[INFO] ---------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ---------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.sun.tools.jxc.maven2 -DartifactId=maven-jaxb-schemagen-plugin -Dversion=1.3-SNAPSHOT -Dpackaging=maven-plugin -Dfile=path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.sun.tools.jxc.maven2 -DartifactId=maven-jaxb-schemagen-plugin -Dversion=1.3-SNAPSHOT -Dpackaging=maven-plugin -Dfile=path/to/file -Durl=[url] -DrepositoryId=[id]
com.sun.tools.jxc.maven2:maven-jaxb-schemagen-plugin:1.3-SNAPSHOT
from the specified remote repositories:
nexus (http://my.nexus.server:8081/nexus/content/groups/public)
com.sun.tools.jxc.maven2:maven-jaxb-schemagen-plugin:1.3-SNAPSHOT
from the specified remote repositories:
nexus (http://my.nexus.server:8081/nexus/content/groups/public)
[INFO] ---------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ---------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Jul 06 15:05:08 EDT 2010
[INFO] Final Memory: 7M/17M
[INFO] ---------------------------------------------------------------------------
Sometimes it happens when working with m2eclipse. You chose a dependency and the default scope is pom and not jar. You didn't show your pom file. validate that all dependencies are jar scoped.
I learned that most of the time rebuilding metadata of the repositories helps to solve such problems.
I find it annoying how often this is necessary.
Select the repository
In the "Browse Storage" tab open the context menu of the root node (it sometimes is hidden behind the Firefox default context menu - pressing Esc helps in this case and brings the Nexus context menu into view)
Select rebuild metadata
Expire cache and reindex may help too for some cases.
Most of the time these steps didn't solve the problem at the first try but at last they solved it each time though.
I run Nexus as a WAR in Glassfish 2.1