Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't generate *dspot_*.xml files in the source root #896

Open
vmassol opened this issue Oct 1, 2019 · 2 comments
Open

Don't generate *dspot_*.xml files in the source root #896

vmassol opened this issue Oct 1, 2019 · 2 comments

Comments

@vmassol
Copy link
Contributor

vmassol commented Oct 1, 2019

Dspot generates 2 files when I test it in my modules:

  • .dspot_junit5_pom.xml
  • .dspot_pom.xml

They are generated at the root of the project! Which is quite bad and pollutes the sources.

It would be great if these files could be generated under target/dspot. More generally anything that DSpot generates should go there IMO.

Thanks!

@danglotb danglotb self-assigned this Oct 1, 2019
danglotb added a commit to danglotb/dspot that referenced this issue Oct 1, 2019
@danglotb
Copy link
Member

danglotb commented Oct 1, 2019

Will take more time than I thought:

By default, it looks for a maven project at the same place than the pom.xml.

If we do generate the pom files into target/dspot/, it will look for a project in this directory, e.g. target/dspot/src/main/java/ and target/dspot/src/test/java/.

Two ways to handle this:

  1. delete the generated pom files at the end of the process, but the files might remains in case of crash or user interruption.
  2. when generating the pom files, specify new sources, test sources, resources trees in order to find them, with tags as <sourceDirectory> in the build.

danglotb added a commit to danglotb/dspot that referenced this issue Oct 2, 2019
danglotb added a commit to danglotb/dspot that referenced this issue Oct 2, 2019
@danglotb
Copy link
Member

danglotb commented Oct 2, 2019

#898 is the first attempt. However, it seems like this is complicated to handle all the cases (even the current tests in DSpot are complicated)

I'll go for the first option, that is easier for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants