I have two separate maven projects in which my first project is executing the code and generating some data that data I am writing into a file and this file should be created in Project2 under src/test/java/feature folder location.
**Project1**
public class Dependency {
public void execute() throws MojoExecutionException, MojoFailureException {
System.out.println(".... execution begins....");
GenerateData ob=new GenerateData();
ob.getData();
String fileLoc="./src/test/java/feature";(location of src/test/java/feature of Proj2 is `given here)`
File file=new File(fileLoc + ".feature");
file.createNewFile();
}
**Project2**
src/test/java
-feature
Is there a way that I can give the directory path of src/test/java/feature folder of Project2 in Project1 so that my file would get created in Project2.