maven-release plugin fails to create a release if parent pom uses ranges - maven

I have a single module project, which I can create releases using maven-release-plugin
16:13:52 [INFO] Run maven with 'release:prepare release:perform -B -U -e -Dresume=false'
...
16:13:56 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
16:13:56 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-release-plugin:2.5.3:prepare (default-cli) # my-srv ---
16:13:57 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - Verifying that there are no local modifications...
16:13:57 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup
16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git rev-parse --show-prefix"
16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master
16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git status --porcelain ."
16:13:57 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master
16:13:57 [Thread-4] WARNING org.apache.maven.scm.manager.plexus.DefaultScmManager - Ignoring unrecognized line: ?? effective-pom.xml
16:13:57 [main] INFO org.apache.maven.shared.release.phase.CheckDependencySnapshotsPhase - Checking dependencies and plugins for snapshots ...
16:13:57 [main] INFO org.apache.maven.shared.release.phase.RewritePomsForReleasePhase - Transforming 'WS-Proxy'...
16:13:57 [main] INFO org.apache.maven.shared.release.phase.GenerateReleasePomsPhase - Not generating release POMs
16:13:57 [main] INFO org.apache.maven.shared.release.phase.RunPrepareGoalsPhase - Executing goals 'clean verify'...
16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Scanning for projects...
16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO]
16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --------------< com.mycompany.services:my-srv >---------------
16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Building WS-Proxy 1.8.13
16:13:59 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --------------------------------[ pom ]---------------------------------
16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO]
16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # my-srv ---
16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Deleting D:\jenkins\tools\ci-home\workspace\my-srv_master\target
16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO]
16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --- buildnumber-maven-plugin:1.4:create (create-buildnumber) # my-srv ---
16:14:00 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Change the default 'git' provider implementation to 'jgit'.
16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Storing buildNumber: 31a2d2bb9470473ed8cb36d0493377ad6e8a5103 at timestamp: 1623680040903
16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] Storing buildScmBranch: master
16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO]
16:14:01 [Thread-6] INFO org.apache.maven.shared.release.exec.InvokerMavenExecutor - [INFO] --- buildnumber-maven-plugin:1.4:create-timestamp (create-timestamp) # my-srv ---
...
I use a fixed version for the parent pom
...
<parent>
<groupId>com.mycompany.services</groupId>
<artifactId>parent</artifactId>
<version>0.5.0</version>
</parent>
<artifactId>my-srv</artifactId>
<packaging>pom</packaging>
<version>1.8.14-SNAPSHOT</version>
...
No we actually want to use version ranges for the parent
...
<parent>
<groupId>com.mycompany.services</groupId>
<artifactId>parent</artifactId>
<version>[0.5.0,0.7.0)</version>
</parent>
<artifactId>my-srv</artifactId>
<packaging>pom</packaging>
<version>1.8.12-SNAPSHOT</version>
...
However, this now fails as follows
10:58:54 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
10:58:54 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-release-plugin:2.5.3:prepare (default-cli) # my-srv ---
10:58:54 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - Verifying that there are no local modifications...
10:58:54 [main] INFO org.apache.maven.shared.release.phase.ScmCheckModificationsPhase - ignoring changes on: **\pom.xml.next, **\release.properties, **\pom.xml.branch, **\pom.xml.tag, **\pom.xml.backup, **\pom.xml.releaseBackup
10:58:54 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git rev-parse --show-prefix"
10:58:54 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master
10:58:55 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Executing: cmd.exe /X /C "git status --porcelain ."
10:58:55 [main] INFO org.apache.maven.scm.manager.plexus.DefaultScmManager - Working directory: d:\jenkins\tools\ci-home\workspace\my-srv_master
10:58:55 [Thread-4] WARNING org.apache.maven.scm.manager.plexus.DefaultScmManager - Ignoring unrecognized line: ?? effective-pom.xml
10:58:55 [main] INFO org.apache.maven.shared.release.phase.CheckDependencySnapshotsPhase - Checking dependencies and plugins for snapshots ...
10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 2.863 s
10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-06-21T10:58:55+02:00
10:58:55 [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project my-srv: Can't release project due to non released dependencies :
10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - com.mycompany.services:parent:pom:0.6.1-SNAPSHOT
10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - in project 'WS-Proxy' (com.mycompany.services:my-srv:pom:1.8.12-SNAPSHOT)
10:58:55 [main] ERROR org.apache.maven.cli.MavenCli - -> [Help 1]
10:58:55 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project my-srv: Can't release project due to non released dependencies :
10:58:55 com.mycompany.services:parent:pom:0.6.1-SNAPSHOT
10:58:55 in project 'WS-Proxy' (com.mycompany.services:my-srv:pom:1.8.12-SNAPSHOT)
I understand that the dependency com.mycompany.services:parent:pom:0.6.1-SNAPSHOT is a SNAPSHOT but why. According to Dependency Mediation and Conflict Resolution
Resolution of dependency ranges should not resolve to a snapshot (development version) unless it is included as an explicit boundary.
I addition, there is a release version com.mycompany.services:parent:pom:0.6.1 available.

Related

Maven build failure in Jenkins pipeline

I've Jenkins as my CI/CD with over 30 multi-branch pipelines running and I have started getting this error at "artifactory configuration stage" when trying to deploy the artifactory to Jfrog. The snippet of my Jenkinsfile is as follows:
// Artifactory Intigration
stage('Artifactory configuration') {
container('mvn') {
// Obtain an Artifactory server instance, defined in Jenkins --> Manage:
server = Artifactory.server 'dlight-jfrog'
rtMaven = Artifactory.newMavenBuild()
rtMaven.tool = 'mvn' // Tool name from Jenkins configuration
rtMaven.opts = "-Denv=dev"
rtMaven.deployer releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local', server: server
rtMaven.resolver releaseRepo: 'libs-release', snapshotRepo: 'libs-snapshot', server: server
rtMaven.deployer.deployArtifacts = false // Disable artifacts deployment during Maven run
buildInfo = Artifactory.newBuildInfo()
}
}
// sonarqube configuration
stage('SonarQube analysis') {
withSonarQubeEnv('dlight sonar') {
//rtMaven.run pom: 'pom.xml', goals: 'package sonar:sonar -Dsonar.branch.name=develop', buildInfo: buildInfo
rtMaven.run pom: 'pom.xml', goals: 'package sonar:sonar', buildInfo: buildInfo
}
}
stage("Quality Gate"){
timeout(time: 1, unit: 'HOURS') {
def qg = waitForQualityGate()
if (qg.status != 'OK') {
error "Pipeline aborted due to quality gate failure: ${qg.status}"
}
}
}
// build artifact
stage ('MVN Install') {
rtMaven.run pom: 'pom.xml', goals: 'install', buildInfo: buildInfo
}
And the pipeline aborts with this error message
Downloaded from central: https://xxx.xxx.xxx.com/libs-release/org/apache/maven/surefire/surefire-junit4/2.18.1/surefire-junit4-2.18.1.jar (68 kB at 6.2 MB/s)
-------------------------------------------------------
T E S T S
-------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Skipping pipeline-name
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - This project has been banned from the build due to previous failures.
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 27.139 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-10-06T12:08:08Z
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 163M/962M
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project pipeline-name: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[main] ERROR org.apache.maven.cli.MavenCli - Command was /bin/sh -c cd /home/jenkins/agent/workspace/piplelinename && /usr/local/openjdk-11/bin/java -javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.8.0/org.jacoco.agent-0.8.0-runtime.jar=destfile=/home/jenkins/agent/workspace/core-service-pipeline-name/target/jacoco.exec org.apache.maven.surefire.booter.ForkedBooter /home/jenkins/agent/workspace/core-service-pipelinename/target/surefire/surefire5994062267928659047tmp /home/jenkins/agent/workspace/pipeline-name/target/surefire/surefire_06380871570757565397tmp
[main] ERROR org.apache.maven.cli.MavenCli - -> [Help 1]
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
[main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[Pipeline] }

Bitbucket pipeline with Jfrog failing to download plugins for build

I'm trying to configure a bitbucket pipeline with a jfrog repository. I'm able to authenticate to the repository. The problem that I'm facing is that maven is failing to download plugins during the build. What am I missing?
This is my pipeline configuration.
image: atlassian/default-image:2
pipelines:
default:
- step:
script:
- pipe: jfrog/jfrog-setup-cli:1.0.0
- source ./jfrog-setup-cli.sh
- jfrog rt use myrepo-config
- jfrog rt config show
- jfrog rt ping
- jfrog rt mvnc --server-id-resolve=myrepo --repo-resolve-releases=myrepo-mvn --repo-resolve-snapshots=myrepo-mvn --server-id-deploy=myrepo --repo-deploy-releases=myrepo-mvn-dev-local --repo-deploy-snapshots=myrepo-mvn-dev-local
- jfrog rt mvn clean install
- jfrog rt bce
- jfrog rt bag --config=./issues-collection.yml
- jfrog rt bp
- jfrog rt bs
- jfrog rt bpr promotion-repo
In Jfrog I have configured a remote repository that points to https://repo.maven.apache.org and a virtual repository that includes the remote one.
But my build fails when maven tries to fetch a plugin.
+ jfrog rt mvn clean install
[Info] Running Mvn...
[Debug] Checking prerequisites.
[Info] Downloading build-info-extractor from https://myrepo.jfrog.io/artifactory/extractors/org/jfrog/buildinfo/build-info-extractor-maven3/2.17.0/build-info-extractor-maven3-2.17.0-uber.jar
[Debug] Usage Report: Sending info...
[Debug] Sending HTTP GET request to: https://myrepo.jfrog.io/artifactory/extractors/org/jfrog/buildinfo/build-info-extractor-maven3/2.17.0/build-info-extractor-maven3-2.17.0-uber.jar
[Debug] Sending HTTP GET request to: https://myrepo.jfrog.io/artifactory/api/system/version
[Debug] The Artifactory version is: 7.25.4
[Debug] Sending HTTP POST request to: https://myrepo.jfrog.io/artifactory/api/system/usage
[Debug] Usage Report: Artifactory response: 200 OK
[Debug] Usage Report: Usage info sent successfully.
[Debug] Saving build general details at: /tmp/jfrog/builds/Z3JlZ3NvdWxzYnktdXMtbW9kZWxkcml2ZXJzLXBsdWdpbi0wMDEtYWRkLXBpcGVsaW5lLWNvbmZpZ3J1YXRpb25fNDM=/partials
[Debug] Saving build general details at: /tmp/jfrog/builds/Z3JlZ3NvdWxzYnktdXMtbW9kZWxkcml2ZXJzLXBsdWdpbi0wMDEtYWRkLXBpcGVsaW5lLWNvbmZpZ3J1YXRpb25fNDM=/partials
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building us-myrepo-plugin-001 1.0-SNAPSHOT
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
[main] WARN org.codehaus.plexus.PlexusContainer - The POM for org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.2 is missing, no dependency information available
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.jar
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 2.833 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-10-26T00:22:03+00:00
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 9M/110M
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] ERROR org.apache.maven.cli.MavenCli - Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.2 in artifactory-release (https://myrepo.jfrog.io/artifactory/myrepo-mvn) -> [Help 1]
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
[main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
[main] ERROR org.apache.maven.cli.MavenCli -
[main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
[main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[Error] exit status 1
2021-10-26T00:22:03.846245861Z stdout P
The URL of Maven Central is https://repo.maven.apache.org/maven2 not just https://repo.maven.apache.org.

Unable to execute maven tests at some times using citrus test frame work

I am running citrus test cases using maven command which looks like this
mvn integration-test -Dfilename.pattern=**/*Rest.xml -Dhtmlreport.name=report4.html
I am executing above command using java procesess executor here is the code
public class TestExecutor {
String[] command = new String[3];
command[0] = "cmd";
command[1] = "/c";
command[2] = "mvn integration-test -Dfilename.pattern=**/*"+xmlName+" "+"-Dhtmlreport.name="+report_name;
}
Process p = Runtime.getRuntime().exec(command);
I am exposing above code as rest service. user sends system properties through url. I am passing that information to maven fail safe plugin using maven command here is the maven fail safe plugin properties.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20</version>
<configuration>
<systemProperties>
<citrus.xml.file.name.pattern>${filename.pattern}</citrus.xml.file.name.pattern>
<citrus.html.report.file>${htmlreport.name}</citrus.html.report.file>
</systemProperties>
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
after my rest service receiving this information it execute maven command which was mentioned above. What the problem I am facing is when the rest service used as single instance the command was executing fine. But when I tested this code in for multi users ie is in multi threaded environment. Some times every user hit(Tests) was executing fine but most of the time this code was not executing all the users test cases(ie is some users test cases were excuting fine ) but for remaing users the console out put was just like this. There are no tests executed. I am using testNg to execute my test cases.
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.walmart.citrus:multi-user-handling >---------------
[INFO] Building Citrus Integration Test 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # multi-user-handling ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) # multi-user-handling ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to D:\springnotes\multi-user-handling\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # multi-user-handling ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) # multi-user-handling ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.20:test (default-test) # multi-user-handling ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # multi-user-handling ---
[INFO]
[INFO] --- maven-failsafe-plugin:2.20:integration-test (integration-tests) # multi-user-handling ---
[WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.568 s
[INFO] Finished at: 2018-08-23T23:41:20+05:30
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "test" could not be activated because it does not exist.
for remaining users in successes case of executing the test case out put was like this
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.citrus:multi-user-handling >---------------
[INFO] Building Citrus Integration Test 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # multi-user-handling ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) # multi-user-handling ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # multi-user-handling ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) # multi-user-handling ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.20:test (default-test) # multi-user-handling ---
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # multi-user-handling ---
[INFO]
[INFO] --- maven-failsafe-plugin:2.20:integration-test (integration-tests) # multi-user-handling ---
[WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.walmart.tests.SampleXmlIT
23:41:11,094 INFO citrus.Citrus| Unable to locate Citrus application properties
23:41:11,137 INFO BeanDefinitionReader| Loading XML bean definitions from URL [file:/D:/springnotes/multi-user-handling/target/test-classes/citrus-context.xml]
23:41:11,709 DEBUG BeanDefinitionReader| Loaded 0 bean definitions from location pattern [classpath*:citrus-context.xml]
23:41:13,545 INFO port.LoggingReporter|
23:41:13,545 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:13,545 INFO port.LoggingReporter| .__ __
23:41:13,545 INFO port.LoggingReporter| ____ |__|/ |________ __ __ ______
23:41:13,545 INFO port.LoggingReporter| _/ ___\| \ __\_ __ \ | \/ ___/
23:41:13,545 INFO port.LoggingReporter| \ \___| || | | | \/ | /\___ \
23:41:13,545 INFO port.LoggingReporter| \___ >__||__| |__| |____//____ >
23:41:13,545 INFO port.LoggingReporter| \/ \/
23:41:13,545 INFO port.LoggingReporter|
23:41:13,545 INFO port.LoggingReporter| C I T R U S T E S T S 2.7.3
23:41:13,546 INFO port.LoggingReporter|
23:41:13,546 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:13,546 DEBUG port.LoggingReporter| BEFORE TEST SUITE
23:41:13,546 INFO port.LoggingReporter|
23:41:13,546 INFO port.LoggingReporter|
23:41:13,546 INFO port.LoggingReporter| BEFORE TEST SUITE: SUCCESS
23:41:13,546 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:13,546 INFO port.LoggingReporter|
23:41:13,582 DEBUG t.TestContextFactory| Created new test context - using global variables: '{}'
23:41:14,618 INFO port.LoggingReporter|
23:41:14,618 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:14,618 DEBUG port.LoggingReporter| STARTING TEST 20180326024725Rest <com\walmart\resources>
23:41:14,618 INFO port.LoggingReporter|
23:41:14,618 DEBUG citrus.TestCase| Initializing test case
23:41:14,619 DEBUG context.TestContext| Setting variable: citrus.test.name with value: '20180326024725Rest'
23:41:14,619 DEBUG context.TestContext| Setting variable: citrus.test.package with value: 'com\walmart\resources'
23:41:14,619 DEBUG citrus.TestCase| Test variables:
23:41:14,619 DEBUG citrus.TestCase| citrus.test.name = 20180326024725Rest
23:41:14,619 DEBUG citrus.TestCase| citrus.test.package = com\test\resources
23:41:14,619 INFO port.LoggingReporter|
23:41:14,619 DEBUG port.LoggingReporter| TEST STEP 1/1: echo
23:41:14,620 INFO actions.EchoAction|
hmmm
23:41:14,620 INFO port.LoggingReporter|
23:41:14,620 DEBUG port.LoggingReporter| TEST STEP 1/1 SUCCESS
23:41:14,621 INFO port.LoggingReporter|
23:41:14,621 INFO port.LoggingReporter| TEST SUCCESS 20180326024725Rest (com\walmart\resources)
23:41:14,621 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:14,621 INFO port.LoggingReporter|
[TestHTMLReporter] Access is denied
23:41:15,207 INFO port.LoggingReporter|
23:41:15,207 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:15,208 DEBUG port.LoggingReporter| AFTER TEST SUITE
23:41:15,208 INFO port.LoggingReporter|
23:41:15,208 INFO port.LoggingReporter|
23:41:15,208 INFO port.LoggingReporter| AFTER TEST SUITE: SUCCESS
23:41:15,208 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:15,209 INFO port.LoggingReporter|
23:41:15,209 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:15,209 INFO port.LoggingReporter|
23:41:15,209 INFO port.LoggingReporter| CITRUS TEST RESULTS
23:41:15,209 INFO port.LoggingReporter|
23:41:15,212 INFO port.LoggingReporter| 20180326024725Rest ............................................. SUCCESS
23:41:15,212 INFO port.LoggingReporter|
23:41:15,212 INFO port.LoggingReporter| TOTAL: 1
23:41:15,212 DEBUG port.LoggingReporter| SKIPPED: 0 (0.0%)
23:41:15,212 INFO port.LoggingReporter| FAILED: 0 (0.0%)
23:41:15,212 INFO port.LoggingReporter| SUCCESS: 1 (100.0%)
23:41:15,212 INFO port.LoggingReporter|
23:41:15,212 INFO port.LoggingReporter| ------------------------------------------------------------------------
23:41:15,212 DEBUG report.HtmlReporter| Generating HTML test report
23:41:15,213 DEBUG util.FileUtils| Reading file resource: 'test-detail.html' (encoding is 'windows-1252')
23:41:15,584 DEBUG util.FileUtils| Reading file resource: 'test-report.html' (encoding is 'windows-1252')
23:41:15,591 INFO report.HtmlReporter| Generated HTML test report: target\citrus-reports\report8.html
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.61 s - in com.walmart.tests.SampleXmlIT
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[WARNING] Could not delete temp directory D:\springnotes\multi-user-handling\target\surefire because Directory D:\springnotes\multi-user-handling\target\surefire unable to be deleted.
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.719 s
[INFO] Finished at: 2018-08-23T23:41:19+05:30
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "test" could not be activated because it does not exist.
Here is my rest service code
#RestController
public class RestRunner {
static String namePattern="";
#RequestMapping(value="runurtest", method=RequestMethod.GET)
#ResponseBody
public String rest(#RequestParam String xmlName,#RequestParam String report_name) throws Exception
{
//TestExecutor class executes maven command in java procesess
new TestExecutor().exec(xmlName,report_name);
//report manger class sends html report user
return new ReportManager().readHTMLFile(report_name);
}
}
By default, the maven-failsafe-plugin will only execute test classes with the following wildcard patterns:
**/IT*.java **/*IT.java **/*ITCase.java
In case your test classes do not follow any of these naming conventions, then failsafe will not execute your tests.
You can configure the maven-failsafe-plugin to use different naming patterns. Please see how to do this in https://maven.apache.org/surefire/maven-failsafe-plugin/examples/inclusion-exclusion.html

mvn sonar:sonar not generating dashboard data

We use maven for building our projects.
I implemented the configuration mentioned in http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Maven to analyze the project using sonar.
Snapshot of my .m2/settings.xml
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>jdbc:oracle:thin:#10.207.67.95/XE</sonar.jdbc.url>
<sonar.jdbc.username>sonarqube</sonar.jdbc.username>
<sonar.jdbc.password>sonarqube</sonar.jdbc.password>
<sonar.jdbc.driver>oracle.jdbc.OracleDriver</sonar.jdbc.driver>
<sonar.host.url>http://localhost:9000</sonar.host.url>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
<activeProfile>sonar</activeProfile>
</activeProfiles>
When i run mvn sonar:sonar from the directory containing my pom.xml, it shows build success.
I checked the dashboard, the project shows up, and the LOC shown is empty.
Dashboard shows up no issues.
Output from mvn sonar:sonar
[INFO] ------------------------------------------------------------------------
[INFO] Building xxxx 2.2.0.29-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.0:sonar (default-cli) # xxxx ---
[INFO] Sonar version: 3.6.2
[INFO] [15:18:16.984] Load batch settings
[INFO] [15:18:17.043] User cache: /home/jsaluja/.sonar/cache
[INFO] [15:18:17.048] Install plugins
[INFO] [15:18:17.589] Install JDBC driver
[INFO] [15:18:17.596] Create JDBC datasource for jdbc:oracle:thin:#10.207.67.95/XE
[INFO] [15:18:19.296] Initializing Hibernate
[INFO] [15:18:21.830] Load project settings
[INFO] [15:18:21.858] Apply project exclusions
[INFO] [15:18:22.003] ------------- Scan xxxx
[INFO] [15:18:22.008] Load module settings
[INFO] [15:18:22.607] Quality profile : [name=Sonar way,language=java]
[INFO] [15:18:22.625] Excluded tests:
[INFO] [15:18:22.625] **/package-info.java
[INFO] [15:18:22.660] Configure Maven plugins
[INFO] [15:18:22.728] Compare to previous analysis (2013-08-08)
[INFO] [15:18:22.750] Compare over 5 days (2013-08-03, analysis of 2013-08-07 12:55:06.0)
[INFO] [15:18:22.763] Compare over 30 days (2013-07-09, analysis of 2013-08-07 12:55:06.0)
[INFO] [15:18:22.890] Base dir: /home/jsaluja/0801/frontend/yyyy/xxxx
[INFO] [15:18:22.890] Working dir: /home/jsaluja/0801/frontend/yyyy/xxxx/target/sonar
[INFO] [15:18:22.890] Binary dirs: /home/jsaluja/0801/frontend/yyyy/xxxx/target/classes
[INFO] [15:18:22.890] Source encoding: UTF-8, default locale: en_US
[INFO] [15:18:22.894] Sensor JavaSourceImporter...
[INFO] [15:18:22.894] Sensor JavaSourceImporter done: 0 ms
[INFO] [15:18:22.894] Sensor JavaSquidSensor...
[INFO] [15:18:22.894] Sensor JavaSquidSensor done: 0 ms
[INFO] [15:18:22.894] Sensor SurefireSensor...
[INFO] [15:18:22.895] parsing /home/jsaluja/0801/frontend/yyyy/xxxx/target/surefire-reports
[INFO] [15:18:22.898] Sensor SurefireSensor done: 4 ms
[INFO] [15:18:22.898] Sensor CpdSensor...
[INFO] [15:18:22.898] SonarEngine is used
[INFO] [15:18:22.898] Sensor CpdSensor done: 0 ms
[INFO] [15:18:22.898] Sensor InitialOpenIssuesSensor...
[INFO] [15:18:22.901] Sensor InitialOpenIssuesSensor done: 3 ms
[INFO] [15:18:22.901] Sensor ProfileSensor...
[INFO] [15:18:23.209] Sensor ProfileSensor done: 308 ms
[INFO] [15:18:23.209] Sensor ProfileEventsSensor...
[INFO] [15:18:23.236] Sensor ProfileEventsSensor done: 27 ms
[INFO] [15:18:23.236] Sensor ProjectLinksSensor...
[INFO] [15:18:23.241] Sensor ProjectLinksSensor done: 5 ms
[INFO] [15:18:23.241] Sensor VersionEventsSensor...
[INFO] [15:18:23.253] Sensor VersionEventsSensor done: 12 ms
[INFO] [15:18:23.253] Sensor Maven dependencies...
[INFO] [15:18:23.805] Sensor Maven dependencies done: 552 ms
[INFO] [15:18:23.805] Sensor JaCoCoSensor...
[INFO] [15:18:23.809] Project coverage is set to 0% since there is no directories with classes.
[INFO] [15:18:23.809] Sensor JaCoCoSensor done: 4 ms
[INFO] [15:18:24.112] Execute decorators...
[INFO] [15:18:24.287] Store results in database
[INFO] [15:18:24.336] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/a.b.c.d.e:xxxx
[INFO] [15:18:24.337] Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
[INFO] [15:18:24.337] Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
[INFO] [15:18:24.387] Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
[INFO] [15:18:24.398] -> Keep one snapshot per day between 2013-07-11 and 2013-08-07
[INFO] [15:18:24.400] -> Keep one snapshot per week between 2012-08-09 and 2013-07-11
[INFO] [15:18:24.401] -> Keep one snapshot per month between 2008-08-14 and 2012-08-09
[INFO] [15:18:24.402] -> Delete data prior to: 2008-08-14
[INFO] [15:18:24.404] -> Clean xxxx [id=10080]
[INFO] [15:18:24.409] <- Clean snapshot 13758
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.637s
[INFO] Finished at: Thu Aug 08 15:18:24 EDT 2013
[INFO] Final Memory: 19M/277M
I could independently run sonar runner from the same directory using sonar-project.properties and dashboard shows up data, and a bunch of issues.
Output from sonar runner:
~/sonar-runner-2.3/bin/sonar-runner
SonarQube Runner 2.3
Java 1.6.0_21 Sun Microsystems Inc. (64-bit)
Linux 2.6.18-238.5.1.el5 amd64
INFO: Runner configuration file: /home/jsaluja/sonar-runner-2.3/conf/sonar-runner.properties
INFO: Project configuration file: /home/jsaluja/0801/frontend/yyyy/xxxx/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar
INFO: SonarQube Server 3.6.2
15:19:14.377 INFO - Load batch settings
15:19:14.440 INFO - User cache: /home/jsaluja/.sonar/cache
15:19:14.444 INFO - Install plugins
15:19:14.944 INFO - Install JDBC driver
15:19:14.952 INFO - Create JDBC datasource for jdbc:oracle:thin:#10.207.67.95/XE
15:19:16.300 INFO - Initializing Hibernate
15:19:18.517 INFO - Load project settings
15:19:18.548 INFO - Apply project exclusions
15:19:18.682 INFO - ------------- Scan xxxx
15:19:18.688 INFO - Load module settings
15:19:19.295 INFO - Quality profile : [name=Sonar way,language=java]
15:19:19.314 INFO - Excluded tests:
15:19:19.314 INFO - **/package-info.java
15:19:19.355 INFO - Configure Maven plugins
15:19:19.439 INFO - Compare to previous analysis (2013-08-08)
15:19:19.463 INFO - Compare over 5 days (2013-08-03, analysis of 2013-08-08 14:38:22.472)
15:19:19.478 INFO - Compare over 30 days (2013-07-09, analysis of 2013-08-08 14:38:22.472)
15:19:19.647 INFO - Base dir: /home/jsaluja/0801/frontend/yyyy/xxxx
15:19:19.647 INFO - Working dir: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar
15:19:19.648 INFO - Source dirs: /home/jsaluja/0801/frontend/yyyy/xxxx/src
15:19:19.648 INFO - Source encoding: UTF-8, default locale: en_US
15:19:19.691 INFO - Sensor JavaSourceImporter...
15:19:20.048 INFO - Sensor JavaSourceImporter done: 357 ms
15:19:20.048 INFO - Sensor JavaSquidSensor...
15:19:20.115 INFO - Java AST scan...
15:19:22.213 INFO - Java AST scan done: 2098 ms
15:19:22.354 INFO - Sensor JavaSquidSensor done: 2306 ms
15:19:22.354 INFO - Sensor SurefireSensor...
15:19:22.355 INFO - parsing /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar/build/surefire-reports
15:19:22.355 INFO - Sensor SurefireSensor done: 1 ms
15:19:22.355 INFO - Sensor CpdSensor...
15:19:22.355 INFO - SonarEngine is used
15:19:22.360 INFO - Cross-project analysis disabled
15:19:22.635 INFO - Sensor CpdSensor done: 280 ms
15:19:22.636 INFO - Sensor CheckstyleSensor...
15:19:22.637 INFO - Execute Checkstyle 5.6...
15:19:22.648 INFO - Checkstyle configuration: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar/checkstyle.xml
15:19:23.990 INFO - Execute Checkstyle 5.6 done: 1353 ms
15:19:24.001 INFO - Sensor CheckstyleSensor done: 1365 ms
15:19:24.001 INFO - Sensor PmdSensor...
15:19:24.004 INFO - Execute PMD 4.3...
15:19:24.024 INFO - Java version: 1.5
15:19:24.066 INFO - PMD configuration: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar/pmd.xml
15:19:27.017 INFO - Execute PMD 4.3 done: 3013 ms
15:19:27.110 INFO - Sensor PmdSensor done: 3109 ms
15:19:27.110 INFO - Sensor InitialOpenIssuesSensor...
15:19:27.363 INFO - Sensor InitialOpenIssuesSensor done: 253 ms
15:19:27.363 INFO - Sensor ProfileSensor...
15:19:27.638 INFO - Sensor ProfileSensor done: 275 ms
15:19:27.638 INFO - Sensor ProfileEventsSensor...
15:19:27.654 INFO - Sensor ProfileEventsSensor done: 16 ms
15:19:27.655 INFO - Sensor ProjectLinksSensor...
15:19:27.660 INFO - Sensor ProjectLinksSensor done: 5 ms
15:19:27.660 INFO - Sensor VersionEventsSensor...
15:19:27.674 INFO - Sensor VersionEventsSensor done: 14 ms
15:19:27.674 INFO - Sensor JaCoCoSensor...
15:19:27.677 INFO - Project coverage is set to 0% since there is no directories with classes.
15:19:27.677 INFO - Sensor JaCoCoSensor done: 3 ms
15:19:28.164 INFO - Execute decorators...
15:19:31.041 INFO - Store results in database
15:19:31.214 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/a.b.c.d.xxxx
15:19:31.216 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
15:19:31.230 INFO - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
15:19:31.279 INFO - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
15:19:31.288 INFO - -> Keep one snapshot per day between 2013-07-11 and 2013-08-07
15:19:31.289 INFO - -> Keep one snapshot per week between 2012-08-09 and 2013-07-11
15:19:31.289 INFO - -> Keep one snapshot per month between 2008-08-14 and 2012-08-09
15:19:31.289 INFO - -> Delete data prior to: 2008-08-14
15:19:31.292 INFO - -> Clean xxxx [id=11882]
15:19:31.296 INFO - <- Clean snapshot 13716
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 17.946s
Final Memory: 20M/732M
INFO: --------------------------------------------
The dashboard screenshot for the mvn and sonar runner executed for the same project
https://docs.google.com/file/d/0B2TK6N3XnvavRmdrX0ZYb2V3Q0k/edit?usp=sharing
Red one shows output for mvn - no LOC
Green one shows output for sonar runner - LOC and issues identified
What am i missing with mvn configuration ?
It seems that sonar does not find any class files
15:19:27.677 INFO - Project coverage is set to 0% since there is no directories with classes.
Did you run
mvn clean install -DskipTests
before mvn sonar:sonar as recommended? mvn sonar:sonar will not compile the source code anymore (I think since sonar 3.6).

Maven/Jenkins - trouble running Maven from Jenkins

So I have a project that runs Jenkins, which calls Maven, which calls Ant (dont ask why) which runs a series of JMeter tests.
I know the Ant and JMeter stuff works fine. The issue Im having is when trying to add Maven to the mix.
I have it calling the pom.xml which simple references the ant build.xml file. the error I get is below:
Started by user anonymous
Building in workspace C:\Users\MURPHYA1\.jenkins\jobs\JMeter-Running-Mavin\workspace
Parsing POMs
Discovered a new module JMeter-Running-Maven:JMeter-Running-Maven JMeter-Running-Maven
Modules changed, recalculating dependency graph
[workspace] $ java -cp "C:\Users\MURPHYA1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-agent-1.4.jar;C:\Users\MURPHYA1\Desktop\Code samples\apache-maven-3.1.0-bin\apache-maven-3.1.0\boot\plexus-classworlds-2.4.2.jar" jenkins.maven3.agent.Maven31Main "C:\Users\MURPHYA1\Desktop\Code samples\apache-maven-3.1.0-bin\apache-maven-3.1.0" C:\Users\MURPHYA1\.jenkins\war\WEB-INF\lib\remoting-2.30.jar C:\Users\MURPHYA1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-interceptor-1.4.jar C:\Users\MURPHYA1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.4.jar 56391
<===[JENKINS REMOTING CAPACITY]===>channel started
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
Executing Maven: -B -f C:\Users\MURPHYA1\.jenkins\jobs\JMeter-Running-Mavin\workspace\pom.xml run
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Scanning for projects...
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener -
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Building JMeter-Running-Maven 1.0-SNAPSHOT
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building JMeter-Running-Maven 1.0-SNAPSHOT
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - BUILD FAILURE
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Total time: 0.749s
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Finished at: Wed Aug 07 11:10:02 BST 2013
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - Final Memory: 3M/61M
[pool-1-thread-1] INFO hudson.maven.Maven3Builder$MavenExecutionListener - ------------------------------------------------------------------------
[JENKINS] Archiving C:\Users\MURPHYA1\.jenkins\jobs\JMeter-Running-Mavin\workspace\pom.xml to C:\Users\MURPHYA1\.jenkins\jobs\JMeter-Running-Mavin\modules\JMeter-Running-Maven$JMeter-Running-Maven\builds\2013-08-07_11-09-52\archive\JMeter-Running-Maven\JMeter-Running-Maven\1.0-SNAPSHOT\JMeter-Running-Maven-1.0-SNAPSHOT.pom
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 4.863s
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: Wed Aug 07 11:10:06 BST 2013
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 3M/61M
[pool-1-thread-1] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
channel stopped
Finished: FAILURE
and my pom.xml is below:
<project>
<modelVersion>4.0.0</modelVersion>
<artifactId>JMeter-Running-Maven</artifactId>
<groupId>JMeter-Running-Maven</groupId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<tasks>
<ant antfile="${basedir}/build.xml">
<target name="prepare-JMeter-Running-Maven" />
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Is anyone able to point out where I have gone wrong?
Thanks
UPDATE
I am running this off a clients VDI machine, which I has having issues running commands such as mvn install, which was giving me errors such as connection refused:forbidden and timed out. Do you think this is the issue, or is my pom.xml just not correct?
So the issue was that the vdi was blocking me downloading the relevant jar and pom files. So what I did was run the task on my local machine, copied the files across to my vdi repo and for the jar files, I registered them with the following maven command:
mvn install:install-file -Dfile=.\lib\com.ibm.mq.jar -DgroupId=com.ibm.mq -DartifactId=WebsphereMQClassesForJava -Dversion=7.0.1.5 -Dpackaging=jar

Resources