https://github.com/javadev/generate-pom-and-cmd
generate-pom-and-cmd
https://github.com/javadev/generate-pom-and-cmd
Last synced: 8 months ago
JSON representation
generate-pom-and-cmd
- Host: GitHub
- URL: https://github.com/javadev/generate-pom-and-cmd
- Owner: javadev
- License: mit
- Created: 2020-08-08T11:50:41.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-03T08:08:51.000Z (about 1 year ago)
- Last Synced: 2025-03-26T07:09:02.429Z (9 months ago)
- Language: Batchfile
- Size: 32.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GeneratePomAndCmd
**POM and CMD File Generator**
Version: `2020-08-08`
## Overview
The `GeneratePomAndCmd` application is a command-line utility designed to automate the generation of Maven POM and CMD files for Java projects. It scans a specified directory for `.jar` files and generates:
1. A `pom.xml` file with Maven dependencies for the discovered JAR files.
2. A `install-jars.cmd` script to install the JAR files into a local Maven repository.
For more information, visit the [GitHub repository](https://github.com/javadev/generate-pom-and-cmd).
---
## Features
- **Automated POM Generation**: Creates a POM file with dependency declarations for all `.jar` files in the source directory.
- **Batch Maven Installation Script**: Generates a `CMD` script to simplify installing JARs into a Maven repository.
- **Recursive File Scanning**: Traverses directories recursively to locate `.jar` files.
---
## Requirements
- Java 8 or higher
- Maven
- Apache Commons CLI
- [Underscore-java](https://github.com/javadev/underscore-java)
---
## Installation
1. Clone the repository:
```bash
git clone https://github.com/javadev/generate-pom-and-cmd.git
```
2. Compile the project:
```bash
mvn clean compile
```
---
## Usage
Run the application using the following command:
```bash
java -jar generate-pom-and-cmd-1.0.jar -s
```
### Options
| Option | Description |
|---------------------|----------------------------------------------------|
| `-s, --src` | The source directory containing `.jar` files. |
| `-?, --help` | Displays help information. |
---
## Example
1. **Generate POM and CMD files**:
```bash
java -jar generate-pom-and-cmd-1.0.jar -s /path/to/jars
```
- **Generated Files**:
- `generated-pom.xml`: Contains Maven dependency declarations.
- `install-jars.cmd`: Batch script to install JAR files.
2. **Install JARs Using CMD Script**:
```bash
install-jars.cmd
```
---
## Project Structure
```plaintext
src/main/java/com/github/generator
└── GeneratePomAndCmd.java # Main class to generate POM and CMD files.
```
---
## Contributing
We welcome contributions! Please submit issues or pull requests through the [GitHub repository](https://github.com/javadev/generate-pom-and-cmd).
---
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
---
Feel free to suggest improvements or add details to fit your project requirements!