Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#MAVEN-221 - fixes bug with testing any REST Url Mappings. #38

Merged
merged 2 commits into from
Jan 15, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/main/java/org/grails/maven/plugin/AbstractGrailsMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,20 +328,27 @@ protected void runGrails(final String targetName, String args) throws MojoExecut

Set<File> runtimeDependencies = new HashSet<File>( resolveArtifacts(getRuntimeArtifacts(project)) );
runtimeDependencies.addAll( compileDependencies );

try {
runtimeDependencies.addAll( getDependencyFiles( project.getRuntimeClasspathElements() ) );
} catch (DependencyResolutionRequiredException e) {
throw new MojoExecutionException("Failed to create runtime classpath for Grails execution.", e);
}

Set<File> testDependencies = new HashSet<File>( resolveArtifacts(getTestArtifacts(project)) );


testDependencies.addAll( providedDependencies );
testDependencies.addAll( compileDependencies );
testDependencies.addAll( runtimeDependencies );
testDependencies.addAll( testDependencies );
try {
testDependencies.addAll( getDependencyFiles( project.getTestClasspathElements() ) );
} catch (DependencyResolutionRequiredException e) {
throw new MojoExecutionException("Failed to create test classpath for Grails execution.", e);
}

ec.setProvidedDependencies(providedDependencies);
ec.setCompileDependencies(compileDependencies);
ec.setTestDependencies( new ArrayList<File>(testDependencies) );
ec.setRuntimeDependencies( new ArrayList<File>(runtimeDependencies) );

ec.setGrailsWorkDir(new File(grailsWorkDir));
ec.setProjectWorkDir(new File(targetDir));
ec.setClassesDir(new File(targetDir, "classes"));
Expand Down