Skip to content

Commit

Permalink
Renamed all tools modules into cli modules
Browse files Browse the repository at this point in the history
  • Loading branch information
spoto committed Mar 5, 2024
1 parent d5419e6 commit 2648420
Show file tree
Hide file tree
Showing 50 changed files with 117 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"

DIR=$DIR"/.."

java --module-path $DIR/modules/explicit:$DIR/modules/automatic --class-path $DIR"/modules/unnamed/*" --module io.mokamint.miner.tools/io.mokamint.miner.tools.MokamintMiner "$@"
java --module-path $DIR/modules/explicit:$DIR/modules/automatic --class-path $DIR"/modules/unnamed/*" --module io.mokamint.miner.cli/io.mokamint.miner.cli.MokamintMiner "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set SOURCE=%~dp0
set DIR=%SOURCE%

java --module-path "%DIR%modules\explicit";"%DIR%modules\automatic" --class-path "%DIR%modules\unnamed\*" --module io.mokamint.miner.tools/io.mokamint.miner.tools.MokamintMiner %*
java --module-path "%DIR%modules\explicit";"%DIR%modules\automatic" --class-path "%DIR%modules\unnamed\*" --module io.mokamint.miner.cli/io.mokamint.miner.cli.MokamintMiner %*
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>io-mokamint-miner-tools</artifactId>
<name>io-mokamint-miner-tools</name>
<artifactId>io-mokamint-miner-cli</artifactId>
<name>io-mokamint-miner-cli</name>
<packaging>jar</packaging>
<version>${mokamint.version}</version>
<description>This module implements a command-line tool for working with Mokamint miners.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
limitations under the License.
*/

package io.mokamint.miner.tools;
package io.mokamint.miner.cli;

import io.mokamint.cli.AbstractTool;
import io.mokamint.miner.tools.internal.Start;
import io.mokamint.miner.cli.internal.Start;
import picocli.CommandLine.Command;

