Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -


i searched on internet provided answers did not in building project.

the error starting fork. tried following methods:

  1. mvn clean install -u
  2. when searched, people said because of java 7 , should work java 6. using java 6 only.
  3. some said set surefire plugin this:

   <groupid>org.apache.maven.plugins</groupid>    <artifactid>maven-surefire-plugin</artifactid>    <version>2.5</version>    <configuration>      <skiptests>false</skiptests>      <testfailureignore>true</testfailureignore>      <forkmode>once</forkmode>    </configuration> 

the actual error is:

[error] failed execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project junitcategorizer.instrument: error occurred in starting fork, check output in log -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project junitcategorizer.instrument: error occurred in starting fork, check output inlog @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:216) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:153) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:145) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:116) @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:80) @ org.apache.maven.lifecycle.internal.builder.singlethreaded.singlethreadedbuilder.build(singlethreadedbuilder.java:51) @ org.apache.maven.lifecycle.internal.lifecyclestarter.execute(lifecyclestarter.java:120) @ org.apache.maven.defaultmaven.doexecute(defaultmaven.java:347) @ org.apache.maven.defaultmaven.execute(defaultmaven.java:154) @ org.apache.maven.cli.mavencli.execute(mavencli.java:582) @ org.apache.maven.cli.mavencli.domain(mavencli.java:214) @ org.apache.maven.cli.mavencli.main(mavencli.java:158) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.codehaus.plexus.classworlds.launcher.launcher.launchenhanced(launcher.java:289) @ org.codehaus.plexus.classworlds.launcher.launcher.launch(launcher.java:229) @ org.codehaus.plexus.classworlds.launcher.launcher.mainwithexitcode(launcher.java:415) @ org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:356)caused by: org.apache.maven.plugin.mojoexecutionexception: error occurred in starting fork, check output in log @ org.apache.maven.plugin.surefire.surefireplugin.assertnoexception(surefireplugin.java:656) @ org.apache.maven.plugin.surefire.surefireplugin.handlesummary(surefireplugin.java:645) @ org.apache.maven.plugin.surefire.abstractsurefiremojo.executeafterpreconditionschecked(abstractsurefiremojo.java:137) @ org.apache.maven.plugin.surefire.abstractsurefiremojo.execute(abstractsurefiremojo.java:98) @ org.apache.maven.plugin.defaultbuildpluginmanager.executemojo(defaultbuildpluginmanager.java:132) @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:208)... 19 more caused by:         org.apache.maven.surefire.booter.surefirebooterforkexception: error occurred in starting fork, check output in log @ org.apache.maven.plugin.surefire.booterclient.forkstarter.fork(forkstarter.java:281) @ org.apache.maven.plugin.surefire.booterclient.forkstarter.run(forkstarter.java:113) @ org.apache.maven.plugin.surefire.abstractsurefiremojo.executeprovider(abstractsurefiremojo.java:199) @ org.apache.maven.plugin.surefire.abstractsurefiremojo.executeallproviders(abstractsurefiremojo.java:176) @ org.apache.maven.plugin.surefire.abstractsurefiremojo.executeafterpreconditionschecked(abstractsurefiremojo.java:135)     ... 22 more 

my pom file is:

