Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
maven-thrift-plugin
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
maven-thrift-plugin
Commits
3a94ad07
Commit
3a94ad07
authored
Mar 02, 2011
by
David Trott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed whitespace/indentation.
parent
c95e8791
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
79 deletions
+77
-79
src/main/java/org/apache/thrift/maven/Thrift.java
src/main/java/org/apache/thrift/maven/Thrift.java
+2
-2
src/main/java/org/apache/thrift/maven/ThriftCompileMojo.java
src/main/java/org/apache/thrift/maven/ThriftCompileMojo.java
+38
-38
src/main/java/org/apache/thrift/maven/ThriftTestCompileMojo.java
...n/java/org/apache/thrift/maven/ThriftTestCompileMojo.java
+37
-39
No files found.
src/main/java/org/apache/thrift/maven/Thrift.java
View file @
3a94ad07
...
@@ -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
);
}
}
}
}
}
}
src/main/java/org/apache/thrift/maven/ThriftCompileMojo.java
View file @
3a94ad07
...
@@ -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
());
}
}
}
}
src/main/java/org/apache/thrift/maven/ThriftTestCompileMojo.java
View file @
3a94ad07
...
@@ -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
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment