Uh oh!
There was an error while loading. Please reload this page.
[SPARK-10168][Streaming]Fix the issue that maven publishes wrong artifact jars - #8373
[SPARK-10168][Streaming]Fix the issue that maven publishes wrong artifact jars#8373zsxwing wants to merge 3 commits into
Conversation
srowen
commented
Aug 22, 2015
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 |
SparkQA
commented
Aug 22, 2015
Test build #41408 has finished for PR 8373 at commit
|
SparkQA
commented
Aug 22, 2015
Test build #41410 has finished for PR 8373 at commit
|
SparkQA
commented
Aug 22, 2015
Test build #41412 has finished for PR 8373 at commit
|
jerryshao
commented
Aug 23, 2015
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. |
zsxwing
commented
Aug 23, 2015
@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. |
srowen
commented
Aug 23, 2015
@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. |
zsxwing
commented
Aug 23, 2015
So you are suggesting to fix the sbt output path. Right? |
zsxwing
commented
Aug 23, 2015
I'm not sure if we can change the output path for SBT. By default, it will put all generated files in |
srowen
commented
Aug 23, 2015
No, I'm wondering why the output path has to change? |
zsxwing
commented
Aug 23, 2015
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 |
tdas
commented
Aug 24, 2015
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. |
srowen
commented
Aug 24, 2015
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. |
vanzin
commented
Aug 24, 2015
LGTM. Yeah, I've been bitten by this before - the maven install plugin does not understand |
tdas
commented
Aug 24, 2015
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.
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.