Skip to content

Commit

Permalink
updated documentation website
Browse files Browse the repository at this point in the history
  • Loading branch information
thevpc committed Sep 12, 2020
1 parent b450a37 commit 1da8a2e
Show file tree
Hide file tree
Showing 381 changed files with 54,547 additions and 134 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ toolbox/worky/worky.iml
/lsp/log/xml_err_20200731.log
/lsp/log/xml_out_20200730.log
/lsp/log/xml_out_20200731.log
/website/nuts/nbproject/private/
/toolbox/docusaurus-to-asciidoctor/target/
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# nuts
Network Updatable Things Services
<pre>
_ __ __
/ | / /_ __/ /______
/ |/ / / / / __/ ___/
/ /| / /_/ / /_(__ )
/_/ |_/\__,_/\__/____/ version 0.7.0.0
__ __
/\ \ \ _ __/ /______
/ \/ / / / / __/ ___/
/ /\ / /_/ / /_(__ )
\_\ \/\__,_/\__/____/ version 0.7.0.0
</pre>

**nuts** is a Package manager for Java (and other things). It stands for **Network Updatable Things Services** tool. Think of it as **npm** for javascript or **pip** for python. But it lots more... It is a simple tool for managing remote artifacts, installing these artifacts to the current machine and executing such artifacts on need. Each managed artifact is also called a **nuts** which is a **Network Updatable Thing Service** . Nuts artifacts are stored into repositories. A **repository** may be local for storing local Nuts or remote for accessing remote artifacts (good examples are remote maven repositories).
Expand All @@ -25,6 +25,10 @@ What makes **nuts** very helpful is that it simplifies application deployments b
+ search : search for existing/installable artifacts
+ welcome : a command that does nothing but bootstrapping nuts and showing a welcome message.


