ne more unit test fix

This commit is contained in:
jamesagnew 2014-05-20 18:36:36 -04:00
parent f52ed02fa4
commit ee0a16990b
1 changed files with 7 additions and 0 deletions

View File

@ -13,9 +13,11 @@ import org.apache.http.ParseException;
import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.velocity.VelocityContext; import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.app.VelocityEngine;
@ -47,6 +49,9 @@ public class TinderJpaRestServerMojo extends AbstractMojo {
@Parameter(required = true) @Parameter(required = true)
private List<String> baseResourceNames; private List<String> baseResourceNames;
@Component
private MavenProject myProject;
@Override @Override
public void execute() throws MojoExecutionException, MojoFailureException { public void execute() throws MojoExecutionException, MojoFailureException {
@ -72,6 +77,8 @@ public class TinderJpaRestServerMojo extends AbstractMojo {
throw new MojoFailureException("Failed to generate server",e); throw new MojoFailureException("Failed to generate server",e);
} }
myProject.addCompileSourceRoot(directoryBase.getAbsolutePath());
} }