Skip to content

Commit 922121b

Browse files
committed
Some new feature for maven plugin
0.3.2
1 parent 7510b57 commit 922121b

File tree

6 files changed

+441
-0
lines changed

6 files changed

+441
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target/
2+
/.classpath
3+
/.project
4+
/.settings/

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# query-export-maven-plugin
2+
3+
Maven plugin for auto generating query-export
4+
5+
6+
Add maven plugin configuration :
7+
8+
<plugin>
9+
<groupId>org.fugerit.java</groupId>
10+
<artifactId>query-export-maven-plugin</artifactId>
11+
<version>X.X.X</version>
12+
<configuration>
13+
<configPath>path-to/query-export-config.xml</configPath>
14+
<idCatalog>sample</idCatalog>
15+
<dbConfig>path-to/db-sample.properties</dbConfig>
16+
</configuration>
17+
<executions>
18+
<execution>
19+
<id>openapi</id>
20+
<goals>
21+
<goal>generate</goal>
22+
</goals>
23+
</execution>
24+
</executions>
25+
<dependencies>
26+
<dependency>
27+
<groupId>jdnc-driver</groupId>
28+
<artifactId>dependancy</artifactId>
29+
<version>version</version>
30+
</dependency>
31+
</dependencies>
32+
</plugin>
33+
34+
And sample query-exprt-config :
35+
36+
<query-catalog-catalog>
37+
38+
<query-catalog id="sample-catalog">
39+
<!-- 1 - dec tipo evento -->
40+
<query id="sample_csv"
41+
sql="SELECT * SAMPLE"
42+
outputFile="target/sample/sample.csv"
43+
outputFormat="csv"
44+
createPath="1"
45+
/>
46+
<query id="dec_tipo_evento_xlsx"
47+
sql="SELECT * SAMPLE"
48+
outputFile="target/sample/sample.xslx"
49+
outputFormat="xlsx"
50+
xlsResize="1"
51+
createPath="1"
52+
/>
53+
</query-catalog>
54+
55+
56+
</query-catalog-catalog>
57+
58+
59+
Finally run :
60+
61+
mvn query-export:generate

