scylladb / scylla-migrator

Migrate data extract using Spark to Scylla, normally from Cassandra/parquet files. Alt. from DynamoDB to Scylla Alternator.
https://migrator.docs.scylladb.com/stable/
Apache License 2.0
55 stars 34 forks source link

Getting error- "Not a valid command: assembly" while running build.sh #60

Closed amit78del closed 2 years ago

amit78del commented 2 years ago

Hi,

While running build.sh, I am getting error - "not a valid command: assembly". I followed instructions from below page to run locally. https://github.com/scylladb/scylla-migrator

Installed sbt by using SDKMAN as mentioned in below doc. https://www.scala-sbt.org/release/docs/Installing-sbt-on-Linux.html

Java version- openjdk version "1.8.0_292" OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10) OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

Error logs-

I tried all the solutions mentioned in stack overflow, some links given below. https://stackoverflow.com/questions/36186214/sbt-assembly-not-working-not-a-valid-command https://stackoverflow.com/questions/44106182/why-does-sbt-assembly-fail-with-not-a-valid-command-assembly https://stackoverflow.com/questions/29523694/sbt-assembly-command-not-found/29526644#29526644

My folder structure-

root folder has build.sbt and build.sh files. root/project folder has- build.sbt and build.properties files.

I didn't tune any parameter in these files and tried running after cloning project from below repo. https://github.com/scylladb/scylla-migrator

Any help is appreciated.

amit78del commented 2 years ago

@iravid, @tarzanek adding you guys here for faster inputs.

tarzanek commented 2 years ago

@amit78del this is definitely an env issue so we can go and debug your env (try to get env output to see what is wrong) OR ideal case is to spawn a new clean stock VM and try to build I am building this just fine on clean Ubuntu 21.10 or on Fedora 35 - java is openjdk packages, exported with JAVA_HOME sbt is installed from repo (so I don't use SDKMAN) I have a clean git clone of scylla-migrator and then inside it (with java exported in JAVA_HOME or set default using alternatives) I run ./build.sh

another option is to create a completely new user on your existing machine and try with user that has stock env (assuming your default env is not tainted) choose whatever is fastest for you (debug env, new user, new clean stock VM)

amit78del commented 2 years ago

Thanks @tarzanek after cleaning the env, the issue was resolved.