Skip to content
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

CLI: no assembly, missing main class to start with java -jar #166

Closed
fanf opened this issue Feb 17, 2017 · 7 comments
Closed

CLI: no assembly, missing main class to start with java -jar #166

fanf opened this issue Feb 17, 2017 · 7 comments
Milestone

Comments

@fanf
Copy link
Contributor

fanf commented Feb 17, 2017

I tried to build mima to use from the CLI.
There is no documentation to do so, so I tried a sbt packages

But then, I get:

java -jar ....reporter/target/scala-2.10/mima-reporter_2.10-0.1.14.jar --prev XXX --curr YYY 
Error: main class not found: com.typesafe.tools.mima.cli.Main

I 'm wondering if #155 didn't remove/broke the assembly target.

@fanf fanf changed the title CLI does not works CLI: no assembly, missing main class to start with java -jar Feb 17, 2017
@fanf
Copy link
Contributor Author

fanf commented Feb 17, 2017

Yeah, that's the problem: reverting to commit before #155 (2cd1d8d) make assembly task available and the CLI usable again.

@SethTisue
Copy link
Collaborator

SethTisue commented Feb 17, 2017

you'll need to provide java with a complete classpath:

% java -classpath /Users/tisue/.sbt/boot/scala-2.10.6/lib/scala-library.jar:/Users/tisue/.sbt/boot/scala-2.10.6/lib/scala-compiler.jar:/Users/tisue/.sbt/boot/scala-2.10.6/lib/scala-reflect.jar:/Users/tisue/.ivy2/cache/com.typesafe/config/bundles/config-1.0.0.jar:/Users/tisue/migration-manager/core/target/scala-2.10/mima-core_2.10-0.1.13-4-gbed1558.jar:/Users/tisue/migration-manager/reporter/target/scala-2.10/mima-reporter_2.10-0.1.13-4-gbed1558.jar com.typesafe.tools.mima.cli.Main
Usage: mima [<options>]

  necessary options:
                             --prev             Previous classpath/jar for binary compatibility testing.
                             --curr             Current classpath/jar for binary compatibility testing.

  optional settings:
                             --classpath        an optional classpath setting
    --filters          an optional problem filters configuration file, applied to both backward and forward checking
    --backward-filters an optional problem filters configuration file, only applied to backward checking
    --forward-filters  an optional problem filters configuration file, only applied to forward checking
    --generate-filters generate filters definition for displayed problems
    --direction        check direction, default is "backward", but can also be "forward" or "both"

@fanf
Copy link
Contributor Author

fanf commented Feb 17, 2017

@SethTisue : why not provide the assembly task? It would simpler (I know, everyone loves to build classpath by hand, but still, for the laziest of us :). And it would match the documentation.
(I mean, I can leave with the current state, but it is quite surprising for a cli tool - it's also OK if you provide a start script, but it seems to be more work :)

@xuwei-k
Copy link
Contributor

xuwei-k commented Feb 17, 2017

@SethTisue
Copy link
Collaborator

SethTisue commented Feb 17, 2017

it would match the documentation

I see now that we didn't update https://github.com/typesafehub/migration-manager/wiki/MiMa-Command-Line-Tool at the time we removed the assembly stuff; that was an oversight. (EDIT: I added a note to the top just now, pending the outcome of this discussion.)

why not provide the assembly task?

Well, I don't have a strong feeling about it one way or the other. The main goal of #155 was to get rid of the S3 stuff and simplify our release process. The assembly stuff came out at the same time, just because everyone we asked was only using the sbt plugin, so it wasn't clear the assembly stuff was worth continuing to maintain.

I don't think we want to go to the effort of actually publishing the assembly jar unless there's a strong indication that it would have more than a handful of users. But if someone wants to a submit a PR restoring the assembly task to the build, I wouldn't be opposed.

@fanf
Copy link
Contributor Author

fanf commented Feb 17, 2017

OH, I don't think you need to publish an assembly, but having the task would simplify the use of the CLI.
I think there is a relevant use case for the CLI (at least, it's that way we want to use it): we (are going to) need to check if external jars are binary compatible or not so that we can provide stable ABI for a plugin ecosystem. We won't own the jar builds (or not all, at least), so we will the cli.

fanf added a commit to fanf/migration-manager that referenced this issue Feb 17, 2017
@fanf
Copy link
Contributor Author

fanf commented Feb 17, 2017

PR is here: #167

dwijnand added a commit that referenced this issue Feb 23, 2017
…_cli

Issue #166: restore assembly task removed in #155 along with s3 deploy
@dwijnand dwijnand reopened this Feb 23, 2017
@dwijnand dwijnand added this to the 0.1.15 milestone Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants