Skip to content

Commit

Permalink
Merge pull request #5 from umjammer/1.1.1
Browse files Browse the repository at this point in the history
1.1.1
  • Loading branch information
umjammer authored Mar 29, 2023
2 parents 6af999b + 4886727 commit 26ef8e2
Show file tree
Hide file tree
Showing 12 changed files with 164 additions and 147 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +45,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +59,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
23 changes: 16 additions & 7 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Checkout repository
uses: actions/checkout@v3

- name: Check w/o SNAPSHOT when "bump version"
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B package --file pom.xml
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[![Release](https://jitpack.io/v/umjammer/vavi-apps-xed.svg)](https://jitpack.io/#umjammer/vavi-apps-xed)
[![Java CI](https://github.com/umjammer/vavi-apps-xed/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-apps-xed/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-apps-xed/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/vavi-apps-xed/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-8-b07219)

# XED XML EDitor

a command line xml editor.

## Goal

* sort by tag
Expand Down
88 changes: 0 additions & 88 deletions build.xml

This file was deleted.

110 changes: 102 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,109 @@

<groupId>vavi</groupId>
<artifactId>vavi-apps-xed</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>

<name>Xml EDitor Application</name>
<name>XED Xml EDitor</name>
<organization>
<name>vavi inc.</name>
<name>vavi</name>
</organization>
<url>https://github.com/umjammer/vavi-apps-xed</url>
<description></description>
<description>a command line xml editor</description>

<profiles>
<profile>
<!-- mvn -P run antrun:run -Darchive='archive' -->
<id>run</id>
<build>
<plugins>
<plugin>
<!-- GOOD: fork: OK, test jars: OK, user args, default args: OK -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<java classname="vavi.apps.xed.App" fork="yes" output="${run.out}">
<classpath>
<path refid="project.class.path" />
</classpath>
<arg value="-s" />
<arg value="/kml/Folder/Placemark" />
<arg value="/kml/Folder/Placemark/updated/text()" />
<arg value="asc" />
<arg value="datetime" />
<arg value="EEE, d MMM yy HH:mm:ss Z" />
<arg value="-e" />
<arg value="/kml/Folder/Placemark" />
<arg value="/kml/Folder/Placemark/description" />
<arg value="xpath_sdf('/kml/Folder/Placemark/updated/text()', 'EEE, d MMM yy HH:mm:ss Z', 'yyyy/MM/dd HH:mm:ss') + ' | $$$$'" />
<arg value="${run.in}" />
</java>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<!-- mvn -P split antrun:run -Darchive='archive' -->
<id>split</id>
<build>
<plugins>
<plugin>
<!-- GOOD: fork: OK, test jars: OK, user args, default args: OK -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<java classname="vavi.apps.xed.App" fork="yes" output="${split.out}">
<classpath>
<path refid="project.class.path" />
</classpath>
<arg value="-S" />
<arg value="${split.xpath}" />
<arg value="${split.size}" />
<arg value="${split.in}" />
</java>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<argLine>
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
</argLine>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
</plugins>
</build>

Expand All @@ -37,11 +121,23 @@
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.7.0-3</version>
<version>11.5</version>
</dependency>
<dependency>
<groupId>com.github.umjammer</groupId>
Expand All @@ -51,19 +147,17 @@
<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
<version>1.0.8</version>
<version>1.1.9</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/vavi/apps/xed/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface Command {
void exec(Document document);

/** TODO */
static XPath xPath = XPathFactory.newInstance().newXPath();
XPath xPath = XPathFactory.newInstance().newXPath();
}

/* */
Loading

0 comments on commit 26ef8e2

Please sign in to comment.