-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-10168][Streaming]Fix the issue that maven publishes wrong artifact jars #8373
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
Conversation
|
CC @jerryshao since in https://github.com/apache/spark/pull/5632/files I think it was argued that this is on purpose. Also never hurts to CC @vanzin |
|
Test build #41408 has finished for PR 8373 at commit
|
|
Test build #41410 has finished for PR 8373 at commit
|
|
Test build #41412 has finished for PR 8373 at commit
|
|
The code LGTM. A simple question: any specific reason to change the Maven output file path back to default? IMHO it would be better to keep this output file path to be the same as sbt, also be consistent with other modules like assembly and example. |
|
@jerryshao see https://issues.apache.org/jira/browse/SPARK-10168 If we set the output path, there will be still a jar in the target folder and maven will publish it rather than the jar specified by the output path. |
|
@zsxwing yes but the point is that it is now different from the SBT output path. Why is it required that these be different? It's possible, but I think it needs a motivation. |
So you are suggesting to fix the sbt output path. Right? |
|
I'm not sure if we can change the output path for SBT. By default, it will put all generated files in |
|
No, I'm wondering why the output path has to change? |
|
E.g., in 1.5.0-rc1, for the kafka-assembly project, maven will generate a jar without any codes except some meta files in the target folder, see https://repository.apache.org/content/repositories/orgapachespark-1137/org/apache/spark/spark-streaming-kafka-assembly_2.10/1.5.0-rc1/ for example. Because outputPath was set, maven-shaded-plugin didn't replace That's why I removed |
|
I think I understand the problem and the fix strategy sounds good to me. But I will leave it @srowen to LGTM this as he is more well-versed with pom stuff than I am. Also, @jerryshao please LGTM it if you think this change does not regression, that is, it does not recreate the bug that you tried to fix in #5632. |
|
Ah I see. So the release plugin isn't going to know about the updated output path to the shade plugin? then I completely agree it has to change as it won't work otherwise. Obviously more important than consistency. |
|
LGTM. Yeah, I've been bitten by this before - the maven install plugin does not understand |
|
Alright. I am going to merge this to master and branch 1.5. Thanks @srowen, @vanzin and @jerryshao for taking a look. |
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.
Good catch that this was missing! Thanks @zsxwing
…tifact jars This PR removed the `outputFile` configuration from pom.xml and updated `tests.py` to search jars for both sbt build and maven build. I ran ` mvn -Pkinesis-asl -DskipTests clean install` locally, and verified the jars in my local repository were correct. I also checked Python tests for maven build, and it passed all tests. Author: zsxwing <zsxwing@gmail.com> Closes #8373 from zsxwing/SPARK-10168 and squashes the following commits: e0b5818 [zsxwing] Fix the sbt build c697627 [zsxwing] Add the jar pathes to the exception message be1d8a5 [zsxwing] Fix the issue that maven publishes wrong artifact jars (cherry picked from commit 4e0395d) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
This PR removed the
outputFileconfiguration from pom.xml and updatedtests.pyto search jars for both sbt build and maven build.I ran
mvn -Pkinesis-asl -DskipTests clean installlocally, and verified the jars in my local repository were correct. I also checked Python tests for maven build, and it passed all tests.