Usage

List Tools

To list all tools:

java -jar smartics-softlink-tool-0.5.2-jar-with-dependencies.jar -h

The console shows:

Please select one of the following tools:

  update-links - runs over folders to update SNAPSHOT and LATEST soft links.
  watch        - watches folders for changes to update SNAPSHOT and LATEST soft links.

Pass -h to the tool for more information.

List Help for a Tool

Name the tool help is requested for:

java -jar smartics-softlink-tool-0.5.2-jar-with-dependencies.jar update-links -h

The console shows:

usage: update-links
 -comparator <classname>   the fully qualified name of the comparator class to use. Requires to implement
                           'java.util.Comparator60de.smartics.tool.softlink.analyze.FileSystemResourceAnalyzer$VersionedProjectSite>'.
 -dryRun                   only print what to do to standard out. Overrides 'handler' option.
 -h,--help                 prints help to the console.
 -handler <classname>      the fully qualified name of the link handler class to use. Requires to implement
                           'de.smartics.tool.softlink.admin.FileSystemHandler'.

Traverse Folders on a Dry Run

To just check what the tool is about to do, execute a dry run on the current directory:

java -jar smartics-softlink-tool-0.5.2-jar-with-dependencies.jar update-links -dryRun .

The tool prints to the console what it would do.

Creating link: child\grandchild\LATEST' to point to 'child\grandchild\0.2.0'.
Creating link: flat\LATEST' to point to 'flat\1.0.0'.

Traverse Folders to update Links

To run on a list of folders, run:

java -jar smartics-softlink-tool-0.5.2-jar-with-dependencies.jar update-links dir1 dir2 dir3

Watch Folders to update Links

To watch a list of folders for modifications and updating links accordingly, use:

java -jar smartics-softlink-tool-0.5.2-jar-with-dependencies.jar watch dir1 dir2 dir3

Delete outdated snapshot Folder

A snapshot folder is outdated if there is a more recent final or snapshot version present. At most there is one snapshot folder. There is none if there is a final version that is more recent than all snapshot versions.

Watch as well as update-links support the deletion of outdated snapshot folders by adding

-delSnaps

as option to the command line.

Create root Link

To create a link from the root folder to the LATEST link of each project, use:

-pl

The name of the created link is determined by the name of the project. E.g. if the LATEST link is named root/group-x/my-project/LATEST the link created in the root folder is named root/my-project and is pointing to group-x/my-project/LATEST.

Create previous Links

To create links to all previous versions from the latest version, use:

-al

Links will be created in the latest versions root folder like this:

2.0.0
  ../0.1.0
  ../1.0.0
  ../2.0.0