cailin186 / reflections

Automatically exported from code.google.com/p/reflections
Do What The F*ck You Want To Public License
0 stars 0 forks source link

ReflectionsMojo cannot generate metadata for test jars #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Tried to add reflections to process-test-classes
<execution>
<id>2</id>
<configuration>
<destinations>
${project.build.testOutputDirectory}/META-INF/reflections/${project.artifactId}-
tests-reflections.xml
</destinations>
</configuration>
<goals>
<goal>reflections</goal>
</goals>
<phase>process-test-classes</phase>
</execution>

What is the expected output? What do you see instead?
It will just generate the same metadata as for the non-test classes.

What version of the product are you using? On what operating system?
0.9.5-RC1, Windows

Please provide any additional information below.
I propose adding a new parameter to the mojo called "tests"

@MojoParameter(description = "If set to true, the mojo will generate the
metadata for the test classes", defaultValue = "false")

private String resolveOutputDirectory()
{
    String outputDirectory = tests ?
getProject().getBuild().getTestOutputDirectory() :
getProject().getBuild().getOutputDirectory();
    return outputDirectory;
}

and use this function to replace the two occurrences of the output
directory lookup in ReflectionsMojo.java. This works fine for me.

Original issue reported on code.google.com by Viktor.B...@gmail.com on 15 Feb 2010 at 4:19

GoogleCodeExporter commented 9 years ago
fixed on 0.9.7.RC1 and trunk. comments?

Original comment by ronm...@gmail.com on 2 May 2012 at 3:56

GoogleCodeExporter commented 9 years ago
fixed 0.9.7

Original comment by ronm...@gmail.com on 22 May 2012 at 7:47