Skip to content

Commit 016a944

Browse files
committed
Issue #11.
1 parent 66b35ba commit 016a944

File tree

6 files changed

+147
-0
lines changed

6 files changed

+147
-0
lines changed

npm/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib

npm/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
pom.xml

npm/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Jsonix Schema Compiler
2+
3+
Generates [Jsonix](https://github.com/highsource/jsonix) mappings for XML Schemas.
4+
5+
Please refer to [Wiki](https://github.com/highsource/jsonix-schema-compiler/wiki) for documentation.
6+
7+
This package provides the Jsonix Schema Compiler (under `lib/jsonix-schema-compiler-full.jar`).
8+
So you can invoke the schema compiler via [[command line|Command-Line Usage]] as follows:
9+
10+
```
11+
java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar schema.xsd
12+
```
13+
14+
# Usage
15+
16+
Typical usage is as follows:
17+
18+
* Make your package depend on `jsonix-schema-compiler`.
19+
* Invoke the Jsonix Schema Compiler in the `scripts/preinstall`
20+
21+
## Example
22+
23+
```javascript
24+
{
25+
"name": "mypackage",
26+
...
27+
"dependencies": {
28+
...
29+
"jsonix-schema-compiler": "~<VERSION>"
30+
...
31+
},
32+
...
33+
"scripts": {
34+
...
35+
"preinstall" : "java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar schema.xsd"
36+
...
37+
}
38+
...
39+
}
40+
```

npm/jsonix-schema-compiler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// No JavaScript here as the sole purpose of this package is to provide lib/jsonix-schema-compiler-full.jar

npm/package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name" : "jsonix-schema-compiler",
3+
"version" : "2.3.1",
4+
"description" : "Jsonix Schema Compiler generates Jsonix mappings from XML Schemas",
5+
"keywords" : [
6+
"json", "xml", "unmarshal", "unmarshalling", "marshal",
7+
"marshalling", "parse", "parsing", "serialize", "serializing",
8+
"javascript objects", "dom", "util", "utility", "jaxb",
9+
"jsonix", "jsonix-schema-compiler",
10+
"xs", "xsd", "xml schema", "wsdl", "dtd", "relax ng", "relaxng", "relax ng compact", "relaxng compact"
11+
],
12+
"homepage" : "https://github.com/highsource/jsonix-schema-compiler",
13+
"bugs" : {
14+
"url" : "http://github.com/highsource/jsonix-schema-compiler/issues"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "git://github.com/highsource/jsonix-schema-compiler.git"
19+
},
20+
"licenses" : [ {
21+
"type" : "BSD-3-Clause",
22+
"url" : "http://github.com/highsource/jsonix-schema-compiler/raw/master/LICENSE"
23+
} ],
24+
"author" : {
25+
"name" : "Alexey Valikov",
26+
"url" : "http://github.com/highsource"
27+
},
28+
"contributors" : [ {
29+
"name" : "Conrad Pankoff",
30+
"url" : "https://github.com/deoxxa"
31+
} ],
32+
"main" : "jsonix-schema-compiler.js",
33+
"repository" : {
34+
"type" : "git",
35+
"url" : "http://github.com/highsource/jsonix-schema-compiler.git"
36+
}
37+
}

npm/pom.xml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<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">
2+
<modelVersion>4.0.0</modelVersion>
3+
<artifactId>jsonix-schema-compiler-npm</artifactId>
4+
<packaging>pom</packaging>
5+
<name>Jsonix Schema Compiler NPM Package</name>
6+
<parent>
7+
<groupId>org.hisrc.jsonix</groupId>
8+
<artifactId>jsonix-schema-compiler-project</artifactId>
9+
<version>2.3.1-SNAPSHOT</version>
10+
</parent>
11+
<dependencies>
12+
<dependency>
13+
<groupId>${project.groupId}</groupId>
14+
<artifactId>jsonix-schema-compiler-full</artifactId>
15+
</dependency>
16+
</dependencies>
17+
<build>
18+
<plugins>
19+
<plugin>
20+
<groupId>org.apache.maven.plugins</groupId>
21+
<artifactId>maven-dependency-plugin</artifactId>
22+
<version>2.8</version>
23+
<executions>
24+
<execution>
25+
<id>unpack</id>
26+
<phase>generate-sources</phase>
27+
<goals>
28+
<goal>copy</goal>
29+
</goals>
30+
<configuration>
31+
<artifactItems>
32+
<artifactItem>
33+
<groupId>${project.groupId}</groupId>
34+
<artifactId>jsonix-schema-compiler-full</artifactId>
35+
<version>${jsonix-schema-compiler.version}</version>
36+
<overWrite>true</overWrite>
37+
<outputDirectory>${basedir}/lib</outputDirectory>
38+
<destFileName>jsonix-schema-compiler-full.jar</destFileName>
39+
</artifactItem>
40+
</artifactItems>
41+
</configuration>
42+
</execution>
43+
</executions>
44+
</plugin>
45+
<plugin>
46+
<groupId>org.codehaus.mojo</groupId>
47+
<artifactId>exec-maven-plugin</artifactId>
48+
<executions>
49+
<execution>
50+
<id>compile</id>
51+
<phase>compile</phase>
52+
<goals>
53+
<goal>exec</goal>
54+
</goals>
55+
<configuration>
56+
<executable>npm</executable>
57+
<arguments>
58+
<argument>install</argument>
59+
</arguments>
60+
</configuration>
61+
</execution>
62+
</executions>
63+
</plugin>
64+
</plugins>
65+
</build>
66+
</project>

0 commit comments

Comments
 (0)