Initial Commit

This commit is contained in:
Amit Kumar Nandi 2024-02-18 00:56:17 +05:30
parent 101eadfe5d
commit 0fd5564f6c
3 changed files with 67 additions and 9 deletions

View file

@ -23,25 +23,26 @@ This is a Java application for exporting data from a MySQL database to various f
## Prerequisites ## Prerequisites
* Java 11 or higher * Java 8 or higher
* MySQL database * MySQL database
## Getting Started ## Getting Started
1. Clone the repository: 1. Clone the repository:
git clone https://github.com/your-username/db-exporter.git ```bash
git clone https://github.com/aamitn/DbExporter.git
cd DbExporter
2.  Compile the code: 2. Compile the code:
cd db-exporter ```bash
mvn clean install
javac -cp .:path/to/mysql-connector-java.jar org/nmpl/\*.java org/nmpl/exporters/\*.java org/nmpl/exceptions/\*.java
3. Run the application: 3. Run the application:
java -cp .:path/to/mysql-connector-java.jar org.nmpl.App ```bash
java -jar out/DbExporter.jar
## Usage ## Usage

56
pom.xml
View file

@ -4,9 +4,10 @@
<groupId>org.nmpl</groupId> <groupId>org.nmpl</groupId>
<artifactId>DbExporter</artifactId> <artifactId>DbExporter</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.2-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>DbExporter</name> <name>DbExporter</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
@ -36,10 +37,63 @@
<version>3.8.1</version> <version>3.8.1</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.reflections</groupId> <groupId>org.reflections</groupId>
<artifactId>reflections</artifactId> <artifactId>reflections</artifactId>
<version>0.10.2</version> <version>0.10.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<finalName>DbExporter</finalName>
<plugins>
<!-- Set a compiler level -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
<!-- Maven Shade Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<!-- Run shade goal on package phase -->
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<!-- add Main-Class to manifest file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.nmpl.App</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

View file

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.nmpl.App