Skip to content

Commit 8c67f37

Browse files
committed
Initial revision of example application that uses MagicLibrary
1 parent d5153e0 commit 8c67f37

File tree

6 files changed

+657
-0
lines changed

6 files changed

+657
-0
lines changed

file/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This is a simple sample application that demonstrates how
2+
to use the MagicLibrary to identify and furnish information
3+
on different resources.
4+
5+
This example is considered freeware.
6+

file/pom.xml

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>org.magicdb.magic.application</groupId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
10+
<!-- FIXME change it to the project's website -->
11+
<url></url>
12+
<organization>
13+
<name>Optima SC Inc.</name>
14+
<url>http://www.optimasc.com</url>
15+
</organization>
16+
17+
<licenses>
18+
<license>
19+
<name>Freeware</name>
20+
</license>
21+
</licenses>
22+
23+
<developers>
24+
<developer>
25+
<name>Carl Eric Codere</name>
26+
<organization>Optimas SC Inc.</organization>
27+
<roles>
28+
<role>creator</role>
29+
<role>developer</role>
30+
</roles>
31+
</developer>
32+
</developers>
33+
34+
<contributors>
35+
</contributors>
36+
37+
<repositories>
38+
<repository>
39+
<releases>
40+
<enabled>false</enabled>
41+
<updatePolicy>always</updatePolicy>
42+
<checksumPolicy>warn</checksumPolicy>
43+
</releases>
44+
<snapshots>
45+
<enabled>true</enabled>
46+
<updatePolicy>never</updatePolicy>
47+
<checksumPolicy>fail</checksumPolicy>
48+
</snapshots>
49+
<name>Nexus Snapshots</name>
50+
<id>snapshots-repo</id>
51+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
52+
<layout>default</layout>
53+
</repository>
54+
</repositories>
55+
56+
<properties>
57+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
58+
<maven.compiler.source>1.6</maven.compiler.source>
59+
<maven.compiler.target>1.6</maven.compiler.target>
60+
</properties>
61+
62+
<dependencies>
63+
<!-- https://mvnrepository.com/artifact/commons-configuration/commons-configuration -->
64+
<dependency>
65+
<groupId>org.magicdb.magic</groupId>
66+
<artifactId>magiclib</artifactId>
67+
<version>0.0.1-SNAPSHOT</version>
68+
</dependency>
69+
</dependencies>
70+
71+
<build>
72+
<plugins>
73+
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
74+
<plugin>
75+
<artifactId>maven-clean-plugin</artifactId>
76+
<version>3.0.0</version>
77+
</plugin>
78+
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
79+
<plugin>
80+
<artifactId>maven-resources-plugin</artifactId>
81+
<version>3.0.2</version>
82+
</plugin>
83+
<plugin>
84+
<artifactId>maven-compiler-plugin</artifactId>
85+
<version>3.6.2</version>
86+
<configuration>
87+
<source>1.6</source>
88+
<target>1.6</target>
89+
</configuration>
90+
</plugin>
91+
<plugin>
92+
<artifactId>maven-surefire-plugin</artifactId>
93+
<version>2.22.1</version>
94+
</plugin>
95+
<plugin>
96+
<artifactId>maven-jar-plugin</artifactId>
97+
<version>2.6</version>
98+
<configuration>
99+
<archive>
100+
<addMavenDescriptor>false</addMavenDescriptor>
101+
<manifest>
102+
<addClasspath>true</addClasspath>
103+
<classpathLayoutType>custom</classpathLayoutType>
104+
<customClasspathLayout>../lib/${artifact.artifactId}${artifact.dashClassifier?}.${artifact.extension}</customClasspathLayout>
105+
<mainClass>org.magicdb.magic.application.Main</mainClass>
106+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
107+
</manifest>
108+
</archive>
109+
</configuration>
110+
</plugin>
111+
<plugin>
112+
<artifactId>maven-install-plugin</artifactId>
113+
<version>2.5.2</version>
114+
</plugin>
115+
<plugin>
116+
<artifactId>maven-deploy-plugin</artifactId>
117+
<version>2.8.2</version>
118+
</plugin>
119+
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
120+
<plugin>
121+
<artifactId>maven-site-plugin</artifactId>
122+
<version>3.5.1</version>
123+
</plugin>
124+
<plugin>
125+
<artifactId>maven-project-info-reports-plugin</artifactId>
126+
<version>2.9</version>
127+
</plugin>
128+
<plugin>
129+
<groupId>org.apache.maven.plugins</groupId>
130+
<artifactId>maven-dependency-plugin</artifactId>
131+
<version>2.9</version>
132+
<executions>
133+
<execution>
134+
<id>copy-dependencies</id>
135+
<phase>package</phase>
136+
<goals>
137+
<goal>copy-dependencies</goal>
138+
</goals>
139+
<configuration>
140+
<outputDirectory>${project.build.directory}/lib</outputDirectory>
141+
<includeScope>compile</includeScope>
142+
<stripVersion>true</stripVersion>
143+
</configuration>
144+
</execution>
145+
</executions>
146+
</plugin>
147+
148+
<plugin>
149+
<groupId>org.apache.maven.plugins</groupId>
150+
<artifactId>maven-javadoc-plugin</artifactId>
151+
<version>2.9.1</version>
152+
<configuration>
153+
<!-- Output location of api documentation -->
154+
<outputDirectory>${project.build.directory}/apidocs</outputDirectory>
155+
</configuration>
156+
<executions>
157+
<execution>
158+
<id>make-assembly</id> <!-- this is used for inheritance merges -->
159+
<phase>package</phase> <!-- bind to the packaging phase -->
160+
<goals>
161+
<goal>javadoc</goal>
162+
</goals>
163+
</execution>
164+
</executions>
165+
</plugin>
166+
167+
168+
<plugin>
169+
<groupId>org.apache.maven.plugins</groupId>
170+
<artifactId>maven-source-plugin</artifactId>
171+
<version>3.0.1</version>
172+
<configuration>
173+
<classifier>src</classifier>
174+
</configuration>
175+
</plugin>
176+
177+
<plugin>
178+
<artifactId>maven-assembly-plugin</artifactId>
179+
<version>3.0.0</version>
180+
<configuration>
181+
<descriptors>
182+
<descriptor>src/assembly/src.xml</descriptor>
183+
<descriptor>src/assembly/bin.xml</descriptor>
184+
<descriptor>src/assembly/doc.xml</descriptor>
185+
</descriptors>
186+
</configuration>
187+
<executions>
188+
<execution>
189+
<id>make-assembly</id> <!-- this is used for inheritance merges -->
190+
<phase>package</phase> <!-- bind to the packaging phase -->
191+
<goals>
192+
<goal>single</goal>
193+
</goals>
194+
</execution>
195+
</executions>
196+
</plugin>
197+
198+
199+
<plugin>
200+
<groupId>org.apache.maven.plugins</groupId>
201+
<artifactId>maven-pdf-plugin</artifactId>
202+
<version>1.4</version>
203+
<executions>
204+
<execution>
205+
<id>pdf</id>
206+
<phase>site</phase>
207+
<goals>
208+
<goal>pdf</goal>
209+
</goals>
210+
<configuration>
211+
<outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
212+
<includeReports>false</includeReports>
213+
</configuration>
214+
</execution>
215+
</executions>
216+
</plugin>
217+
</plugins>
218+
</build>
219+
<reporting>
220+
<plugins>
221+
<plugin>
222+
<groupId>org.apache.maven.plugins</groupId>
223+
<artifactId>maven-javadoc-plugin</artifactId>
224+
<version>2.9.1</version>
225+
<configuration>
226+
</configuration>
227+
</plugin>
228+
</plugins>
229+
</reporting>
230+
231+
<name>MagicDB File identifier</name>
232+
<inceptionYear>2011</inceptionYear>
233+
<artifactId>fileid</artifactId>
234+
<description></description>
235+
236+
</project>
237+
238+
239+
240+

file/src/assembly/bin.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
4+
<id>bin</id>
5+
<formats>
6+
<format>zip</format>
7+
</formats>
8+
9+
<dependencySets>
10+
<dependencySet> <!-- include all JAR dependencies, with artifactName.jar format (no versions) -->
11+
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
12+
<unpack>false</unpack>
13+
<scope>runtime</scope>
14+
<outputDirectory>lib</outputDirectory>
15+
<includes>
16+
<include>*:*:jar:*</include>
17+
</includes>
18+
<useProjectArtifact>false</useProjectArtifact>
19+
</dependencySet>
20+
</dependencySets>
21+
<fileSets>
22+
<fileSet>
23+
<directory>${project.basedir}</directory>
24+
<outputDirectory></outputDirectory>
25+
<includes>
26+
<include>README*</include>
27+
<include>LICENSE*</include>
28+
<include>NOTICE*</include>
29+
</includes>
30+
</fileSet>
31+
</fileSets>
32+
<files>
33+
<file>
34+
<!-- Rename the main jar file without version information -->
35+
<source>${project.build.directory}/${artifact.artifactId}-${artifact.version}.jar</source>
36+
<outputDirectory>bin</outputDirectory>
37+
<destName>${artifact.artifactId}.jar</destName>
38+
</file>
39+
</files>
40+
</assembly>
41+

file/src/assembly/doc.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<assembly>
3+
<id>autodoc</id>
4+
<formats>
5+
<format>zip</format>
6+
</formats>
7+
<includeBaseDirectory>false</includeBaseDirectory>
8+
<fileSets>
9+
<fileSet>
10+
<directory>${project.build.directory}/site/apidocs</directory>
11+
<outputDirectory>/</outputDirectory>
12+
</fileSet>
13+
</fileSets>
14+
</assembly>

file/src/assembly/src.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
4+
<id>src</id>
5+
<formats>
6+
<format>zip</format>
7+
</formats>
8+
<fileSets>
9+
<fileSet>
10+
<directory>${project.basedir}</directory>
11+
<includes>
12+
<include>README*</include>
13+
<include>LICENSE*</include>
14+
<include>NOTICE*</include>
15+
<include>pom.xml</include>
16+
</includes>
17+
<useDefaultExcludes>true</useDefaultExcludes>
18+
</fileSet>
19+
<fileSet>
20+
<directory>${project.basedir}/src</directory>
21+
<useDefaultExcludes>true</useDefaultExcludes>
22+
<outputDirectory>src</outputDirectory>
23+
</fileSet>
24+
</fileSets>
25+
</assembly>

0 commit comments

Comments
 (0)