dongjoon-hyun commented on a change in pull request #27242: 
[SPARK-30534][INFRA] Use mvn in `dev/scalastyle`
URL: https://github.com/apache/spark/pull/27242#discussion_r368857201
 
 

 ##########
 File path: dev/scalastyle
 ##########
 @@ -17,18 +17,10 @@
 # limitations under the License.
 #
 
-SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl 
-Pkinesis-asl -Phive-thriftserver -Phive"}
+SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
 
-# NOTE: echo "q" is needed because SBT prompts the user for input on 
encountering a build file
-# with failure (either resolution or compilation); the "q" makes SBT quit.
-ERRORS=$(echo -e "q\n" \
-    | build/sbt \
-        ${SPARK_PROFILES} \
-        -Pdocker-integration-tests \
-        -Pkubernetes-integration-tests \
-        scalastyle test:scalastyle \
-    | awk '{if($1~/error/)print}' \
-)
+SPARK_PROFILES=${1:-"-Pmesos -Pkubernetes -Pyarn -Pspark-ganglia-lgpl 
-Pkinesis-asl -Phive-thriftserver -Phive -Pdocker-integration-tests 
-Pkubernetes-integration-tests"}
+ERRORS=$($SCRIPT_DIR/../build/mvn $SPARK_PROFILES scalastyle:check | grep 
"^error file")
 
 Review comment:
   I checked this. It still fails before this commit. Please try to checkout 
old commit in your environment, @HyukjinKwon .
   ```
   [error] [FATAL] Non-resolvable parent POM: 
   Could not transfer artifact org.apache:apache:pom:18 from/to central (
   http://repo.maven.apache.org/maven2): Failed to look for file:
   http://repo.maven.apache.org/maven2/org/apache/apache/18/apache-18.pom. 
Return code is: 501 and 'parent.relativePath' points at wrong local POM @ line 
22, column 11
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to