I am writing a library which will create a report based on the test results
(imagine something like Surefire). And my problem is, I am able to create a
folder in target/ directory to hold the report and also copy there necessary
files but I can do that only when I build the library project itself.
I would like to achieve same behavior like a Surefire plugin has, that means
if I put dependency for my library to some project, let's say myProject,
then I will get something like myProject/target/myLibrary after the build.
btw, this is what I currently have
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>generate-test-sources</phase>
<configuration>
<tasks>
<echo message="Creating folder for the lib..." />
<mkdir dir="${report.folder}" />
<echo message="Copying Twitter Bootstrap libraries
to the ${report.folder}" />
<copy todir="${report.folder}">
<fileset dir="src/main/resources/bootstrap">
<include name="**/**" />
</fileset>
</copy>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
I also tried to execute this code inside my library
FileUtils.copyDirectoryToDirectory(new File("src/main/resources/bootstrap"),
new File("target/myLibrary") but I will get obvious FileNotFoundException -
bootstrap doesn't exist in the project which is using the library
--
View this message in context:
http://maven.40175.n5.nabble.com/How-to-create-new-directory-in-target-folder-with-Maven-tp5769636.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]