Hi everybody i'm actually using Jenkins and testlink (with testLink Plugin) to make test automation.
I am not familiar with IC and testlink so i try to take a good start with the "TestLink Plug-in Tutorial".
But when I run a build I am getting following error:
[workspace] $ C:\maven-3.0.4\bin\mvn.bat -s C:\maven-3.0.4\conf\settings.xml -gs C:\maven- 3.0.4\conf\settings.xml clean test -DsuiteXmlFiles=suite.xml
[INFO] ---------------------------------------------------------------------
[INFO] Building Jenkins TestLink Plug-in Tutorial 0.3-SNAPSHOT
[INFO] ---------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # jenkins-testlink-plugin- tutorial ------------------------------------------------------------
[INFO] Deleting C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target
[INFO]
[INFO] --- docbkx-maven-plugin:2.0.11:generate-pdf (book-output) # jenkins-testlink-plugin-tutorial ---
[INFO] Processing input file: book.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.377s
[INFO] Finished at: Tue Feb 19 17:43:14 CET 2013
[INFO] Final Memory: 8M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.agilejava.docbkx:docbkx-maven-plugin:2.0.11:generate-pdf (book-output) on project jenkins-testlink-plugin-tutorial: Failed to read source: Connection timed out: connect -> [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
I am using a proxy defined in my settings.xml in maven/conf .
I think that maven can't reach the goal test when it is generating the pdf.
I googled a lot but nothing of really usefull, can someone help me plz?
Okay thanks for this first advice! I don't know what is the use of this commande -DsuiteXmlFiles=suite.xml but no changes without it. With the -X i've got this :
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: com.agilejava.docbkx:docbkx-maven-plugin:2.0.11:generate-pdf (book-output)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<artifacts>${plugin.artifacts}</artifacts>
<draftMode>no</draftMode>
<foCustomization>src/main/book/stylesheets/style.xsl</foCustomization>
<fop1Extensions>1</fop1Extensions>
<generatedSourceDirectory>C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target/book/generated/en</generatedSourceDirectory>
<highlightSource>1</highlightSource>
<includes default-value="*.xml">book.xml</includes>
<postProcess>
<copy todir="C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace/target/book/media">
<fileset dir="C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace/src/main/book/media/">
<include name="**/*.css"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
</fileset>
</copy>
</postProcess>
<project>${project}</project>
<sourceDirectory>C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace/src/main/book/en/</sourceDirectory>
<targetDirectory>C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target/book/en/</targetDirectory>
<targetFileExtension default-value="fo"/>
<xincludeSupported>true</xincludeSupported>
</configuration>
and this :
[DEBUG] (f) draftMode = no
[DEBUG] (f) foCustomization = src/main/book/stylesheets/style.xsl
[DEBUG] (f) fop1Extensions = 1
[DEBUG] (f) generatedSourceDirectory = C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target\book\generated\en
[DEBUG] (f) highlightSource = 1
[DEBUG] (f) includes = book.xml
[DEBUG] (f) postProcess =
[DEBUG] (f) project = MavenProject: com.tupilabs:jenkins-testlink-plugin-tutorial:0.3-SNAPSHOT # C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\pom.xml
[DEBUG] (f) sourceDirectory = C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\src\main\book\en
[DEBUG] (f) targetDirectory = C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target\book\en
[DEBUG] (f) targetFileExtension = fo
[DEBUG] (f) xincludeSupported = true
[DEBUG] -- end configuration --
[DEBUG] Catalogs to load: jar:file:/C:/Users/rlyonnet/.m2/repository/net/sf/docbook/docbook-xsl/1.75.2/docbook-xsl-1.75.2-ns-resources.zip!/docbook/catalog.xml
[DEBUG] Using stylesheet: jar:file:/C:/Users/rlyonnet/.m2/repository/net/sf/docbook/docbook-xsl/1.75.2/docbook-xsl-1.75.2-ns-resources.zip!/docbook/fo/docbook.xsl
[DEBUG] SourceFile: C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\src\main\book\en\book.xml
[DEBUG] TargetFile: C:\Jenkins\jobs\Jenkins TestLink Plug-in examples\workspace\target\book\en\book.fo
[INFO] Processing input file: book.xml
[DEBUG] Advanced XInclude mode entered
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.450s
[INFO] Finished at: Wed Feb 20 09:23:37 CET 2013
[INFO] Final Memory: 7M/76M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.agilejava.docbkx:docbkx-maven-plugin:2.0.11:generate-pdf (book-output) on project jenkins-testlink-plugin-tutorial: Failed to read source: Connection timed out: connect -> [Help 1]
Related
I am triyng to intergate jenkins and maven with sonarqube.
I am completed with prerequistes and installation part
there is ome error related to class not loading, i am confused what is the reason behind this.
JENKINS PIPELINE
stage('Test & code quality check ') {
withMaven(maven: 'M3'){
withSonarQubeEnv(credentialsId:'mbk-sonar',installationName:'sonar-qube') {
sh '''mvn sonar:sonar -X -f /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/pom.xml \
-Dsonar.projectKey=mobikwik-jenkins \
-Dsonar.projectName=mobikwik-jenkins \
-Dsonar.host.url=https://sonar.mobikwik.com\ /
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.language=java \
-Dsonar.sources=/var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects/src/main/ \
-Dsonar.java.binaries=/opt/sonarqube/web/WEB-INF/classes'''
}
}
}
JENKINS CONSOLE OUTPUT- [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project root: Unable to load component class org.sonar.scanner.report.MetadataPublisher: Unable to load component class
Injecting SonarQube environment variables using the configuration: sonar-qube
[Pipeline] {
[Pipeline] sh
+ mvn sonar:sonar -X -f /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/pom.xml -Dsonar.projectKey=mobikwik-jenkins -Dsonar.projectName=mobikwik-jenkins -Dsonar.host.url=http://10.20.15.26:9000 -Dsonar.sourceEncoding=UTF-8 -Dsonar.language=java -Dsonar.sources=/var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects/src/main/ -Dsonar.java.binaries=/opt/sonarqube/web/WEB-INF/classes
----- withMaven Wrapper script -----
Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd"
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/M3
Java version: 1.8.0_222, vendor: Oracle Corporation, runtime: /usr/local/openjdk-8/jre
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-11-amd64", arch: "amd64", family: "unix"
[DEBUG] Included /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/pipeline-maven-spy.jar
[DEBUG] Populating class realm maven.ext
[DEBUG] Included /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/pipeline-maven-spy.jar
[INFO] [jenkins-event-spy] Generate /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/maven-spy-20200912-110023-7696240343729296116878.log.tmp ...
[INFO] 11:00:26.484 Project key: mobikwik-jenkins
[INFO] 11:00:26.485 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc
[INFO] 11:00:26.485 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/target/sonar
[DEBUG] 11:00:26.486 Project global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.488 Creating module hierarchy
[DEBUG] 11:00:26.488 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.489 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc
[DEBUG] 11:00:26.489 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/target/sonar
[DEBUG] 11:00:26.490 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.490 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.490 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/cabs-api
[DEBUG] 11:00:26.491 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/cabs-api/target/sonar
[DEBUG] 11:00:26.491 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.492 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.492 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/core
[DEBUG] 11:00:26.492 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/core/target/sonar
[DEBUG] 11:00:26.493 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.493 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.494 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects
[DEBUG] 11:00:26.494 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/shared-objects/target/sonar
[DEBUG] 11:00:26.495 Module global encoding: UTF-8, default locale: en
[DEBUG] 11:00:26.495 Init module 'mobikwik-jenkins'
[DEBUG] 11:00:26.495 Base dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/mbk-service
[DEBUG] 11:00:26.496 Working dir: /var/jenkins_home/workspace/cabs-stag/cabs-stagSrc/mbk-service/target/sonar
[DEBUG] 11:00:26.496 Module global encoding: UTF-8, default locale: en
[INFO] 11:00:26.501 Load project settings for component key: 'mobikwik-jenkins'
[DEBUG] 11:00:26.522 GET 200 api/settings/values.protobuf?component=mobikwik-jenkins | time=20ms
[INFO] 11:00:26.523 Load project settings for component key: 'mobikwik-jenkins' (done) | time=22ms
[DEBUG] 11:00:26.530 No language available
[INFO] 11:00:26.537 Load quality profiles
[DEBUG] 11:00:26.550 GET 200 http://10.20.15.26:9000/api/qualityprofiles/search.protobuf?project=mobikwik-jenkins | time=12ms
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for root 1.6.0-SNAPSHOT:
[INFO]
[INFO] root ............................................... FAILURE [ 2.222 s]
[INFO] shared-objects ..................................... SKIPPED
[INFO] core ............................................... SKIPPED
[INFO] mbk-service ........................................ SKIPPED
[INFO] cabs-api ........................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.638 s
[INFO] Finished at: 2020-09-12T11:00:26Z
[INFO] ------------------------------------------------------------------------
[INFO] [jenkins-event-spy] Generated /var/jenkins_home/workspace/cabs-stag#tmp/withMaven42e8b7cd/maven-spy-20200912-110023-7696240343729296116878.log
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project root: Unable to load component class org.sonar.scanner.report.MetadataPublisher: Unable to load component class org.sonar.scanner.rule.QualityProfiles: No quality profiles have been found, you probably don't have any language plugin installed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project root: Unable to load component class org.sonar.scanner.report.MetadataPublisher
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 (
Caused by: org.sonar.api.utils.MessageException: No quality profiles have been found, you probably don't have any language plugin installed.
[ERROR]
[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
[Pipeline] }
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[withMaven] Jenkins Task Scanner Plugin not found, don't display results of source code scanning for 'TODO' and 'FIXME' in pipeline screen.
[withMaven] Publishers: Pipeline Graph Publisher: 2 ms, Dependencies Fingerprint Publisher: 68 ms, Open Task Scanner Publisher: 1 ms
It appears you have not installed any language plugins in SonarQube (not Jenkins).
org.sonar.scanner.rule.QualityProfiles: No quality profiles have been found, you probably don't have any language plugin installed. -> [Help 1]
As a SonarQube Admin, log into SonarQube. From the main menu, Administration | Marketplace ..., filter on "Languages" for Sonar provided languages, "External Analyzers" for third party. "Install" as necessary, Restart required.
As of 7.X, SQ will analyze all code for which a language analyzer is installed; language=java is ignored.
So, I cannot understand what's going on.
I have a project of this structure:
Aggregator Pom
|
+- Parent Pom
|
+- SubModule 1 (whose parent is "Parent Pom")
|
+- SubModule 2 (whose parent is "SubModule 1")
All are of pom packaging.
I've been fighting the release plugin for days now. I run a release, and it successfully deploys to maven central. However, the versions of Parent Pom, SubModule 1 and SubModule 2 are of the next snapshot version.
It is being executed by TeamCity, but basically it runs something like:
mvn -P sign-artifacts -B release:clean release:prepare --batch-mode -Dtag=0.1.0 -DreleaseVersion=0.1.0 -DdevelopmentVersion=0.2.0-SNAPSHOT -Dscm.tag=0.1.0 -Dproject.rel.{aggregator pom groupId}:{aggregator pom artifactId}=0.1.0 -Dproject.dev.{aggregator pom groupId}:{aggregator pom artifactId}=0.2.0-SNAPSHOT
And then:
mvn -P sign-artifacts -B release:perform -P sign-artifacts
(the "sign-artifacts" profile is responsible for the GPG signing)
In maven central, I see that Parent Pom, SubModule 1 and SubModule 2 are there, their metadata says their version is 0.1.0, but when I download the pom of each, I see the version is 0.2.0-SNAPSHOT.
Any ideas what's wrong, and how to fix?
Thanks in advance,
Ohad
EDIT:
some outputs:
[INFO] Checking out the project to perform the release ...
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target && git clone --branch 0.25.0 git#github.com:wix/wix-oss-parents.git /home/builduser/agent03/work/4ae459b9554b762f/target/checkout
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target
...
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout && git fetch git#github.com:wix/wix-oss-parents.git
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout && git checkout 0.25.0
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout
...
[INFO] Invoking perform goals in directory /home/builduser/agent03/work/4ae459b9554b762f/target/checkout
[INFO] Executing goals 'deploy'...
[DEBUG] Using ${maven.home} of: '/home/builduser/agent03/tools/maven3_1'.
[DEBUG] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout && /home/builduser/agent03/tools/maven3_1/bin/mvn -B -X -D maven.repo.local=/home/builduser/.m2/repository -s /home/builduser/agent03/temp/buildTmp/release-settings8995574762584519955.xml -D performRelease=true -P artifactory deploy
[INFO] Inspecting build with total of 4 modules...
[INFO] Installing Nexus Staging features:
...
[DEBUG] Goal: org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
[INFO] <configuration>
[INFO] <altStagingDirectory>${altStagingDirectory}</altStagingDirectory>
[INFO] <artifact default-value="${project.artifact}"/>
[INFO] <attachedArtifacts default-value="${project.attachedArtifacts}"/>
[INFO] <autoDropAfterRelease default-value="true">${autoDropAfterRelease}</autoDropAfterRelease>
[INFO] <autoReleaseAfterClose default-value="false">false</autoReleaseAfterClose>
[INFO] <detectBuildFailures default-value="true">${detectBuildFailures}</detectBuildFailures>
[INFO] <keepStagingRepositoryOnCloseRuleFailure>${keepStagingRepositoryOnCloseRuleFailure}</keepStagingRepositoryOnCloseRuleFailure>
[INFO] <keepStagingRepositoryOnFailure>${keepStagingRepositoryOnFailure}</keepStagingRepositoryOnFailure>
[INFO] <mavenSession default-value="${session}"/>
[INFO] <mojoExecution default-value="${mojoExecution}"/>
[INFO] <nexusUrl>https://oss.sonatype.org/</nexusUrl>
[INFO] <offline default-value="${settings.offline}"/>
[INFO] <packaging default-value="${project.packaging}"/>
[INFO] <pluginArtifactId default-value="${plugin.artifactId}"/>
[INFO] <pluginGroupId default-value="${plugin.groupId}"/>
[INFO] <pluginVersion default-value="${plugin.version}"/>
[INFO] <pomFile default-value="${project.file}"/>
[INFO] <serverId>ossrh</serverId>
[INFO] <skipLocalStaging>${skipLocalStaging}</skipLocalStaging>
[INFO] <skipNexusStagingDeployMojo>${skipNexusStagingDeployMojo}</skipNexusStagingDeployMojo>
[INFO] <skipRemoteStaging>${skipRemoteStaging}</skipRemoteStaging>
[INFO] <skipStaging>${skipStaging}</skipStaging>
[INFO] <skipStagingRepositoryClose>${skipStagingRepositoryClose}</skipStagingRepositoryClose>
[INFO] <sslAllowAll default-value="false">${maven.wagon.http.ssl.allowall}</sslAllowAll>
[INFO] <sslInsecure default-value="false">${maven.wagon.http.ssl.insecure}</sslInsecure>
[INFO] <stagingDescription>${stagingDescription}</stagingDescription>
[INFO] <stagingProfileId>${stagingProfileId}</stagingProfileId>
[INFO] <stagingProgressPauseDurationSeconds default-value="3">${stagingProgressPauseDurationSeconds}</stagingProgressPauseDurationSeconds>
[INFO] <stagingProgressTimeoutMinutes default-value="5">${stagingProgressTimeoutMinutes}</stagingProgressTimeoutMinutes>
[INFO] <stagingRepositoryId>${stagingRepositoryId}</stagingRepositoryId>
[INFO] <updateReleaseInfo>${updateReleaseInfo}</updateReleaseInfo>
[INFO] </configuration>
...
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git log -n1 --date-order HEAD
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent
[DEBUG] GitLatestRevisionCommandConsumer consumeLine : commit 4875b5de9d40f8a00be37e25d3548755b1f044f4
...
[DEBUG] GitLatestRevisionCommandConsumer consumeLine : [maven-release-plugin] prepare release 0.25.0
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git pull git#github.com:wix/wix-oss-parents.git HEAD
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git diff --raw 4875b5de9d40f8a00be37e25d3548755b1f044f4
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent
...
[INFO] Executing: /bin/sh -c cd /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent && git log -n1 --date-order HEAD
[INFO] Working directory: /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent
[DEBUG] GitLatestRevisionCommandConsumer consumeLine : commit b5c5fa4e2a0c16d9247ae9261a67aeb4b1f09dda
...
[DEBUG] GitLatestRevisionCommandConsumer consumeLine : [maven-release-plugin] prepare for next development iteration
[INFO] Storing revision in 'scm.revision' project property.
[INFO] Project at revision b5c5fa4e2a0c16d9247ae9261a67aeb4b1f09dda
...
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) # wix-oss-parents-parent ---
...
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-gpg-plugin:1.6:sign' with basic configurator -->
[DEBUG] (f) ascDirectory = /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/gpg
[DEBUG] (f) defaultKeyring = true
[DEBUG] (f) interactive = false
[DEBUG] (f) keyname = ***
[DEBUG] (f) passphraseServerId = ***
[DEBUG] (f) project = MavenProject: com.wix:wix-oss-parents-parent:0.25.0 # /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter#f08fdce
[DEBUG] (f) skip = false
[DEBUG] (f) useAgent = true
[DEBUG] -- end configuration --
[DEBUG] Generating signature for /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/wix-oss-parents-parent-0.25.0.pom
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # wix-oss-parents-parent ---
...
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-install-plugin:2.4:install' with basic configurator -->
[DEBUG] (f) artifact = com.wix:wix-oss-parents-parent:pom:0.25.0
[DEBUG] (f) attachedArtifacts = [com.wix:wix-oss-parents-parent:pom.asc:0.25.0]
[DEBUG] (f) createChecksum = false
[DEBUG] (f) localRepository = id: local
[INFO] url: file:///home/builduser/.m2/repository/
[INFO] layout: none
[DEBUG] (f) packaging = pom
[DEBUG] (f) pomFile = /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml
[DEBUG] (s) skip = false
[DEBUG] (f) updateReleaseInfo = false
[DEBUG] -- end configuration --
...
[INFO] Installing /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/0.25.0/wix-oss-parents-parent-0.25.0.pom
...
[DEBUG] Installing com.wix:wix-oss-parents-parent/maven-metadata.xml to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/maven-metadata-local.xml
[INFO] Installing /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/wix-oss-parents-parent-0.25.0.pom.asc to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/0.25.0/wix-oss-parents-parent-0.25.0.pom.asc
...
[DEBUG] Installing com.wix:wix-oss-parents-parent/maven-metadata.xml to /home/builduser/.m2/repository/com/wix/wix-oss-parents-parent/maven-metadata-local.xml
...
[INFO] --- nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) # wix-oss-parents-parent ---
...
Configuring mojo 'org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy' with basic configurator -->
[DEBUG] (f) artifact = com.wix:wix-oss-parents-parent:pom:0.25.0
[DEBUG] (f) attachedArtifacts = [com.wix:wix-oss-parents-parent:pom.asc:0.25.0]
[DEBUG] (f) autoDropAfterRelease = true
[DEBUG] (f) autoReleaseAfterClose = true
[DEBUG] (f) detectBuildFailures = true
[DEBUG] (f) mavenSession = org.apache.maven.execution.MavenSession#4ebadd3d
[DEBUG] (f) mojoExecution = org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy {execution: injected-nexus-deploy}
[DEBUG] (f) nexusUrl = https://oss.sonatype.org/
[DEBUG] (f) offline = false
[DEBUG] (f) packaging = pom
[DEBUG] (f) pluginArtifactId = nexus-staging-maven-plugin
[DEBUG] (f) pluginGroupId = org.sonatype.plugins
[DEBUG] (f) pluginVersion = 1.6.7
[DEBUG] (f) pomFile = /home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/pom.xml
[DEBUG] (f) serverId = ossrh
[DEBUG] (f) sslAllowAll = false
[DEBUG] (f) sslInsecure = false
[DEBUG] (f) stagingProgressPauseDurationSeconds = 3
[DEBUG] (f) stagingProgressTimeoutMinutes = 5
[DEBUG] -- end configuration --
...
[INFO] Performing local staging (local stagingDirectory="/home/builduser/agent03/work/4ae459b9554b762f/target/checkout/wix-oss-parents-parent/target/nexus-staging/staging")...
...
Regarding .m2, this is a build agent; it gets a fresh .m2...
Any ideas?
Mmhhh... Something is not so clear to me in your explanation..
First i don't think in this case the project structure is a problem...
The usual behaviour is:
I got a project 1.0-SNAPSHOT..
I release it with the maven release plugin..
This is tagged as 1.0 and committed into the tags folder
Then the trunk\branch version is incresed as 1.1-SNAPSHOT..
So it seems that you are downloading the trunk version and you are checking for the tagged version into the remote repository...
Can this be right?
If not, it is some kind of strange version related to the plugin execution, can you please check the SVN tag, and tell me which version as the pom there, and the comment of the commit with which the tag has been created?
The output of the two commands can also be an help to understand whats going on...
Lat thing, maybe not related, but are you downloading the artifacts into .m2 local repo, can you clean it and try again? It would not be the first time .m2 do something strange :)
After running mvn clean install, when I try to run mvn -pl setup exec:exec I get the following error:
[INFO] Scanning for projects... [INFO] [INFO]
------------------------------------------------------------------------ [INFO] Building sikulixsetup 1.1.1 [INFO]
------------------------------------------------------------------------ [INFO] [INFO] --- exec-maven-plugin:1.3.1:exec (default-cli) #
sikulixsetup --- [debug] RunTimeINIT: global init: entering as:
SETUP [debug] RunTimeINIT: ScreenDevice 0 has (0,0) --- will be
primary Screen(0) [debug] RunTimeINIT: Monitor 0: (0, 0) 1600 x
900 [debug] RunTimeINIT: runs as sikulixsetup-1.1.1-forsetup.jar
in:
C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master\Setup\target
[debug] RunTimeINIT: folder target detected - supposing Maven
project: C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master
***** show environment for SETUP (build 201605140512) user.home: C:\Users\bhowmik user.dir (work dir):
C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master\Setup
user.name: bhowmik java.io.tmpdir: C:\Users\bhowmik\AppData\Local\Temp
running 64Bit on Windows (6.1) in Maven project from some jar java
8-64 version 1.8.0_91-b14 vm 25.91-b14 class 52.0 arch amd64 app data
folder: C:\Users\bhowmik\AppData\Roaming\Sikulix libs folder: null
executing jar:
C:\Users\bhowmik\Downloads\TEST_NIGHTLY\SikuliX-2014-master\Setup\target\sikulixsetup-1.1.1-forsetup.jar
* classpath dump sikulix 0: /C:/Users/bhowmik/Downloads/TEST_NIGHTLY/SikuliX-2014-master/Setup/target/sikulixsetup-1.1.1-forsetup.jar
* classpath dump end
***** show environment end [debug] RunTimeSETUP: global init: leaving [debug] RunTimeSETUP: initAPI: entering [debug]
RunTimeSETUP: resourceList: enter [debug] RunTimeSETUP:
resourceLocation: (class org.sikuli.setup.RunSetup) /Lib/sikuli
[debug] RunTimeSETUP: resourceList: having jar:
jar:file:/C:/Users/bhowmik/Downloads/TEST_NIGHTLY/SikuliX-2014-master/Setup/target/sikulixsetup-1.1.1-forsetup.jar!/Lib/sikuli
[debug] RunTimeSETUP: files exported: 7 from: Lib/sikuli to:
C:\Users\bhowmik\AppData\Roaming\Sikulix\Lib\sikuli [debug]
RunTimeSETUP: initAPI: leaving [debug] RunTimeSETUP: exists libs
folder at:
C:\Users\bhowmik\AppData\Roaming\Sikulix\SikulixLibs_201605140512
[debug] RunTimeSETUP: libs folder empty or has wrong content
[debug] RunTimeSETUP: now exporting libs
* classpath dump 0: /C:/Users/bhowmik/Downloads/TEST_NIGHTLY/SikuliX-2014-master/Setup/target/sikulixsetup-1.1.1-forsetup.jar
* classpath dump end [error] RunTimeSETUP: *** terminating: libs to export not found on above classpath:
/sikulixlibs/windows/libs64 [debug] RunTimeSETUP: final cleanup
[debug] FileManager: deleteFileOrFolder:
C:\Users\bhowmik\AppData\Local\Temp\Sikulix_387398274 [INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 3.279 s [INFO] Finished at:
2016-05-14T11:10:34+05:30 [INFO] Final Memory: 13M/153M [INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec (default-cli) on
project sikulixsetup: Command execution failed. Process exited with an
error: 1 (Exit value: 1) -> [Help 1 ]
YES I did mvn clean.
Tried in Maven 3.1.0, 3.0.4 and 3.0.3
My multi-module maven project's build (mvn install) fails at some module. The cause is that the last module was built with SUCCESS, but in fact the jar is empty. And then the next module can't find the classes that it needs to see.
[INFO] Reactor Summary:
[INFO]
[INFO] myproject ......................................... SUCCESS [0.309s]
[INFO] myproject-service ................................. SUCCESS [0.011s]
[INFO] myproject-service-api ............................ SUCCESS [1.242s]
[INFO] myproject-service-spi ............................ FAILURE [1.422s]
[INFO] myproject-datap-lib-impl .................. SKIPPED
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.746s
[INFO] Finished at: Wed Jul 24 17:30:57 EEST 2013
[INFO] Final Memory: 62M/919M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project myproject-service-spi: Compilation failure: Compilation failure:
[ERROR] C:\dev\mything\myproject\trunk-checkout2\service\spi\src\main\java\org\myself\service\spi\validation\fake\AbstractConfigurableFakeDetector.java:[12,55] error: package org.myself.service.validation.fake does not exist
Here is the complete debug output from running mvn -X clean install -amd -Dmaven.test.skip=true > build.log http://nopaste.info/7f07571993.html
In IntelliJ IDEA it all looks good, the class exists.
Not just the generated jar is empty, also the folder service/api/target/classes.
My pom file for service-api is very basic, just like the others that work:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>myparent</artifactId>
<groupId>my.parent</groupId>
<version>myversion</version>
</parent>
<groupId>myproject.service.api</groupId>
<artifactId>myproject-service-api</artifactId>
<dependencies>
... some local and external dependencies
</dependencies>
<properties>
</properties>
</project>
No maven plugins here.
I don't think I have a cyclic dependency, because Maven 3 would detect this.
UPDATE
I've now got it down to this: a simple mvn compile on the module that creates the empty jar gives me this output in IntelliJ IDEA:
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myproject-service-api 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # myproject-service-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\myproject\trunk-checkout2\service\api\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # myproject-service-api ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 217 source files to C:\myproject\trunk-checkout2\service\api\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.908s
[INFO] Finished at: Wed Jul 24 21:56:49 EEST 2013
[INFO] Final Memory: 20M/232M
[INFO] ------------------------------------------------------------------------
And right after running that, the folder C:\myproject\trunk-checkout2\service\api\target\classes is empty. So the 217 Java classes are detected, maven says it compiles them and puts them into my target folder, but it does not.
Update 2
I've compared the output of mvn -X compile of a module that works compared to this one (remember, all end in BUILD SUCCESS but this one has an empty target folder). There is a difference: the failing one lists all java files as "Stale source detected".
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories: [C:\myproject\trunk-checkout2\service\api\src\main\java]
[DEBUG] Classpath: [C:\myproject\trunk-checkout2\service\api\target\classes
... all the dependency jars
[DEBUG] Output directory: C:\myproject\trunk-checkout2\service\api\target\classes
[DEBUG] CompilerReuseStrategy: reuseCreated
[DEBUG] useIncrementalCompilation enabled
[DEBUG] Stale source detected: C:\dev\myproject\trunk-checkout2\service\api\src\main\java\my\Class.java
... listing all 217 classes
[INFO] Changes detected - recompiling the module!
[DEBUG] Classpath:
[DEBUG] C:\myproject\trunk-checkout2\service\api\target\classes
... all the dependency jars
[DEBUG] Source roots:
[DEBUG] C:\myproject\trunk-checkout2\service\api\src\main\java
[DEBUG] Command line options:
[DEBUG] -d (...) -g -nowarn -target 1.6 -source 1.6 -encoding UTF-8
[DEBUG] incrementalBuildHelper#beforeRebuildExecution
[INFO] Compiling 217 source files to C:\myproject\trunk-checkout2\service\api\target\classes
[DEBUG] incrementalBuildHelper#afterRebuildExecution
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.060s
[INFO] Finished at: Wed Jul 24 23:16:37 EEST 2013
[INFO] Final Memory: 22M/328M
[INFO] ------------------------------------------------------------------------
I've seen this bug report https://jira.codehaus.org/browse/MCOMPILER-205 and I do have package-info.java files in this module, but I've tried a pre-3 compiler plugin, same result. And I've tried with an annotation as described there, no luck either. So I don't think it's the same case.
I don't have a public static void main, thus this bug Workaround for javac compilation order bug in maven can't be it.
UPDATE 3
There's an abort in javac, without notice (-verbose turned on). Just 1 class works, all 217 fails. So I guess I have to try to find which causes it, etc... will post again.
First in your log output there are several hints about things like ${version} which you should fix furthermore there are other warnings about duplicate definitions of dependencies etc.
I have taken a deeper look into the log output:
[ERROR] C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespivalidationfakeAbstractConfigurableFakeDetector.java:[12,55] error: package org.myself.service.validation.fake does not exist
[ERROR] C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespivalidationfakeAbstractConfigurableFakeDetector.java:[13,55] error: package org.myself.service.validation.fake does not exist
[ERROR] C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespivalidationfakeAbstractConfigurableFakeDetector.java:[82,14] error: cannot find symbol
[ERROR] symbol: class SimpleValidationResult
location: class AbstractConfigurableFakeDetector
C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespivalidationfakeAbstractConfigurableFakeDetector.java:[106,66] error: cannot find symbol
[ERROR] symbol: class FakeType
location: class AbstractConfigurableFakeDetector
C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespivalidationfakeAbstractConfigurableFakeDetector.java:[97,8] error: cannot find symbol
[ERROR] symbol: class SimpleValidationResult
location: interface SomethingThatReturnsValidationResult
C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespigenderresultAverageComputedGenderResultCollector.java:[4,46] error: package org.myself.service.gender does not exist
[ERROR] C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespigenderresultAverageComputedGenderResultCollector.java:[5,46] error: package org.myself.service.gender does not exist
[ERROR] C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespigenderresultAbstractAverageGenderCollector.java:[4,46] error: package org.myself.service.gender does not exist
[ERROR] C:devmythingmyprojecttrunk-checkout2servicespisrcmainjavaorgmyselfservicespigenderresultAverageComputedGenderResultCollector.java:[31,29] error: cannot find symbol
[ERROR] symbol: class ComputedGenderResult
location: class AverageComputedGenderResultCollector
which gives me the impression that you are using test classes or may be package names from the test area which will not work or you are missing a dependency to an other package.
The cause was due to a bug in javac. Some valid syntax it could not handle. That then generated the empty jar, and so on.
When I give mvn sonar:sonar for sample java project in sonar I get this error.The sample project is from link
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Simple Java Maven Project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.0:sonar (default-cli) # example-java-maven ---
[INFO] Sonar version: 3.5.1
[INFO] [12:29:59.781] Load batch settings
[INFO] [12:30:00.000] User cache: C:\Documents and Settings\xxx\.sonar\cache
[INFO] [12:30:00.156] Install plugins
INFO] [12:30:03.250] ------------- Executing Project Scan
[INFO] [12:30:04.500] Install JDBC driver
INFO] [12:30:04.515] Apply project exclusions
[WARN] [12:30:04.531] H2 database should be used for evaluation purpose only
[INFO] [12:30:04.531] Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
[INFO] [12:30:04.890] Initializing Hibernate
[INFO] [12:30:09.500] ------------- Inspecting Simple Java Maven Project
[INFO] [12:30:09.515] Load module settings
[INFO] [12:30:09.937] Excluded tests:
[INFO] [12:30:09.937] **/package-info.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.125s
[INFO] Finished at: Thu Jun 13 12:30:11 IST 2013
[INFO] Final Memory: 9M/28M
[INFO] ------------------------------------------------------------------------
ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (d
efault-cli) on project example-java-maven: Can not execute Sonar: You must insta
ll a plugin that supports the language 'java' -> [Help 1]
ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
Should I manually put any plugin to analyze java project?
It looks like you have removed the Java plugins from your Sonar home directory. You can upload the latest version at http://docs.codehaus.org/display/SONAR/Java+Ecosystem, copy the plugins into SONAR_HOME/extensions/plugins and restart your Sonar server.