Visit [nuts website](http:https://core-techs-solutions.com/nuts)


## Download Latest stable version
+ Linux,Windows,iOS, and Java enabled OS : [nuts-0.7.0.jar](https://github.com/thevpc/vpc-public-maven/raw/master/net/vpc/app/nuts/nuts/0.7.0/nuts-0.7.0.jar)
+ On Unix/Linux platforms you may use :
Expand Down
10 changes: 5 additions & 5 deletions README.md.pre
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ include("app-include.pre-script");
# nuts
Network Updatable Things Services
<pre>
_ __ __
/ | / /_ __/ /______
/ |/ / / / / __/ ___/
/ /| / /_/ / /_(__ )
/_/ |_/\__,_/\__/____/ version ${implVersion}
__ __
/\ \ \ _ __/ /______
/ \/ / / / / __/ ___/
/ /\ / /_/ / /_(__ )
\_\ \/\__,_/\__/____/ version ${implVersion}
</pre>

**nuts** is a Package manager for Java (and other things). It stands for **Network Updatable Things Services** tool. Think of it as **npm** for javascript or **pip** for python. But it lots more... It is a simple tool for managing remote artifacts, installing these artifacts to the current machine and executing such artifacts on need. Each managed artifact is also called a **nuts** which is a **Network Updatable Thing Service** . Nuts artifacts are stored into repositories. A **repository** may be local for storing local Nuts or remote for accessing remote artifacts (good examples are remote maven repositories).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public class DefaultNutsDeployRepositoryCommand extends AbstractNutsDeployRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public class DefaultNutsFetchContentRepositoryCommand extends AbstractNutsFetchContentRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

/**
* @author vpc
* @category SPI Base
*/
public class DefaultNutsFetchDescriptorRepositoryCommand extends AbstractNutsFetchDescriptorRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public class DefaultNutsPushRepositoryCommand extends AbstractNutsPushRepositoryCommand {
private final NutsLogger LOG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public class DefaultNutsRepositoryUndeployCommand extends AbstractNutsRepositoryUndeployCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public class DefaultNutsSearchRepositoryCommand extends AbstractNutsSearchRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

/**
* @author vpc
* @category SPI Base
*/
public class DefaultNutsSearchVersionsRepositoryCommand extends AbstractNutsSearchVersionsRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,16 +534,6 @@ public boolean isCompact() {
return compact;
}

@Override
public NutsXmlFormat compact() {
return compact(true);
}

@Override
public NutsXmlFormat compact(boolean compact) {
return setCompact(compact);
}

@Override
public NutsXmlFormat setCompact(boolean compact) {
this.compact = compact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public NutsSession getSession() {
return session;
}


@Override
public NutsIOCopyAction setSession(NutsSession session) {
this.session = session;
Expand Down Expand Up @@ -307,6 +306,7 @@ public NutsIOCopyAction run() {
}

private static class CopyData {

long files;
long folders;
long doneFiles;
Expand Down Expand Up @@ -396,11 +396,11 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
}

public Path copy(Path source, Path target, CopyOption... options) throws IOException {
if(interruptible){
try(InputStream in=CoreIOUtils.interruptible(Files.newInputStream(source))){
interruptibleInstance=(Interruptible) in;
try(OutputStream out=Files.newOutputStream(target)){
transferTo(in,out);
if (interruptible) {
try (InputStream in = CoreIOUtils.interruptible(Files.newInputStream(source))) {
interruptibleInstance = (Interruptible) in;
try (OutputStream out = Files.newOutputStream(target)) {
transferTo(in, out);
}
}
return target;
Expand All @@ -410,37 +410,37 @@ public Path copy(Path source, Path target, CopyOption... options) throws IOExcep

public long copy(InputStream in, Path target, CopyOption... options)
throws IOException {
if(interruptible){
in=CoreIOUtils.interruptible(in);
interruptibleInstance=(Interruptible) in;
try(OutputStream out=Files.newOutputStream(target)){
return transferTo(in,out);
if (interruptible) {
in = CoreIOUtils.interruptible(in);
interruptibleInstance = (Interruptible) in;
try (OutputStream out = Files.newOutputStream(target)) {
return transferTo(in, out);
}
}
return Files.copy(in, target, options);
}

public long copy(InputStream in, OutputStream out, CopyOption... options)
throws IOException {
if(interruptible){
in=CoreIOUtils.interruptible(in);
interruptibleInstance=(Interruptible) in;
return transferTo(in,out);
if (interruptible) {
in = CoreIOUtils.interruptible(in);
interruptibleInstance = (Interruptible) in;
return transferTo(in, out);
}
return CoreIOUtils.copy(in, out);
}

public long copy(Path source, OutputStream out) throws IOException {
if(interruptible){
try(InputStream in=CoreIOUtils.interruptible(Files.newInputStream(source))){
interruptibleInstance=(Interruptible) in;
return transferTo(in,out);
if (interruptible) {
try (InputStream in = CoreIOUtils.interruptible(Files.newInputStream(source))) {
interruptibleInstance = (Interruptible) in;
return transferTo(in, out);
}
}
return Files.copy(source, out);
}

private long transferTo(InputStream in,OutputStream out) throws IOException {
private long transferTo(InputStream in, OutputStream out) throws IOException {
int DEFAULT_BUFFER_SIZE = 8192;
Objects.requireNonNull(out, "out");
long transferred = 0;
Expand Down Expand Up @@ -604,7 +604,7 @@ private void copyStream() {
}
}
} catch (IOException ex) {
LOG.with().level(Level.CONFIG).verb(NutsLogVerb.FAIL).log( "error copying {0} to {1} : {2}", _source.getSource(), target.getValue(), ex.toString());
LOG.with().level(Level.CONFIG).verb(NutsLogVerb.FAIL).log("error copying {0} to {1} : {2}", _source.getSource(), target.getValue(), ex.toString());
throw new UncheckedIOException(ex);
}
}
Expand All @@ -616,7 +616,7 @@ private void _validate(Path temp) {
} catch (NutsIOCopyValidationException ex) {
throw ex;
} catch (Exception ex) {
throw new NutsIOCopyValidationException("Validate file " + temp + " failed", ex);
throw new NutsIOCopyValidationException(session.getWorkspace(), "Validate file " + temp + " failed", ex);
}
}
}
Expand All @@ -628,7 +628,7 @@ private void _validate(byte[] temp) {
} catch (NutsIOCopyValidationException ex) {
throw ex;
} catch (Exception ex) {
throw new NutsIOCopyValidationException("Validate file failed", ex);
throw new NutsIOCopyValidationException(session.getWorkspace(), "Validate file failed", ex);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public abstract class AbstractNutsDeployRepositoryCommand extends NutsRepositoryCommandBase<NutsDeployRepositoryCommand> implements NutsDeployRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public abstract class AbstractNutsFetchContentRepositoryCommand extends NutsRepositoryCommandBase<NutsFetchContentRepositoryCommand> implements NutsFetchContentRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
/**
*
* @author vpc
* @category SPI Base
*/
public abstract class AbstractNutsFetchDescriptorRepositoryCommand extends NutsRepositoryCommandBase<NutsFetchDescriptorRepositoryCommand> implements NutsFetchDescriptorRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

/**
* @author vpc
* @category SPI Base
*/
public abstract class AbstractNutsPushRepositoryCommand extends NutsRepositoryCommandBase<NutsPushRepositoryCommand> implements NutsPushRepositoryCommand {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== _ _\_ _\_ ==
== / | / /_ _\_/ /_\_\_\_\_\_ == ==N==etwork ==U==pdatable ==T==hings ==S==ervices
== / |/ / / / / _\_/ _\_\_/ == <<The Open Source Package Manager for __Java__ (TM)>>
== / /| / /_/ / /_\(_\_ \) == <<and other __Things__>> ... by ==thevpc==
==/_/ |_/\\_\_,_/\\_\_/_\_\_\_/ == __http:https://github.com/thevpc/nuts__
version [[${nuts.workspace-runtime.version}]]
== _\_ _\_ ==
== /\\ \\ \\ _ _\_/ /_\_\_\_\_\_ == ==N==etwork ==U==pdatable ==T==hings ==S==ervices
== / \\/ / / / / _\_/ _\_\_/ == <<The Open Source Package Manager for __Java__ (TM)>>
==/ /\\ / /_/ / /_(_\_ ) == <<and other __Things__>> ... by ==thevpc==
==\\_\\ \\/\\_\_,_/\\_\_/_\_\_\_/ == __http:https://github.com/thevpc/nuts__
version [[${nuts.workspace-runtime.version}]]
16 changes: 16 additions & 0 deletions nuts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,22 @@
</goals>
</execution>
</executions>
<configuration>
<tags>
<tag>
<name>todo</name>
<!-- todo tag for all places -->
<placement>a</placement>
<head>To do something:</head>
</tag>
<tag>
<name>category</name>
<!-- todo tag for all places -->
<placement>a</placement>
<head>Category:</head>
</tag>
</tags>
</configuration>
</plugin>
<plugin>
<groupId>net.vpc.common.maven</groupId>
Expand Down
1 change: 1 addition & 0 deletions nuts/src/main/java/net/vpc/app/nuts/Nuts.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* it's main class for creating and opening nuts workspaces.
*
* @since 0.1.0
* @category Base
*/
public final class Nuts {

Expand Down
1 change: 1 addition & 0 deletions nuts/src/main/java/net/vpc/app/nuts/NutsAddOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* @see NutsWorkspaceConfigManager#addCommandAliasFactory(net.vpc.app.nuts.NutsCommandAliasFactoryConfig,
* net.vpc.app.nuts.NutsAddOptions)
* @since 0.5.4
* @category Config
*/
public class NutsAddOptions implements Serializable {
private static final long serialVersionUID = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* repository creation options
* @author vpc
* @since 0.5.4
* @category Config
*/
public class NutsAddRepositoryOptions implements Serializable {
private static final long serialVersionUID = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*
* @author vpc
* @since 0.5.5
* @category Security
*/
public interface NutsAddUserCommand extends NutsWorkspaceCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* already deployed Created by vpc on 1/15/17.
*
* @since 0.5.4
* @category Exception
*/
public class NutsAlreadyDeployedException extends NutsInstallationException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* reinstalled Created by vpc on 1/15/17.
*
* @since 0.5.4
* @category Exception
*/
public class NutsAlreadyInstalledException extends NutsInstallationException {

Expand Down
1 change: 1 addition & 0 deletions nuts/src/main/java/net/vpc/app/nuts/NutsApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
* </pre>
*
* @since 0.5.5
* @category Application
*/
public abstract class NutsApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
*
* @author vpc
* @since 0.5.5
* @category Application
*/
public interface NutsApplicationContext extends NutsConfigurable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
*
* @author vpc
* @since 0.5.5
* @category Application
*/
public interface NutsApplicationLifeCycle {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Modes Application can run with
*
* @since 0.5.5
* @category Application
*/
public enum NutsApplicationMode {
/**
Expand Down
1 change: 1 addition & 0 deletions nuts/src/main/java/net/vpc/app/nuts/NutsApplications.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
*
* @author vpc
* @since 0.5.5
* @category Application
*/
public final class NutsApplications {

Expand Down
Loading

0 comments on commit 1da8a2e

Please sign in to comment.