/**
* A command-line interface for working with Mokamint miners.
*
* This class is meant to be run from the parent directory, after building the project, with this command-line:
*
* java --module-path modules/explicit:modules/automatic --class-path "modules/unnamed/*" --module io.mokamint.miner.tools/io.mokamint.miner.tools.MokamintMiner
* java --module-path modules/explicit:modules/automatic --class-path "modules/unnamed/*" --module io.mokamint.miner.cli/io.mokamint.miner.cli.MokamintMiner
*/
@Command(
name = "mokamint-miner",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.miner.tools.internal;
package io.mokamint.miner.cli.internal;

import java.io.BufferedReader;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
/**
* This module implements a command-line tool for working with Mokamint miners.
*/
module io.mokamint.miner.tools {
exports io.mokamint.miner.tools;
opens io.mokamint.miner.tools.internal to info.picocli; // for injecting CLI options
module io.mokamint.miner.cli {
exports io.mokamint.miner.cli;
opens io.mokamint.miner.cli.internal to info.picocli; // for injecting CLI options

requires io.mokamint.miner.local;
requires io.mokamint.miner.service;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"

DIR=$DIR"/.."

java --add-modules org.glassfish.tyrus.container.grizzly.server --module-path $DIR/modules/explicit:$DIR/modules/automatic --class-path $DIR"/modules/unnamed/*" --module io.mokamint.node.tools/io.mokamint.node.tools.MokamintNode "$@"
java --add-modules org.glassfish.tyrus.container.grizzly.server --module-path $DIR/modules/explicit:$DIR/modules/automatic --class-path $DIR"/modules/unnamed/*" --module io.mokamint.node.cli/io.mokamint.node.cli.MokamintNode "$@"
5 changes: 5 additions & 0 deletions io-mokamint-node-cli/mokamint-node.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
set SOURCE=%~dp0
set DIR=%SOURCE%

java --add-modules org.glassfish.tyrus.container.grizzly.server --module-path "%DIR%modules\explicit";"%DIR%modules\automatic" --class-path "%DIR%modules\unnamed\*" --module io.mokamint.node.cli/io.mokamint.node.cli.MokamintNode %*
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>io-mokamint-node-tools</artifactId>
<name>io-mokamint-node-tools</name>
<artifactId>io-mokamint-node-cli</artifactId>
<name>io-mokamint-node-cli</name>
<packaging>jar</packaging>
<version>${mokamint.version}</version>
<description>This module implements a command-line tool for controlling Mokamint nodes.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
limitations under the License.
*/

package io.mokamint.node.tools;
package io.mokamint.node.cli;

import io.mokamint.cli.AbstractTool;
import io.mokamint.node.tools.internal.Chain;
import io.mokamint.node.tools.internal.Config;
import io.mokamint.node.tools.internal.Info;
import io.mokamint.node.tools.internal.Keys;
import io.mokamint.node.tools.internal.Mempool;
import io.mokamint.node.tools.internal.Miners;
import io.mokamint.node.tools.internal.Peers;
import io.mokamint.node.tools.internal.Start;
import io.mokamint.node.tools.internal.Tasks;
import io.mokamint.node.tools.internal.Transactions;
import io.mokamint.node.cli.internal.Chain;
import io.mokamint.node.cli.internal.Config;
import io.mokamint.node.cli.internal.Info;
import io.mokamint.node.cli.internal.Keys;
import io.mokamint.node.cli.internal.Mempool;
import io.mokamint.node.cli.internal.Miners;
import io.mokamint.node.cli.internal.Peers;
import io.mokamint.node.cli.internal.Start;
import io.mokamint.node.cli.internal.Tasks;
import io.mokamint.node.cli.internal.Transactions;
import picocli.CommandLine.Command;

/**
* A command-line interface for controlling Mokamint nodes.
*
* This class is meant to be run from the parent directory, after building the project, with this command-line:
*
* java --module-path modules/explicit:modules/automatic --class-path "modules/unnamed/*" --module io.mokamint.node.tools/io.mokamint.node.tools.MokamintNode
* java --module-path modules/explicit:modules/automatic --class-path "modules/unnamed/*" --module io.mokamint.node.cli/io.mokamint.node.cli.MokamintNode
*/
@Command(
name = "mokamint-node",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.net.URI;
import java.util.logging.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.net.URI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.net.URI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.io.IOException;
import java.net.URI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.chain.Info;
import io.mokamint.node.tools.internal.chain.List;
import io.mokamint.node.tools.internal.chain.Show;
import io.mokamint.node.cli.internal.chain.Info;
import io.mokamint.node.cli.internal.chain.List;
import io.mokamint.node.cli.internal.chain.Show;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.config.Show;
import io.mokamint.node.cli.internal.config.Show;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.time.LocalDateTime;
import java.util.concurrent.atomic.AtomicInteger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.util.concurrent.TimeoutException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.keys.Create;
import io.mokamint.node.tools.internal.keys.Show;
import io.mokamint.node.cli.internal.keys.Create;
import io.mokamint.node.cli.internal.keys.Show;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.mempool.Info;
import io.mokamint.node.tools.internal.mempool.List;
import io.mokamint.node.cli.internal.mempool.Info;
import io.mokamint.node.cli.internal.mempool.List;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.miners.Add;
import io.mokamint.node.tools.internal.miners.List;
import io.mokamint.node.tools.internal.miners.Remove;
import io.mokamint.node.cli.internal.miners.Add;
import io.mokamint.node.cli.internal.miners.List;
import io.mokamint.node.cli.internal.miners.Remove;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.peers.Add;
import io.mokamint.node.tools.internal.peers.List;
import io.mokamint.node.tools.internal.peers.Remove;
import io.mokamint.node.cli.internal.peers.Add;
import io.mokamint.node.cli.internal.peers.List;
import io.mokamint.node.cli.internal.peers.Remove;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.security.NoSuchAlgorithmException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.tasks.List;
import io.mokamint.node.cli.internal.tasks.List;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal;
package io.mokamint.node.cli.internal;

import io.mokamint.node.tools.internal.transactions.Add;
import io.mokamint.node.tools.internal.transactions.Find;
import io.mokamint.node.tools.internal.transactions.Show;
import io.mokamint.node.cli.internal.transactions.Add;
import io.mokamint.node.cli.internal.transactions.Find;
import io.mokamint.node.cli.internal.transactions.Show;
import picocli.CommandLine.Command;
import picocli.CommandLine.HelpCommand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal.chain;
package io.mokamint.node.cli.internal.chain;

import java.util.concurrent.TimeoutException;

import io.mokamint.cli.CommandException;
import io.mokamint.node.ChainInfos;
import io.mokamint.node.api.DatabaseException;
import io.mokamint.node.api.NodeException;
import io.mokamint.node.cli.internal.AbstractPublicRpcCommand;
import io.mokamint.node.remote.api.RemotePublicNode;
import io.mokamint.node.tools.internal.AbstractPublicRpcCommand;
import jakarta.websocket.EncodeException;
import picocli.CommandLine.Command;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal.chain;
package io.mokamint.node.cli.internal.chain;

import java.security.NoSuchAlgorithmException;
import java.time.LocalDateTime;
Expand All @@ -32,8 +32,8 @@
import io.mokamint.node.api.GenesisBlockDescription;
import io.mokamint.node.api.NodeException;
import io.mokamint.node.api.NonGenesisBlockDescription;
import io.mokamint.node.cli.internal.AbstractPublicRpcCommand;
import io.mokamint.node.remote.api.RemotePublicNode;
import io.mokamint.node.tools.internal.AbstractPublicRpcCommand;
import picocli.CommandLine.Command;
import picocli.CommandLine.Help.Ansi;
import picocli.CommandLine.Option;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal.chain;
package io.mokamint.node.cli.internal.chain;

import java.security.NoSuchAlgorithmException;
import java.util.Optional;
Expand All @@ -30,8 +30,8 @@
import io.mokamint.node.api.DatabaseException;
import io.mokamint.node.api.GenesisBlockDescription;
import io.mokamint.node.api.NodeException;
import io.mokamint.node.cli.internal.AbstractPublicRpcCommand;
import io.mokamint.node.remote.api.RemotePublicNode;
import io.mokamint.node.tools.internal.AbstractPublicRpcCommand;
import jakarta.websocket.EncodeException;
import picocli.CommandLine.ArgGroup;
import picocli.CommandLine.Command;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
limitations under the License.
*/

package io.mokamint.node.tools.internal.config;
package io.mokamint.node.cli.internal.config;

import java.util.concurrent.TimeoutException;

import io.mokamint.cli.CommandException;
import io.mokamint.node.ConsensusConfigBuilders;
import io.mokamint.node.api.NodeException;
import io.mokamint.node.cli.internal.AbstractPublicRpcCommand;
import io.mokamint.node.remote.api.RemotePublicNode;
import io.mokamint.node.tools.internal.AbstractPublicRpcCommand;
import jakarta.websocket.EncodeException;
import picocli.CommandLine.Command;

Expand Down

0 comments on commit 2648420

Please sign in to comment.