<modelversion>4.0.0</modelversion> <groupid>com.topdesk.test.junitcategorizer</groupid> <artifactid>junitcategorizer</artifactid> <version>0.0.1-snapshot</version> <packaging>pom</packaging> <name>junitcategorizer</name> <modules>     <module>junitcategorizer.instrument</module>     <module>junitcategorizer.examples</module>     <module>junitcategorizer.reporter.maven</module>     <module>junitcategorizer.reporter.maven.site</module>     <module>junitcategorizer.cutdetection</module> </modules> <description>separating unit tests integration tests</description>  <organization>     <name>top informatie systemen bv</name>     <url>http://www.topdesk.com/</url> </organization>  <properties>     <project.build.sourceencoding>utf-8</project.build.sourceencoding>     <project.reporting.outputencoding>utf-8</project.reporting.outputencoding>     <surefire.version>2.12</surefire.version> </properties>  <prerequisites>     <maven>3.0</maven> </prerequisites>  <build>     <extensions>         <!-- use dav:http:// urls -->         <extension>             <groupid>org.apache.maven.wagon</groupid>             <artifactid>wagon-webdav</artifactid>             <version>1.0-beta-2</version>         </extension>         <extension>             <groupid>org.apache.maven.wagon</groupid>             <artifactid>wagon-ssh</artifactid>             <version>2.2</version>         </extension>     </extensions>      <pluginmanagement>         <!-- -->         <!-- please keep plugins in alphabetical order easy access -->         <!-- -->         <plugins>             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-assembly-plugin</artifactid>                 <version>2.3</version>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-clean-plugin</artifactid>                 <version>2.4.1</version>             </plugin>              <!-- build java 1.6 -->             <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>                     <encoding>utf-8</encoding>                     <showwarnings>true</showwarnings>                 </configuration>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-dependency-plugin</artifactid>                 <version>2.4</version>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-deploy-plugin</artifactid>                 <version>2.7</version>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-failsafe-plugin</artifactid>                 <version>${surefire.version}</version>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-install-plugin</artifactid>                 <version>2.3.1</version>             </plugin>              <!-- add default manifest information -->             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-jar-plugin</artifactid>                 <version>2.4</version>                 <configuration>                     <archive>                         <manifestentries>                             <implementation-title>${project.name}</implementation-title>                             <implementation-vendor>${project.organization.name}</implementation-vendor>                             <implementation-vendorid>${project.groupid}</implementation-vendorid>                             <implementation-version>${project.version}</implementation-version>                         </manifestentries>                     </archive>                 </configuration>                 <executions>                     <execution>                         <phase>package</phase>                         <goals>                             <goal>jar</goal>                             <goal>test-jar</goal>                         </goals>                     </execution>                 </executions>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-javadoc-plugin</artifactid>                 <version>2.8.1</version>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-pmd-plugin</artifactid>                 <version>2.7.1</version>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-release-plugin</artifactid>                 <version>2.2.2</version>             </plugin>              <!-- specify resource encoding -->             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-resources-plugin</artifactid>                 <version>2.5</version>                 <configuration>                     <encoding>utf-8</encoding>                 </configuration>             </plugin>              <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-site-plugin</artifactid>                 <version>3.0</version>                 <executions>                     <execution>                         <id>attach-descriptor</id>                         <goals>                             <goal>attach-descriptor</goal>                         </goals>                     </execution>                 </executions>                 <configuration>                     <reportplugins combine.children="append">                         <!-- lock project info plugin version -->                         <plugin>                             <groupid>org.apache.maven.plugins</groupid>                             <artifactid>maven-project-info-reports-plugin</artifactid>                             <version>2.4</version>                             <configuration>                                 <!-- disable checking repositories dependency report -->                                 <dependencylocationsenabled>false</dependencylocationsenabled>                             </configuration>                         </plugin>                         <plugin>                             <groupid>org.codehaus.mojo</groupid>                             <artifactid>versions-maven-plugin</artifactid>                             <version>1.3.1</version>                             <reportsets>                                 <reportset>                                     <reports>                                         <report>dependency-updates-report</report>                                         <report>plugin-updates-report</report>                                         <report>property-updates-report</report>                                     </reports>                                 </reportset>                             </reportsets>                         </plugin>                     </reportplugins>                 </configuration>                 <dependencies>                     <!-- enable markdown format -->                     <dependency>                         <groupid>org.tautua.markdownpapers</groupid>                         <artifactid>markdownpapers-doxia-module</artifactid>                         <version>1.2.7</version>                     </dependency>                 </dependencies>             </plugin>              <!-- attach source bundles -->             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-source-plugin</artifactid>                 <version>2.1.2</version>                 <executions>                     <execution>                         <id>attach-sources</id>                         <phase>verify</phase>                         <goals>                             <goal>jar-no-fork</goal>                             <goal>test-jar-no-fork</goal>                         </goals>                     </execution>                 </executions>             </plugin>              <!-- test java 1.6 -->             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-surefire-plugin</artifactid>                 <version>${surefire.version}</version>                 <configuration>                     <source>1.6</source>                     <target>1.6</target>                     <encoding>utf-8</encoding>                     <!-- use system.out print test failures instead of generating separate                          txt files -->                     <usefile>false</usefile>                     <includes>                         <include>**/*test.java</include>                         <include>**/*testcase.java</include>                     </includes>                     <argline>-javaagent:${com.topdesk.test.junitcategorizer:junitcategorizer.instrument:jar}="--out ${calledclassesfile} --suppress ${whitelistdir}/suppressmethods.xml --suppress ${whitelistdir}/suppressmethods-maven.xml --suppress ${whitelistdir}/suppressmethods-mockito.xml"</argline>                 </configuration>             </plugin>              <!-- build war files -->             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-war-plugin</artifactid>                 <version>2.2</version>             </plugin>             <!--this plugin's configuration used store eclipse m2e settings                  only. has no influence on maven build itself. -->             <plugin>                 <groupid>org.eclipse.m2e</groupid>                 <artifactid>lifecycle-mapping</artifactid>                 <version>1.0.0</version>                 <configuration>                     <lifecyclemappingmetadata>                         <pluginexecutions>                             <pluginexecution>                                 <pluginexecutionfilter>                                     <groupid>                                         org.apache.maven.plugins                                     </groupid>                                     <artifactid>                                         maven-plugin-plugin                                     </artifactid>                                     <versionrange>                                         [3.2,)                                     </versionrange>                                     <goals>                                         <goal>descriptor</goal>                                     </goals>                                 </pluginexecutionfilter>                                 <action>                                     <ignore></ignore>                                 </action>                             </pluginexecution>                         </pluginexecutions>                     </lifecyclemappingmetadata>                 </configuration>             </plugin>         </plugins>     </pluginmanagement> </build> 

any great! thanks


Comments

Popular posts from this blog

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -