Skip to content

Commit

Permalink
#1
Browse files Browse the repository at this point in the history
  • Loading branch information
donmendelson committed Feb 19, 2021
1 parent 7f10375 commit 402f789
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 112 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ The XmlDiff utility compares two XML files and generates a third file that repre
To run the difference utility, run this command line:

```
java io.fixprotocol.xml.XmlDiff <in-file1> <in-file2> [output-file]
java -jar diff-merge-1.5.1-SNAPSHOT-jar-with-dependencies.jar <arguments>
Usage: XmlDiff <xml-file1> <xml-file2> [diff-file] [-e event-file] [-u|-o]
diff-file defaults to console -u=unordered elements -o=ordered elements
```
If the output file is not provided, then results go to the console.

Expand Down
128 changes: 18 additions & 110 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,127 +112,35 @@
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>verify</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}</directory>
<includes>
<include>*.jar</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>io.fixprotocol.xml.XmlDiff</mainClass>
</manifest>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>verify</phase>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
<includeGroupIds>org.apache.logging.log4j</includeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>image</id>
<build>
<plugins>
<!-- Create an image using jlink -->
<!-- Works with fork donmendelson/moditect to support multiple entry points -->
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<executions>
<execution>
<id>add-module-infos</id>
<phase>generate-resources</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
<overwriteExistingFiles>true</overwriteExistingFiles>
<ignoreSigningInformation>true</ignoreSigningInformation>
<modules>
<module>
<artifact>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>${saxon.version}</version>
</artifact>
<moduleInfoSource>
module Saxon.HE {

}
</moduleInfoSource>
</module>
</modules>
</configuration>
</execution>
<execution>
<!-- due to an apparent plugin bug, must run after clean -->
<!-- for unknown reason, this step does not work in Eclipse -->
<id>create-runtime-image</id>
<phase>install</phase>
<goals>
<goal>create-runtime-image</goal>
</goals>
<configuration>
<modulePath>
<path>${project.build.directory}/modules</path>
</modulePath>
<modules>
<module>diff.merge</module>
<module>Saxon.HE</module>
</modules>
<outputDirectory>
${project.build.directory}/jlink-image
</outputDirectory>
<launchers>
<launcher>
<name>xmldiff</name>
<module>diff.merge</module>
<mainClass>io.fixprotocol.xml.XmlDiff</mainClass>
</launcher>
<launcher>
<name>xmlmerge</name>
<module>diff.merge</module>
<mainClass>io.fixprotocol.xml.XmlMerge</mainClass>
</launcher>
</launchers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/fixprotocol/xml/XmlMerge.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class XmlMerge {
* Merges a baseline XML file with a differences file to produce a second XML file
*
* @param args three file names: baseline XML file, diff file, name of second XML to produce
* Optionally, argument '-e <event-filename>' can direct errors to a JSON file for UI rendering.
* Optionally, argument '-e <event-filename>' can direct errors to a JSON file suitable for UI rendering.
*
*/
public static void main(String[] args) {
Expand Down

0 comments on commit 402f789

Please sign in to comment.