STAMP-project/dspot

DSpot displays a warning when executing on multi-module projects

borisbaldassari opened this issue · 2 comments

Characteristics

  • Issue Type: bug
  • Reproducibility: always
  • Severity: crash
  • Tool/Service/Component: DSpot maven 2.2.0
  • Execution Environment: cf ci-après
boris@kadath:gh_json-simple$ mvn --version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
Maven home: /home/boris/Applis/apache-maven-3.6.0
Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-oracle/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "4.9.0-11-amd64", arch: "amd64", family: "unix"
boris@kadath:gh_json-simple$ uname -a
Linux kadath 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3 (2019-09-02) x86_64 GNU/Linux

Description

When trying to execute dspot-maven 2.2.0 on multi-modules projects, dspot fails with the following message:

There is a problem with the provided path to the source folder(src property)
The provided path to the source folder of your project is incorrect, the folder does not exist.
 This path should be either relative to the path pointed by project property 
or an absolute path(/media/data/git_repos/dspot/protostuff///src/main/java/)

Tested with protostuff/api and retrofit/. When analysing the later the following message is displayed:

[WARNING] There is a problem with the provided path to the test source folder(testSrc property)
The provided path to the test source folder of your project is incorrect, the folder does not exist.
 This path should be either relative to the path pointed by project property 
or an absolute path(/media/data/git_repos/dspot/retrofit/samples///src/test/java/)
eu.stamp_project.utils.options.check.InputErrorException: Error in the provided input. Please check your properties file and your command-line options.
	at eu.stamp_project.utils.options.check.Checker.checkFileExists(Checker.java:229)
	at eu.stamp_project.utils.options.check.Checker.checkPathPropertyValue(Checker.java:185)
	at eu.stamp_project.utils.options.check.Checker.checkProperties(Checker.java:105)
	at eu.stamp_project.utils.options.check.Checker.preChecking(Checker.java:45)
	at eu.stamp_project.utils.options.Configuration.configure(Configuration.java:144)
	at eu.stamp_project.DSpotMojo.execute(DSpotMojo.java:314)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	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(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Steps to reproduce

Select a multi-module mvn project and identify a module to analyse (in our example, use retrofit) and specify the module. Execute the following command at the project's root:
mvn eu.stamp-project:dspot-maven:amplify-unit-tests -DtargetModule=retrofit -Damplifiers=FastLiteralAmplifier -Diteration=1

Hello @borisbaldassari

For the project protostuff and retrofit, the warning is perfectly normal: there is no sources nor test sources for protostuff and retrofit/sample.

I tried to run it on protostuff-api with mvn eu.stamp-project:dspot-maven:amplify-unit-tests -DtargetModule=protostuff-api from the root and the amplification started well.

Could you provide more information about it?

Also, you are running dspot-2.2.0 which have issues on multi-modules project. I suggest to upgrade and use the current SNAPSHOT.

Thank you.

with recent changes, it should be fixed.