> From: [email protected]
> Date: Sat, 3 Oct 2015 16:20:56 -0700
> Subject: Best way to keep test resources with junit / surefire /maven.
> To: [email protected]
>
> I'm trying to figure out if there's a better way to do this.
>
> Java doesn't support "here files" or embedded files.... so you have to keep
> your resources external. Usually in 'resources',
>
> I don't want to have things like HTML code and other things in my tests as
> it makes the tests ugly.
>
> But the problem is that once I create the resources, they can't participate
> in refactoring.
>
> At least in intellij... even if it's *OBVIOUS* that the resource is
> associated with a given test.
MG>on possibility is to define additional directory in resources
<resources>
<resource>
<directory>HTMLFolderGoesHere</directory>
<resource>
</resources>
<!-- or possibly add in the folder as a additional classpath element for maven
surefire to act upon -->
<plugin>
<grouplId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<additionalClasspathElements>HTMLFolderGoesHere</additionalClasspathElement>
MG>would this work?
>
> Is there a cleaner way to do this?
>
> Either this whole thing is broken or I'm doing it wrong.
>
> --
>
> We’re hiring if you know of any awesome Java Devops or Linux Operations
> Engineers!
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>