Added pom file and fixed dependencies

This commit is contained in:
blackwiz4rd 2021-03-03 17:44:47 +01:00
parent 83a98adaee
commit e86ad45a63
16 changed files with 131 additions and 108 deletions

View File

@ -6,6 +6,23 @@ This tool is based on [RISE V2G shared library](https://github.com/V2GClarity/RI
A release is available with a compiled Java Runtime binary there: https://github.com/FlUxIuS/V2Gdecoder/releases
## How to compile
Install maven
Build risev2g (or use utilities/rise-v2g-shared-1.2.6.jar):
`git clone https://github.com/V2GClarity/RISE-V2G/`
`cd RISE-V2G/RISE-V2G-PARENT`
`mvn install`
Now install the RISE-V2G-Shared in our project:
`mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=utilities/rise-v2g-shared-1.2.6.jar`
To compile
`mvn package`
Fix risev2g inclusion:
-com.v2gclarity.risev2g.shared.enumerations
-com.v2gclarity.risev2g.shared.messageHandling
-com.v2gclarity.risev2g.shared.utils
## How to use
V2Gdecoder supports many methods to encode XML/decode EXI data as follows:

85
pom.xml Normal file
View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.fluxlus.V2Gdecoder</groupId>
<artifactId>V2Gdecoder</artifactId>
<version>1.0-SNAPSHOT</version>
<name>V2Gdecoder</name>
<url>https://github.com/FlUxIuS/V2Gdecoder</url>
<packaging>jar</packaging> <!-- new -->
<description>V2Gdecoder description. </description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.siemens.ct.exi/exificient -->
<dependency>
<groupId>com.siemens.ct.exi</groupId>
<artifactId>exificient</artifactId>
<version>1.0.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<build>
<finalName>V2Gdecoder</finalName> <!-- added now-->
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- https://mvnrepository.com/artifact/com.siemens.ct.exi/exificient-core -->
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -1,6 +0,0 @@
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: fluxius
Created-By: Apache Maven 3.5.0
Build-Jdk: 1.8.0_191

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.v2gclarity.risev2g_rise-v2g-shared</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -1,5 +0,0 @@
#Generated by Maven
#Thu Jan 24 11:57:05 CET 2019
version=1.1.4-SNAPSHOT
groupId=com.v2gclarity.risev2g
artifactId=rise-v2g-shared

View File

@ -1,59 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>com.v2gclarity.risev2g</groupId>
<artifactId>rise-v2g-parent</artifactId>
<version>1.1.4-SNAPSHOT</version>
<relativePath>../RISE-V2G-PARENT</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>rise-v2g-shared</artifactId>
<name>rise-v2g-shared</name>
<repositories>
<!-- OpenEXI jars deployed in the /repo folder of RISE-V2G-Shared.
See https://devcenter.heroku.com/articles/local-maven-dependencies for how to deploy .jars locally which are not
published in a public Maven repo. -->
<repository>
<id>project.local</id>
<name>project</name>
<url>file:${project.basedir}/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.siemens.ct.exi</groupId>
<artifactId>exificient</artifactId>
<version>0.9.6</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>net.sourceforge.openexi</groupId>
<artifactId>nagasena</artifactId>
<version>0000.0002.0052.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.openexi</groupId>
<artifactId>nagasena-rta</artifactId>
<version>0000.0002.0052.0</version>
</dependency>
</dependencies>
</project>

View File

@ -1,9 +1,11 @@
import server.MultiThreadedServer;
package com.fluxlus.V2Gdecoder;
import com.fluxlus.V2Gdecoder.server.MultiThreadedServer;
import java.io.IOException;
import org.apache.commons.cli.*;
import org.xml.sax.SAXException;
import com.siemens.ct.exi.exceptions.EXIException;
import dataprocess.*;
import com.siemens.ct.exi.core.exceptions.EXIException;
import com.fluxlus.V2Gdecoder.dataprocess.*;
/*
* Copyright (C) V2Gdecoder by FlUxIuS (Sebastien Dudek)

View File

@ -1,4 +1,4 @@
package binascii;
package com.fluxlus.V2Gdecoder.binascii;
/*
* code from: https://github.com/EverythingMe/inbloom/blob/master/java/src/main/java/me/everything/inbloom/BinAscii.java

View File

@ -1,4 +1,4 @@
package dataprocess;
package com.fluxlus.V2Gdecoder.dataprocess;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@ -17,22 +17,22 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamResult;
import org.eclipse.risev2g.shared.enumerations.GlobalValues;
import org.eclipse.risev2g.shared.messageHandling.MessageHandler;
import org.eclipse.risev2g.shared.utils.MiscUtils;
import com.v2gclarity.risev2g.shared.enumerations.GlobalValues;
import com.v2gclarity.risev2g.shared.messageHandling.MessageHandler;
import com.v2gclarity.risev2g.shared.utils.MiscUtils;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import com.siemens.ct.exi.EXIFactory;
import com.siemens.ct.exi.GrammarFactory;
import com.siemens.ct.exi.api.sax.EXIResult;
import com.siemens.ct.exi.api.sax.EXISource;
import com.siemens.ct.exi.exceptions.EXIException;
import com.siemens.ct.exi.helpers.DefaultEXIFactory;
import com.siemens.ct.exi.core.EXIFactory;
import com.siemens.ct.exi.grammars.GrammarFactory;
import com.siemens.ct.exi.main.api.sax.EXIResult;
import com.siemens.ct.exi.main.api.sax.EXISource;
import com.siemens.ct.exi.core.exceptions.EXIException;
import com.siemens.ct.exi.core.helpers.DefaultEXIFactory;
import binascii.BinAscii;
import com.fluxlus.V2Gdecoder.binascii.BinAscii;
/*
* Copyright (C) V2Gdecoder by FlUxIuS (Sebastien Dudek)

View File

@ -1,4 +1,4 @@
package dataprocess;
package com.fluxlus.V2Gdecoder.dataprocess;
/*
* Copyright (C) V2Gdecoder by FlUxIuS (Sebastien Dudek)

View File

@ -1,4 +1,4 @@
package server;
package com.fluxlus.V2Gdecoder.server;
import java.net.ServerSocket;

View File

@ -1,4 +1,4 @@
package server;
package com.fluxlus.V2Gdecoder.server;
import java.io.InputStream;
import java.io.InputStreamReader;
@ -11,10 +11,10 @@ import java.util.Map;
import org.xml.sax.SAXException;
import com.siemens.ct.exi.exceptions.EXIException;
import com.siemens.ct.exi.core.exceptions.EXIException;
import dataprocess.dataprocess;
import dataprocess.decodeMode;
import com.fluxlus.V2Gdecoder.dataprocess.dataprocess;
import com.fluxlus.V2Gdecoder.dataprocess.decodeMode;
public class WorkerRunnable implements Runnable{

View File

@ -0,0 +1,6 @@
/home/luca/Desktop/V2GdecoderRepo/src/main/java/com/fluxlus/V2Gdecoder/V2Gdecoder.java
/home/luca/Desktop/V2GdecoderRepo/src/main/java/com/fluxlus/V2Gdecoder/binascii/BinAscii.java
/home/luca/Desktop/V2GdecoderRepo/src/main/java/com/fluxlus/V2Gdecoder/dataprocess/dataprocess.java
/home/luca/Desktop/V2GdecoderRepo/src/main/java/com/fluxlus/V2Gdecoder/server/WorkerRunnable.java
/home/luca/Desktop/V2GdecoderRepo/src/main/java/com/fluxlus/V2Gdecoder/dataprocess/decodeMode.java
/home/luca/Desktop/V2GdecoderRepo/src/main/java/com/fluxlus/V2Gdecoder/server/MultiThreadedServer.java

Binary file not shown.