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
fe80dbd6
Commit
fe80dbd6
authored
Mar 02, 2011
by
David Trott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated to utilize the new -out parameter added to thrift compiler patch (THRIFT-1069)
parent
3a94ad07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
24 deletions
+1
-24
src/main/java/org/apache/thrift/maven/Thrift.java
src/main/java/org/apache/thrift/maven/Thrift.java
+1
-24
No files found.
src/main/java/org/apache/thrift/maven/Thrift.java
View file @
fe80dbd6
...
...
@@ -79,8 +79,6 @@ final class Thrift {
}
// result will always be 0 here.
moveGeneratedFiles
();
return
0
;
}
...
...
@@ -99,7 +97,7 @@ final class Thrift {
command
.
add
(
"-I"
);
command
.
add
(
thriftPathElement
.
toString
());
}
command
.
add
(
"-o"
);
command
.
add
(
"-o
ut
"
);
command
.
add
(
javaOutputDirectory
.
toString
());
command
.
add
(
"--gen"
);
command
.
add
(
generator
);
...
...
@@ -107,27 +105,6 @@ final class Thrift {
return
ImmutableList
.
copyOf
(
command
);
}
private
void
moveGeneratedFiles
()
{
File
genDir
=
new
File
(
javaOutputDirectory
,
GENERATED_JAVA
);
final
File
[]
generatedFiles
=
genDir
.
listFiles
();
for
(
File
generatedFile
:
generatedFiles
)
{
final
String
filename
=
generatedFile
.
getName
();
final
File
targetLocation
=
new
File
(
javaOutputDirectory
,
filename
);
if
(
targetLocation
.
exists
())
{
if
(!
targetLocation
.
delete
())
{
throw
new
RuntimeException
(
"File Overwrite Failed: "
+
targetLocation
.
getPath
());
}
}
if
(!
generatedFile
.
renameTo
(
targetLocation
))
{
throw
new
RuntimeException
(
"Rename Failed: "
+
targetLocation
.
getPath
());
}
}
if
(!
genDir
.
delete
())
{
throw
new
RuntimeException
(
"Failed to delete directory: "
+
genDir
.
getPath
());
}
}
/**
* @return the output
*/
...
...
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