Skip to content

jmcordero74/file-packager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file-packager

CLI tool that packages selected files into a compressed archive, preserving the original folder structure.

Features

  • Finds files by name, partial path, or full relative path
  • Preserves directory structure in the generated archive
  • Supported formats: zip, tar.gz, 7z
  • Configurable via packager.properties file or CLI parameters

Requirements

  • Java 21+
  • Maven 3.8+

Build

mvn package

Usage

From the root folder where your files are located:

file-packager <file1> [file2] ... [--output=name] [--pack=zip|tar.gz|7z]

Examples

# Package as ZIP (default)
file-packager MyService.java UserController.java

# Package as tar.gz with custom name
file-packager MyService.java UserController.java --output=delivery --pack=tar.gz

# Package as 7z
file-packager MyService.java UserController.java --pack=7z

Flexible file lookup

You can specify files in multiple ways:

Input Description
MyService.java Recursive search by name
service/MyService.java Search by partial path
src/main/service/MyService.java Full relative path

Configuration

You can create a packager.properties file in the working directory:

pack=zip
output=package

CLI parameters take priority over the configuration file.

Global installation (Windows)

  1. Build: mvn package
  2. Add the project folder to the Windows PATH
  3. Use from any directory: file-packager File1.java File2.java

Author

jmcordero74

License

GPL-3.0

About

CLI tool that packages selected files into a compressed archive, preserving the original folder structure.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors