rabbitmq-server/deps/rabbitmq_cli/mix.exs

189 lines
5.9 KiB
Elixir
Raw Normal View History

2016-02-03 23:01:32 +08:00
## The contents of this file are subject to the Mozilla Public License
## Version 1.1 (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License
URL Cleanup This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # HTTP URLs that Could Not Be Fixed These URLs were unable to be fixed. Please review them to see if they can be manually resolved. * http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated: ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException). * http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated: ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException). * http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated: ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException). * http://e2project.org (200) with 1 occurrences could not be migrated: ([https](https://e2project.org) result AnnotatedConnectException). * http://erlang.org/doc/reference_manual/distributed.html (200) with 1 occurrences could not be migrated: ([https](https://erlang.org/doc/reference_manual/distributed.html) result ConnectTimeoutException). * http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated: ([https](https://nitrogenproject.com/) result ConnectTimeoutException). * http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated: ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException). * http://yaws.hyber.org (200) with 1 occurrences could not be migrated: ([https](https://yaws.hyber.org) result AnnotatedConnectException). * http://choven.ca (503) with 1 occurrences could not be migrated: ([https](https://choven.ca) result ConnectTimeoutException). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * http://fixprotocol.org/ (301) with 1 occurrences migrated to: https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException). * http://erldb.org (UnknownHostException) with 1 occurrences migrated to: https://erldb.org ([https](https://erldb.org) result UnknownHostException). * http://elixir-lang.org/docs/stable/elixir/OptionParser.html (301) with 1 occurrences migrated to: https://elixir-lang.org/docs/stable/elixir/OptionParser.html ([https](https://elixir-lang.org/docs/stable/elixir/OptionParser.html) result 404). * http://elixir-lang.org/docs/stable/elixir/Stream.html (301) with 1 occurrences migrated to: https://elixir-lang.org/docs/stable/elixir/Stream.html ([https](https://elixir-lang.org/docs/stable/elixir/Stream.html) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://cloudi.org/ with 27 occurrences migrated to: https://cloudi.org/ ([https](https://cloudi.org/) result 200). * http://elixir-lang.org with 1 occurrences migrated to: https://elixir-lang.org ([https](https://elixir-lang.org) result 200). * http://elixir-lang.org/ with 2 occurrences migrated to: https://elixir-lang.org/ ([https](https://elixir-lang.org/) result 200). * http://elixir-lang.org/getting-started/typespecs-and-behaviours.html with 1 occurrences migrated to: https://elixir-lang.org/getting-started/typespecs-and-behaviours.html ([https](https://elixir-lang.org/getting-started/typespecs-and-behaviours.html) result 200). * http://elixir-lang.org/install.html with 1 occurrences migrated to: https://elixir-lang.org/install.html ([https](https://elixir-lang.org/install.html) result 200). * http://erlware.org/ with 1 occurrences migrated to: https://erlware.org/ ([https](https://erlware.org/) result 200). * http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to: https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200). * http://ninenines.eu with 6 occurrences migrated to: https://ninenines.eu ([https](https://ninenines.eu) result 200). * http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200). * http://www.actordb.com/ with 2 occurrences migrated to: https://www.actordb.com/ ([https](https://www.actordb.com/) result 200). * http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to: https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200). * http://www.rebar3.org with 1 occurrences migrated to: https://www.rebar3.org ([https](https://www.rebar3.org) result 200). * http://contributor-covenant.org with 1 occurrences migrated to: https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301). * http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to: https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301). * http://inaka.github.com/apns4erl with 1 occurrences migrated to: https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301). * http://inaka.github.com/edis/ with 1 occurrences migrated to: https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301). * http://lasp-lang.org/ with 1 occurrences migrated to: https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301). * http://rabbitmq.com/documentation.html with 1 occurrences migrated to: https://rabbitmq.com/documentation.html ([https](https://rabbitmq.com/documentation.html) result 301). * http://saleyn.github.com/erlexec with 1 occurrences migrated to: https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301). * http://www.mozilla.org/MPL/ with 290 occurrences migrated to: https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301). * http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to: https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 16:13:07 +08:00
## at https://www.mozilla.org/MPL/
2016-02-03 23:01:32 +08:00
##
## Software distributed under the License is distributed on an "AS IS"
## basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
## the License for the specific language governing rights and
## limitations under the License.
##
## The Original Code is RabbitMQ.
##
## The Initial Developer of the Original Code is GoPivotal, Inc.
2020-03-10 22:39:56 +08:00
## Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.
2016-02-03 23:01:32 +08:00
defmodule RabbitMQCtl.MixfileBase do
2016-02-03 02:54:36 +08:00
use Mix.Project
def project do
2016-03-05 01:42:43 +08:00
[
app: :rabbitmqctl,
2018-02-23 04:59:23 +08:00
version: "3.8.0-dev",
elixir: ">= 1.8.0 and < 1.11.0",
2016-03-05 01:42:43 +08:00
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
2016-10-25 23:14:26 +08:00
escript: [main_module: RabbitMQCtl,
2018-01-29 21:56:18 +08:00
emu_args: "-hidden",
2016-10-25 23:14:26 +08:00
path: "escript/rabbitmqctl"],
deps: deps(),
aliases: aliases()
2016-03-05 01:42:43 +08:00
]
2016-02-03 02:54:36 +08:00
end
# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
def application do
[applications: [:logger],
env: [scopes: ['rabbitmq-plugins': :plugins,
rabbitmqctl: :ctl,
'rabbitmq-diagnostics': :diagnostics,
2019-09-18 18:37:18 +08:00
'rabbitmq-queues': :queues,
'rabbitmq-upgrade': :upgrade]]
]
2016-06-23 19:33:39 +08:00
|> add_modules(Mix.env)
end
2016-06-23 19:33:39 +08:00
defp add_modules(app, :test) do
# There are issues with building a package without this line ¯\_(ツ)_/¯
Mix.Project.get
2016-06-23 19:33:39 +08:00
path = Mix.Project.compile_path
mods = modules_from(Path.wildcard("#{path}/*.beam"))
test_modules = [RabbitMQ.CLI.Ctl.Commands.DuckCommand,
RabbitMQ.CLI.Ctl.Commands.GrayGooseCommand,
RabbitMQ.CLI.Ctl.Commands.UglyDucklingCommand,
RabbitMQ.CLI.Plugins.Commands.StorkCommand,
RabbitMQ.CLI.Plugins.Commands.HeronCommand,
RabbitMQ.CLI.Custom.Commands.CrowCommand,
RabbitMQ.CLI.Custom.Commands.RavenCommand,
RabbitMQ.CLI.Seagull.Commands.SeagullCommand,
RabbitMQ.CLI.Seagull.Commands.PacificGullCommand,
2016-12-06 20:19:25 +08:00
RabbitMQ.CLI.Seagull.Commands.HerringGullCommand,
RabbitMQ.CLI.Seagull.Commands.HermannGullCommand,
RabbitMQ.CLI.Wolf.Commands.CanisLupusCommand,
RabbitMQ.CLI.Wolf.Commands.CanisLatransCommand,
RabbitMQ.CLI.Wolf.Commands.CanisAureusCommand
]
2016-06-23 19:33:39 +08:00
[{:modules, mods ++ test_modules |> Enum.sort} | app]
end
defp add_modules(app, _) do
app
end
defp modules_from(beams) do
Enum.map beams, &(&1 |> Path.basename |> Path.rootname(".beam") |> String.to_atom)
2016-02-03 02:54:36 +08:00
end
# Dependencies can be Hex packages:
#
# {:mydep, "~> 0.3.0"}
#
# Or git/path repositories:
#
# {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
#
# Type "mix help deps" for more examples and options
#
# CAUTION: Dependencies which are shipped with RabbitMQ *MUST* com
# from Hex.pm! Therefore it's ok to fetch dependencies from Git if
# they are test dependencies or it is temporary while testing a patch.
# But that's about it. If in doubt, use Hex.pm!
#
# The reason is that we have some Makefile code to put dependencies
# from Hex.pm in RabbitMQ source archive (the source archive must be
# self-contained and RabbitMQ must be buildable offline). However, we
# don't have the equivalent for other methods.
defp deps() do
elixir_deps = [
2019-04-19 09:10:42 +08:00
{:json, "~> 1.2.0"},
{:csv, "~> 2.3.0"},
{:stdout_formatter, "~> 0.2.3"},
{:observer_cli, "~> 1.5.0"},
{:amqp, "~> 1.2.0", only: :test},
{:dialyxir, "~> 0.5", only: :test, runtime: false},
{:temp, "~> 0.4", only: :test},
{:x509, "~> 0.7", only: :test}
2016-03-03 23:08:47 +08:00
]
rabbitmq_deps = case System.get_env("DEPS_DIR") do
nil ->
# rabbitmq_cli is built as a standalone Elixir application.
[
{:rabbit_common, "~> 3.7.0"},
2019-05-13 22:46:04 +08:00
{:amqp_client, "~> 3.7.0", only: :test}
]
deps_dir ->
# rabbitmq_cli is built as part of RabbitMQ.
# Mix is confused by any `rebar.{config,lock}` we might have left in
# `rabbit_common` or `amqp_client`. So just remove those files to be
# safe, as they are generated when we publish to Hex.pm only.
for dir <- ["rabbit_common", "amqp_client"] do
for file <- ["rebar.config", "rebar.lock"] do
File.rm(Path.join([deps_dir, dir, file]))
end
end
# We disable compilation for rabbit_common and amqp_client
# because Erlang.mk already built them.
[
{
:rabbit_common,
path: Path.join(deps_dir, "rabbit_common"),
compile: false,
override: true
},
{
:goldrush,
path: Path.join(deps_dir, "goldrush"),
compile: false,
override: true
},
{
:lager,
path: Path.join(deps_dir, "lager"),
compile: false,
override: true
},
{
:amqp_client,
path: Path.join(deps_dir, "amqp_client"),
compile: false,
override: true,
only: :test
},
]
end
elixir_deps ++ rabbitmq_deps
2016-02-03 02:54:36 +08:00
end
defp aliases do
[
make_deps: [
"deps.get",
"deps.compile",
],
make_app: [
"compile",
"escript.build",
],
make_all: [
"deps.get",
"deps.compile",
"compile",
"escript.build",
],
make_all_in_src_archive: [
"deps.get --only prod",
"deps.compile",
"compile",
"escript.build",
],
]
end
2016-02-03 02:54:36 +08:00
end