pom.xml

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>org.fugerit.java</groupId>
6+
<artifactId>query-export-maven-plugin</artifactId>
7+
8+
<version>0.3.2</version>
9+
<packaging>maven-plugin</packaging>
10+
11+
<name>query-export-maven-plugin</name>
12+
<description>Tool export query in CSV (and in the furutre other) formats</description>
13+
<url>http://www.fugerit.org/java/</url>
14+
15+
<scm>
16+
<connection>scm:git:git://github.com/fugerit-org/query-export-maven-plugin.git</connection>
17+
<developerConnection>scm:git:ssh://github.com/fugerit-org/query-export-maven-plugin.git</developerConnection>
18+
<url>http://github.com/fugerit-org/query-export-maven-plugin/tree/main</url>
19+
</scm>
20+
21+
<properties>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
<maven.compiler.target>1.8</maven.compiler.target>
24+
<maven.compiler.source>1.8</maven.compiler.source>
25+
<query-export-version>0.3.1</query-export-version>
26+
</properties>
27+
28+
<licenses>
29+
<license>
30+
<name>Apache License, Version 2.0</name>
31+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
32+
<distribution>repo</distribution>
33+
</license>
34+
</licenses>
35+
36+
<developers>
37+
<developer>
38+
<name>Matteo a.k.a. Fugerit</name>
39+
<email>[email protected]</email>
40+
<organization>Fugerit</organization>
41+
<organizationUrl>http://www.fugerit.org</organizationUrl>
42+
</developer>
43+
<developer>
44+
<name>Daneel</name>
45+
<email>[email protected]</email>
46+
<organization>Fugerit</organization>
47+
<organizationUrl>http://www.fugerit.org</organizationUrl>
48+
</developer>
49+
</developers>
50+
51+
<distributionManagement>
52+
<snapshotRepository>
53+
<id>ossrh</id>
54+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
55+
</snapshotRepository>
56+
</distributionManagement>
57+
58+
<dependencies>
59+
60+
<dependency>
61+
<groupId>org.apache.maven</groupId>
62+
<artifactId>maven-plugin-api</artifactId>
63+
<version>3.8.5</version>
64+
</dependency>
65+
66+
<dependency>
67+
<groupId>org.apache.maven.plugin-tools</groupId>
68+
<artifactId>maven-plugin-annotations</artifactId>
69+
<version>3.6.4</version>
70+
</dependency>
71+
72+
<dependency>
73+
<groupId>org.fugerit.java</groupId>
74+
<artifactId>query-export-tool</artifactId>
75+
<version>${query-export-version}</version>
76+
</dependency>
77+
78+
<!-- logging -->
79+
<dependency>
80+
<groupId>org.apache.logging.log4j</groupId>
81+
<artifactId>log4j-core</artifactId>
82+
<version>2.17.0</version>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.slf4j</groupId>
86+
<artifactId>slf4j-api</artifactId>
87+
<version>1.6.4</version>
88+
<scope>compile</scope>
89+
</dependency>
90+
<dependency>
91+
<groupId>org.apache.logging.log4j</groupId>
92+
<artifactId>log4j-slf4j-impl</artifactId>
93+
<version>2.13.1</version>
94+
</dependency>
95+
96+
<dependency>
97+
<groupId>org.hsqldb</groupId>
98+
<artifactId>hsqldb</artifactId>
99+
<version>2.3.4</version>
100+
<scope>test</scope>
101+
</dependency>
102+
103+
<dependency>
104+
<groupId>junit</groupId>
105+
<artifactId>junit</artifactId>
106+
<version>4.13.1</version>
107+
<scope>test</scope>
108+
</dependency>
109+
110+
</dependencies>
111+
112+
<build>
113+
114+
<plugins>
115+
116+
<plugin>
117+
<groupId>org.apache.maven.plugins</groupId>
118+
<artifactId>maven-plugin-plugin</artifactId>
119+
<version>3.6.0</version>
120+
<executions>
121+
<execution>
122+
<id>default-descriptor</id>
123+
<phase>process-classes</phase>
124+
</execution>
125+
<!-- if you want to generate help goal
126+
<execution>
127+
<id>help-goal</id>
128+
<goals>
129+
<goal>helpmojo</goal>
130+
</goals>
131+
</execution>
132+
-->
133+
</executions>
134+
</plugin>
135+
136+
<plugin>
137+
<groupId>org.apache.maven.plugins</groupId>
138+
<artifactId>maven-source-plugin</artifactId>
139+
<version>3.0.1</version>
140+
<executions>
141+
<execution>
142+
<id>attach-sources</id>
143+
<goals>
144+
<goal>jar</goal>
145+
</goals>
146+
</execution>
147+
</executions>
148+
</plugin>
149+
<plugin>
150+
<groupId>org.apache.maven.plugins</groupId>
151+
<artifactId>maven-javadoc-plugin</artifactId>
152+
<version>2.10.4</version>
153+
<configuration>
154+
<stylesheetfile>src/main/javadoc/stylesheet.css</stylesheetfile>
155+
</configuration>
156+
<executions>
157+
<execution>
158+
<id>attach-javadocs</id>
159+
<goals>
160+
<goal>jar</goal>
161+
</goals>
162+
</execution>
163+
</executions>
164+
</plugin>
165+
166+
</plugins>
167+
168+
</build>
169+
170+
<profiles>
171+
172+
<profile>
173+
<id>full</id>
174+
<build>
175+
<pluginManagement>
176+
<plugins>
177+
<plugin>
178+
<groupId>org.apache.maven.plugins</groupId>
179+
<artifactId>maven-source-plugin</artifactId>
180+
<version>3.0.1</version>
181+
</plugin>
182+
<plugin>
183+
<groupId>org.apache.maven.plugins</groupId>
184+
<artifactId>maven-javadoc-plugin</artifactId>
185+
<version>2.10.4</version>
186+
</plugin>
187+
</plugins>
188+
</pluginManagement>
189+
</build>
190+
</profile>
191+
192+
<profile>
193+
<id>doRelease</id>
194+
<build>
195+
<plugins>
196+
<plugin>
197+
<groupId>org.sonatype.plugins</groupId>
198+
<artifactId>nexus-staging-maven-plugin</artifactId>
199+
<version>1.6.8</version>
200+
<extensions>true</extensions>
201+
<configuration>
202+
<serverId>ossrh</serverId>
203+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
204+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
205+
</configuration>
206+
</plugin>
207+
208+
<plugin>
209+
<groupId>org.apache.maven.plugins</groupId>
210+
<artifactId>maven-gpg-plugin</artifactId>
211+
<version>1.5</version>
212+
<executions>
213+
<execution>
214+
<id>sign-artifacts</id>
215+
<phase>verify</phase>
216+
<goals>
217+
<goal>sign</goal>
218+
</goals>
219+
</execution>
220+
</executions>
221+
</plugin>
222+
223+
</plugins>
224+
</build>
225+
</profile>
226+
227+
<profile>
228+
<id>singlepackage</id>
229+
<build>
230+
<plugins>
231+
<plugin>
232+
<groupId>org.apache.maven.plugins</groupId>
233+
<artifactId>maven-jar-plugin</artifactId>
234+
<version>3.0.2</version>
235+
<configuration>
236+
<archive>
237+
<manifest>
238+
<addClasspath>true</addClasspath>
239+
<mainClass>org.fugerit.java.yaml.doc.YamlDocMain</mainClass>
240+
</manifest>
241+
</archive>
242+
</configuration>
243+
</plugin>
244+
<plugin>
245+
<groupId>org.apache.maven.plugins</groupId>
246+
<artifactId>maven-shade-plugin</artifactId>
247+
<version>3.1.0</version>
248+
<executions>
249+
<execution>
250+
<phase>package</phase>
251+
<goals>
252+
<goal>shade</goal>
253+
</goals>
254+
</execution>
255+
</executions>
256+
<configuration>
257+
<finalName>dist-${project.artifactId}-${project.version}</finalName>
258+
</configuration>
259+
</plugin>
260+
</plugins>
261+
</build>
262+
</profile>
263+
</profiles>
264+
265+
<organization>
266+
<url>http://www.fugerit.org</url>
267+
<name>Fugerit</name>
268+
</organization>
269+
270+
</project>

0 commit comments

Comments
 (0)