Commit 3a94ad07 authored by David Trott's avatar David Trott

Fixed whitespace/indentation.

parent c95e8791
...@@ -218,7 +218,7 @@ final class Thrift { ...@@ -218,7 +218,7 @@ final class Thrift {
} else { } else {
final File parentDirectory = directory.getParentFile(); final File parentDirectory = directory.getParentFile();
return (parentDirectory == null) ? false return (parentDirectory == null) ? false
: checkThriftFileIsInThriftPathHelper(parentDirectory); : checkThriftFileIsInThriftPathHelper(parentDirectory);
} }
} }
...@@ -266,7 +266,7 @@ final class Thrift { ...@@ -266,7 +266,7 @@ final class Thrift {
public Thrift build() { public Thrift build() {
checkState(!thriftFiles.isEmpty()); checkState(!thriftFiles.isEmpty());
return new Thrift(executable, generator, ImmutableSet.copyOf(thriftPathElements), return new Thrift(executable, generator, ImmutableSet.copyOf(thriftPathElements),
ImmutableSet.copyOf(thriftFiles), javaOutputDirectory); ImmutableSet.copyOf(thriftFiles), javaOutputDirectory);
} }
} }
} }
...@@ -20,44 +20,44 @@ import java.util.List; ...@@ -20,44 +20,44 @@ import java.util.List;
public final class ThriftCompileMojo extends AbstractThriftMojo { public final class ThriftCompileMojo extends AbstractThriftMojo {
/** /**
* The source directories containing the sources to be compiled. * The source directories containing the sources to be compiled.
* *
* @parameter default-value="${basedir}/src/main/thrift" * @parameter default-value="${basedir}/src/main/thrift"
* @required * @required
*/ */
private File thriftSourceRoot; private File thriftSourceRoot;
/** /**
* This is the directory into which the {@code .java} will be created. * This is the directory into which the {@code .java} will be created.
* *
* @parameter default-value="${project.build.directory}/generated-sources/thrift" * @parameter default-value="${project.build.directory}/generated-sources/thrift"
* @required * @required
*/ */
private File outputDirectory; private File outputDirectory;
@Override @Override
protected List<Artifact> getDependencyArtifacts() { protected List<Artifact> getDependencyArtifacts() {
// TODO(gak): maven-project needs generics // TODO(gak): maven-project needs generics
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
List<Artifact> compileArtifacts = project.getCompileArtifacts(); List<Artifact> compileArtifacts = project.getCompileArtifacts();
return compileArtifacts; return compileArtifacts;
} }
@Override @Override
protected File getOutputDirectory() { protected File getOutputDirectory() {
return outputDirectory; return outputDirectory;
} }
@Override @Override
protected File getThriftSourceRoot() { protected File getThriftSourceRoot() {
return thriftSourceRoot; return thriftSourceRoot;
} }
@Override @Override
protected void attachFiles() { protected void attachFiles() {
project.addCompileSourceRoot(outputDirectory.getAbsolutePath()); project.addCompileSourceRoot(outputDirectory.getAbsolutePath());
projectHelper.addResource(project, thriftSourceRoot.getAbsolutePath(), projectHelper.addResource(project, thriftSourceRoot.getAbsolutePath(),
ImmutableList.of("**/*.thrift"), ImmutableList.of()); ImmutableList.of("**/*.thrift"), ImmutableList.of());
} }
} }
...@@ -7,52 +7,50 @@ import java.io.File; ...@@ -7,52 +7,50 @@ import java.io.File;
import java.util.List; import java.util.List;
/** /**
*
* @phase generate-test-sources * @phase generate-test-sources
* @goal testCompile * @goal testCompile
* @requiresDependencyResolution test * @requiresDependencyResolution test
*/ */
public final class ThriftTestCompileMojo extends AbstractThriftMojo { public final class ThriftTestCompileMojo extends AbstractThriftMojo {
/** /**
* The source directories containing the sources to be compiled. * The source directories containing the sources to be compiled.
* *
* @parameter default-value="${basedir}/src/test/thrift" * @parameter default-value="${basedir}/src/test/thrift"
* @required * @required
*/ */
private File thriftTestSourceRoot; private File thriftTestSourceRoot;
/** /**
* This is the directory into which the {@code .java} will be created. * This is the directory into which the {@code .java} will be created.
* *
* @parameter default-value="${project.build.directory}/generated-test-sources/thrift" * @parameter default-value="${project.build.directory}/generated-test-sources/thrift"
* @required * @required
*/ */
private File outputDirectory; private File outputDirectory;
@Override @Override
protected void attachFiles() { protected void attachFiles() {
project.addTestCompileSourceRoot(outputDirectory.getAbsolutePath()); project.addTestCompileSourceRoot(outputDirectory.getAbsolutePath());
projectHelper.addTestResource(project, thriftTestSourceRoot.getAbsolutePath(), projectHelper.addTestResource(project, thriftTestSourceRoot.getAbsolutePath(),
ImmutableList.of("**/*.thrift"), ImmutableList.of()); ImmutableList.of("**/*.thrift"), ImmutableList.of());
} }
@Override
protected List<Artifact> getDependencyArtifacts() {
// TODO(gak): maven-project needs generics
@SuppressWarnings("unchecked")
List<Artifact> testArtifacts = project.getTestArtifacts();
return testArtifacts;
}
@Override
protected File getOutputDirectory() {
return outputDirectory;
}
@Override
protected File getThriftSourceRoot() {
return thriftTestSourceRoot;
}
@Override
protected List<Artifact> getDependencyArtifacts() {
// TODO(gak): maven-project needs generics
@SuppressWarnings("unchecked")
List<Artifact> testArtifacts = project.getTestArtifacts();
return testArtifacts;
}
@Override
protected File getOutputDirectory() {
return outputDirectory;
}
@Override
protected File getThriftSourceRoot() {
return thriftTestSourceRoot;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment