cucumber-jvm-parallel-plugin is not recognizing the feature files - maven

I am new to maven and I have used cucumber-jvm-parallel-plugin:4.2.0 version to auto generate runner class and run feature files in parallel, but its throwing below error stack
[ERROR] Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners (generateRunners) on project JUnitCucumberParallelExecutionPractise: Features directory does not exist -> [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
<properties>
<src.main.java>src/main/java</src.main.java>
</properties>
<build>
<resources>
<resource>
<directory>${src.main.java}</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java/</source>
<source>src/main/resources/</source>
<source>com.qa.features</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<executable>C:\Program Files (x86)\Java\jdk1.8.0_211\bin\javac</executable>
</configuration>
</plugin>
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version> 4.2.0</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<featuresDirectory>${src.main.java}/com.qa.features</featuresDirectory>
<glue>
<package>com.qa.stepdef</package>
</glue>
<outputDirectory>${project.build.directory}/generated-test-sources/cucumber</outputDirectory>
<cucumberOutputDir>${project.build.directory}</cucumberOutputDir>
<format> json </format>
<strict>true</strict>
<monochrome>false</monochrome>
<useTestNG>false</useTestNG>
<namingScheme>simple</namingScheme>
<namingPattern>Parallel{c}IT</namingPattern>
<parallelScheme>FEATURE</parallelScheme>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/*IT.class</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Expected: Plugin should recognize my feature files in the path mentioned in
${src.main.java}/com.qa.features
Actual: Feature files are not recognized

You need to add below tag in cucumber-jvm-parallel-plugin plug-in
<featuresDirectory>src/main/resources/Feature</featuresDirectory>
Full plugin like:
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>4.1.0</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<glue>
<package>${gluePackage}</package>
</glue>
<outputDirectory>${project.build.directory}/generated-test-sources/cucumber</outputDirectory>
<featuresDirectory>${featuresDir}</featuresDirectory>
<cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
<plugins>
<plugin>
<name>json</name>
</plugin>
</plugins>
<strict>true</strict>
<monochrome>true</monochrome>
<tags>
<tag>${tag1}</tag>
</tags>
<!-- <tags> <tag>${tags}</tag> <tag>~#ignore</tag> </tags> -->
<useTestNG>false</useTestNG>
<namingScheme>simple</namingScheme>
<namingPattern>Parallel{c}IT</namingPattern>
<parallelScheme>FEATURE</parallelScheme>
<customVmTemplate></customVmTemplate>
</configuration>
</execution>
</executions>
</plugin>
Result after changes done as suggested by Shubham Jain

Related

Maven plugins via profile are not executed in specified phase

My requirement to execute testng.xml file to run the automation scripts and send the mail once execution is completed. I'll define like what tests to run from testng.xml file.
So I've decided to use maven profiles concept for running the testng.xml file and for sending execution reports as below. When i run the command using
"mvn test -P Code_Compile,Run_Tests,Mail_Reports", below mentioned profiles are not executed. Please let me know what I'm missing here.
<profiles>
<profile>
<id>Code_Compile</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>codecompile</id>
<phase>test</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>Run_Tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<executions>
<execution>
<id>runtests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>Mail_Reports</id>
<build>
<plugins>
<plugin>
<groupId>ch.fortysix</groupId>
<artifactId>maven-postman-plugin</artifactId>
<version>0.1.6</version>
<executions>
<execution>
<id>send a mail</id>
<phase>test</phase>
<goals>
<goal>send-mail</goal>
</goals>
<inherited>false</inherited>
<configuration>
<from>xx#gmail.com</from>
<subject>Latest Automation Report...</subject>
<failonerror>true</failonerror>
<mailhost>smtp.gmail.com</mailhost>
<mailport>465</mailport>
<mailssl>true</mailssl>
<mailAltConfig>true</mailAltConfig>
<mailuser>xx#gmail.com</mailuser>
<mailpassword>xxxxx</mailpassword>
<htmlMessage><![CDATA[<p>Hi, Please find enclosed latest Automation reports.</p>]]></htmlMessage>
<receivers>
<receiver>xxxx#gmail.com</receiver>
</receivers>
<fileSets>
<fileSet>
<directory>${basedir}/TestReports</directory>
<includes>
<include>LatestAutomationReport.zip</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
I've tried to include only plugins inside build tag instead of profiles by setting the phase as "test" for each plugin as shown below and tried to run "mvn test" command.As you can see below I've included test in each plugin.This try also didn't pick the execution of plugins. Please help me in solving this problem either via profiles or via plugins.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>codecompile</id>
<phase>test</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<executions>
<execution>
<id>runtests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>ch.fortysix</groupId>
<artifactId>maven-postman-plugin</artifactId>
<version>0.1.6</version>
<executions>
<execution>
<id>send a mail</id>
<phase>test</phase>
<goals>
<goal>send-mail</goal>
</goals>
<inherited>false</inherited>
<configuration>
<from>vikascool4#gmail.com</from>
<subject>Latest Automation Report...</subject>
<failonerror>true</failonerror>
<mailhost>smtp.gmail.com</mailhost>
<mailport>465</mailport>
<mailssl>true</mailssl>
<mailAltConfig>true</mailAltConfig>
<mailuser>vikascool4#gmail.com</mailuser>
<mailpassword>vikaschinna</mailpassword>
<htmlMessage><![CDATA[<p>Hi, Please find enclosed latest Automation reports.</p>]]></htmlMessage>
<receivers>
<receiver>vikas.voladri#gmail.com</receiver>
</receivers>
<fileSets>
<fileSet>
<directory>${basedir}/TestReports</directory>
<includes>
<include>LatestAutomationReport.zip</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
If you run mvn fr.jcgay.maven.plugins:buildplan-maven-plugin:1.3:list -P Code_Compile,Run_Tests,Mail_Reportsthis will output the plugins maven is executing and their execution ids, You might see from the output of the command that your executions are probably not overriding the default executions (as these have different ids).
Instead of defining your Code_Compile profile use the default properties defined here: https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
Also if you want to use a specific version of the compiler use pluginManagement to define that.

Clover failing with "No Clover database found, skipping report generation"

I'm trying to add Clover to my maven (groovy) project in order to get some code coverage results. However it fails to generate the code coverage report.
The report is just empty.
My src files are located in src/main/groovy and my tests are located in src/test/groovy
When I run:
mvn clean clover:setup test clover:instrument clover:aggregate clover:clover
Build log:
[INFO] No Clover instrumentation done on source files in: [/home/xxx/workspace/yyy/src/main/java, /home/xxx/workspace/yyy/target/generated-sources/groovy-stubs/main] as no matching sources files found (JAVA_LANGUAGE)
[INFO] No Clover instrumentation done on source files in: [/home/xxx/workspace/yyy/src/test/java, /home/xxx/workspace/yyy/src/test/groovy] as no matching sources files found (JAVA_LANGUAGE)
...
[WARNING] No Clover database found, skipping report generation
[INFO] No report being generated for this module.
...
And indeed if I look in my tree for any database file,
My pom.xml:
....
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<AlwaysPass />
</rules>
<fail>true</fail>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-test-resources</id>
<phase>validate</phase>
<goals>
<goal>testResources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${project.basedir}</directory>
<filtering>true</filtering>
<includes>
<include>src/**/*.*</include>
<include>vars/**/*.*</include>
<include>resources/**/*.*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- clover -->
<plugin>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<version>4.2.0</version>
</plugin>
<!-- Tests -->
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<goals>
<goal>addSources</goal>
<goal>addTestSources</goal>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
<configuration>
<sources>
<source>
<directory>${project.basedir}/src</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</source>
</sources>
<testSources>
<source>
<directory>${project.basedir}/src/test/groovy</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</source>
</testSources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<failIfNoTests>true</failIfNoTests>
<includes>
<include>**/*</include>
</includes>
</configuration>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<version>4.2.0</version>
</plugin>
</plugins>
</reporting>
</project>

"no main manifest attribute" while running Jar after building with maven

I have a problem getting a maven build to work properly. It builds just fine, except the Main-Class within the manifest file found in the JAR is not present.
Currently, I have one parrent POM, and one POM for each of two modules. The reactor summary shows a success on all three buils.
However, when I try to run the jar in one of the modules, I am told "no main manifest attribute" exists. Checking the content of the manifest-file within the jar shows the Main-Class is not set:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: user
Created-By: Apache Maven 3.3.9
Build-Jdk: 1.8.0_66
This is the build content of the parrent POM:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<executable>${java.compiler}</executable>
<verbose>${java.compiler.verbose}</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<quiet>${javadoc.quiet}</quiet>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>package</phase>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<modules>
<module>ConsolidatedCustomerMasterEndpoint</module>
<module>ConsolidatedCustomerMasterService</module>
</modules>
And this is the build content of the module POM:
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>no.xyz.ccm.config.CcmApp</mainClass>
<classifier>jetty</classifier>
<requiresUnpack>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>CcmService</artifactId>
</dependency>
</requiresUnpack>
<addResources>false</addResources>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${maven-build-helper-plugin.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/generated/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<configuration>
<delimiters>
<delimiter>#</delimiter>
</delimiters>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

Issue in Changing the war file name generated by maven

I just followed this question and modified my pom to create different war file. Here is the original configuration
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- Run with Jetty -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Compile java -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- Build war -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>2.1.1</version>
</plugin>
<!-- Pack zips -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>webapp</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>LabSystem${packname}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/webapp.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Here is the Modified (want to create Cambellton.war)
<build>
<finalName>Cambellton</finalName>
<plugins>
<!-- Run with Jetty -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Compile java -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- Build war -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>2.1.1</version>
</plugin>
<!-- Pack zips -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>webapp</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>Cambellton{packname}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/webapp.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
When try to build, it gives error, but war file is created. I think it giving problem when trying to create the zip file. Here is the error message
> [INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) # LabSystem ---
[INFO] Packaging webapp
[INFO] Assembling webapp [LabSystem] in [F:\MyDocuments\Java\ZK7LabSystem\LabSystem\LabSystem\target\Cambellton]
[INFO] Processing war project
[INFO] Copying webapp resources [F:\MyDocuments\Java\ZK7LabSystem\LabSystem\LabSystem\src\main\webapp]
[INFO] Webapp assembled in [4554 msecs]
[INFO] Building war: F:\MyDocuments\Java\ZK7LabSystem\LabSystem\LabSystem\target\Cambellton.war
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true')
[INFO]
[INFO] --- maven-assembly-plugin:2.2:single (webapp) # LabSystem ---
[INFO] Reading assembly descriptor: src/main/assembly/webapp.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.543s
[INFO] Finished at: Thu Dec 17 11:29:29 IST 2015
[INFO] Final Memory: 16M/348M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2:single (webapp) on project LabSystem: Failed to create assembly: Error adding file to archive: F:\MyDocuments\Java\ZK7LabSystem\LabSystem\LabSystem\target\LabSystem.war isn't a file. -> [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
EDIT 1
Here is the webapp.xml
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>webapp</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}/src/main/java</directory>
<outputDirectory>/${project.artifactId}/src</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/webapp</directory>
<outputDirectory>/${project.artifactId}/WebContent</outputDirectory>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.build.directory}/${project.artifactId}.war</source>
<outputDirectory>/</outputDirectory>
</file>
</files>
</assembly>
EDIT 2 :
Added $ symbol also, but still gives same error
As
<build>
<finalName>$Cambellton</finalName>
<plugins>
<!-- Run with Jetty -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Compile java -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- Build war -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>2.3</version>
</plugin>
<!-- Pack zips -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>webapp</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>Cambellton${packname}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/webapp.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
In the Maven Assembly Plugin configuration, check the
<finalName>Cambellton{packname}</finalName>
the {packname} is not recognized as a property because missing the $ prefix. Assuming that you define packname as a property in your pom.
In your original configuration, it was
<finalName>LabSystem${packname}</finalName>
Also check consistency with your src/main/assembly/webapp.xml file, which could include any or the specified generated war file, as below example:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>zip</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>*.war</include>
</includes>
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
</assembly>
Update
Base on your latest edits (adding the assembly configuration), I see several things which could be improved and the potential cause of error as well:
Your file defined in the source element is using the artifactId of the project, but you renamed it to be Cambellton, so you should also make it consistent with this change (${project.build.directory}/Cambellton.war instead of ${project.build.directory}/${project.artifactId}.war). This was causing the build error most probably
Instead of pointing to /${project.artifactId}/src I would replace it by ${project.basedir}/src (same for WebContent output directory)

While generating test coverage jenkins sends me errors and does not generate the folder or file

I generated this error: coverage results were found using the pattern '**/target/site/cobertura/coverage.xml
here is my pom.xml
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven.plugin</artifactId>
<version>
2.5
</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin </artifactId>
<configuration >
<formats >
<format> xml </format>
<format>html</format>
</formats>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>coverage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
Am I wrong or is the error in the handle part?
A hint:
Could not find goal 'coverage' in plugin org.codehaus.mojo:cobertura-maven-plugin:2.6 among available goals cobertura, instrument, clean, check, help, dump-datafile -> [Help 1]
Use this :
<project>
....
<build>
<finalName>${project.artifactId}-${project.version}-r${buildNumber}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
</project>

Resources