/argument-file

Argument file generator.

Primary LanguageJavaMIT LicenseMIT

Argument File

Argument file generator.

Coverage status Java compatibility Maven Central release License


❇ Introduction

To shorten or simplify the javac command, you can specify one or more files that contain arguments to the javac command (except -J options). This enables you to create javac commands of any length on any operating system. An argument file can include javac options and source file names in any combination.

❓ How to use

  1. Add one of the options below to the pom.xml file:

Using Maven Central (recomended):

<dependency>
  <groupId>io.github.wniemiec-io-java</groupId>
  <artifactId>argument-file</artifactId>
  <version>LATEST</version>
</dependency>

Using GitHub Packages:

<dependency>
  <groupId>wniemiec.io.java</groupId>
  <artifactId>argument-file</artifactId>
  <version>LATEST</version>
</dependency>
  1. Run
$ mvn install
  1. Use it
[...]

import wniemiec.io.java.ArgumentFile;

[...]

Path workingDirectory = Path.of(System.getProperty("java.io.tmpdir"));
String filename = "argfile";

argumentFile = new ArgumentFile(workingDirectory, filename);
argumentFile.create(List.of(
	Path.of("C:", "Foo", "Bar", "file1.jar"),
	Path.of("C:", "Foo", "Bar", "file2.jar"),
	Path.of("C:", "Foo")
);

[...]

javac @argfile.txt

📖 Documentation

Property Parameter type Return type Description Default parameter value
create paths: List<Paths> Path Generates argument file from a list of paths. -
delete void void Removes argument-file -
exists void boolean Checks if the argument-file has created. -

🚩 Changelog

Details about each version are documented in the releases section.

🤝 Contribute!

See the documentation on how you can contribute to the project here.

📁 Files

/

Name Type Description
dist Directory Released versions
docs Directory Documentation files
src Directory Source files