-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66b35ba
commit 016a944
Showing
6 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Jsonix Schema Compiler | ||
|
||
Generates [Jsonix](https://github.com/highsource/jsonix) mappings for XML Schemas. | ||
|
||
Please refer to [Wiki](https://github.com/highsource/jsonix-schema-compiler/wiki) for documentation. | ||
|
||
This package provides the Jsonix Schema Compiler (under `lib/jsonix-schema-compiler-full.jar`). | ||
So you can invoke the schema compiler via [[command line|Command-Line Usage]] as follows: | ||
|
||
``` | ||
java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar schema.xsd | ||
``` | ||
|
||
# Usage | ||
|
||
Typical usage is as follows: | ||
|
||
* Make your package depend on `jsonix-schema-compiler`. | ||
* Invoke the Jsonix Schema Compiler in the `scripts/preinstall` | ||
|
||
## Example | ||
|
||
```javascript | ||
{ | ||
"name": "mypackage", | ||
... | ||
"dependencies": { | ||
... | ||
"jsonix-schema-compiler": "~<VERSION>" | ||
... | ||
}, | ||
... | ||
"scripts": { | ||
... | ||
"preinstall" : "java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar schema.xsd" | ||
... | ||
} | ||
... | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// No JavaScript here as the sole purpose of this package is to provide lib/jsonix-schema-compiler-full.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name" : "jsonix-schema-compiler", | ||
"version" : "2.3.1", | ||
"description" : "Jsonix Schema Compiler generates Jsonix mappings from XML Schemas", | ||
"keywords" : [ | ||
"json", "xml", "unmarshal", "unmarshalling", "marshal", | ||
"marshalling", "parse", "parsing", "serialize", "serializing", | ||
"javascript objects", "dom", "util", "utility", "jaxb", | ||
"jsonix", "jsonix-schema-compiler", | ||
"xs", "xsd", "xml schema", "wsdl", "dtd", "relax ng", "relaxng", "relax ng compact", "relaxng compact" | ||
], | ||
"homepage" : "https://github.com/highsource/jsonix-schema-compiler", | ||
"bugs" : { | ||
"url" : "http://github.com/highsource/jsonix-schema-compiler/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/highsource/jsonix-schema-compiler.git" | ||
}, | ||
"licenses" : [ { | ||
"type" : "BSD-3-Clause", | ||
"url" : "http://github.com/highsource/jsonix-schema-compiler/raw/master/LICENSE" | ||
} ], | ||
"author" : { | ||
"name" : "Alexey Valikov", | ||
"url" : "http://github.com/highsource" | ||
}, | ||
"contributors" : [ { | ||
"name" : "Conrad Pankoff", | ||
"url" : "https://github.com/deoxxa" | ||
} ], | ||
"main" : "jsonix-schema-compiler.js", | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "http://github.com/highsource/jsonix-schema-compiler.git" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>jsonix-schema-compiler-npm</artifactId> | ||
<packaging>pom</packaging> | ||
<name>Jsonix Schema Compiler NPM Package</name> | ||
<parent> | ||
<groupId>org.hisrc.jsonix</groupId> | ||
<artifactId>jsonix-schema-compiler-project</artifactId> | ||
<version>2.3.1-SNAPSHOT</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jsonix-schema-compiler-full</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<version>2.8</version> | ||
<executions> | ||
<execution> | ||
<id>unpack</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>copy</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>jsonix-schema-compiler-full</artifactId> | ||
<version>${jsonix-schema-compiler.version}</version> | ||
<overWrite>true</overWrite> | ||
<outputDirectory>${basedir}/lib</outputDirectory> | ||
<destFileName>jsonix-schema-compiler-full.jar</destFileName> | ||
</artifactItem> | ||
</artifactItems> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>compile</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>npm</executable> | ||
<arguments> | ||
<argument>install</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |