-
Notifications
You must be signed in to change notification settings - Fork 247
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 plugin #230
Maven plugin #230
Conversation
- Migrated to Maven plugin Java 5 annotations - Removed completely dead code - Used aether API
I've uploaded - ThriftExplorer to demo the problem and solution. You can see the pom.xml for the package that contains my It expect the 4.6.0-SNAPSHOT so please do a maven install to install into your local repository |
import java.util.Arrays; | ||
import java.util.Collection; | ||
|
||
public class ScroogeMavenPluginTest extends AbstractMojoTestCase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these tests seem useful, why are you deleting them?
Sorry it took us so long to review this! I don't know maven well, and we don't use it internally anymore, so our review will unfortunately have to be pretty cursory. Is there any chance you can replace the tests that don't work anymore with a new test that does something similar? LGTM otherwise. |
@mosesn It's been a while since I worked on this codebase. I believe those tests were deleted because I couldn't find out how to transition them to the newer maven plugin model (annotation based) - I am also not terribly familiar with Maven plugin development but needed to fix the root issue for myself. If we can keep the PR open a bit longer I can give it another stab on the weekend of reintroducing the tests. |
That would be great! No rush =) |
@fzakaria hey, have you had a chance to take a look at this again? |
@fzakaria I'm thinking maybe we should merge it without the tests? what do you think? |
Let me check out the PR today and I'll go over it before noon PST. |
Rad, thanks! |
@mosesn I remerged from develop and re-added the test class. |
Current coverage is 27.25% (diff: 100%)@@ develop #230 diff @@
==========================================
Files 63 63
Lines 2792 2796 +4
Methods 2656 2659 +3
Messages 0 0
Branches 136 137 +1
==========================================
Hits 762 762
- Misses 2030 2034 +4
Partials 0 0
|
@fzakaria your most recent changes seem to have a merge conflict (scrooge-maven-plugin/pom.xm), would you mind merging latest from the develop branch and trying to fix the conflicts. Also, I think we're going to want a way to have tests that are at least similar to the ones commented out. |
@fzakaria, are you still working on this? |
@bryce-anderson I'll close. Hopefully if someone hits same issue they can see the work done. |
Problem
This PullRequest is in response to Issue 229.
Essentially, I was going through the tutorial for finatra with Thrift and had made a new Java project
ThriftModelExample
with classifieridl
that held only my thrift file.My thrift file included
"finatra-thrift/finatra_thrift_exceptions.thrift"
from thefinatra-thrift_2.11
artifact; however this artifact does not have theidl
classifier.Solution
The original solution was to include the following:
Modules
(groupId & artifactId) that are forced included to be searched for thrift files.Result
All dependencies of a project that is found to be either of classifier
idl
or forced inclusion has all of its dependencies included which allows for the proper modularization of thrift files.It is also less strict about the classifier naming.
Con
The downside to this change is that I had to remove the test cases.
This new code makes use of the Aether maven API, however there does not seem to be a way to retrofit that into the maven plugin test harness.