Skip to content

Commit cec4e44

Browse files
committed
Made package.json generateable.
1 parent c122ebc commit cec4e44

File tree

6 files changed

+90
-7
lines changed

6 files changed

+90
-7
lines changed

npm/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
lib
1+
lib
2+
target

npm/.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
/src
12
/node_modules
2-
pom.xml
3+
/target
4+
pom.xml

npm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.ja
1616
Typical usage is as follows:
1717

1818
* Make your package depend on `jsonix-schema-compiler`.
19-
* Invoke the Jsonix Schema Compiler in the `scripts/preinstall`
19+
* Invoke the Jsonix Schema Compiler in the `scripts/postinstall`
2020

2121
## Example
2222

@@ -32,7 +32,7 @@ Typical usage is as follows:
3232
...
3333
"scripts": {
3434
...
35-
"preinstall" : "java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar schema.xsd"
35+
"postinstall" : "java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar schema.xsd"
3636
...
3737
}
3838
...

npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "jsonix-schema-compiler",
3-
"version" : "2.0.0",
3+
"version" : "2.3.1-SNAPSHOT",
44
"description" : "Jsonix Schema Compiler generates Jsonix mappings from XML Schemas",
55
"keywords" : [
66
"json", "xml", "unmarshal", "unmarshalling", "marshal",

npm/pom.xml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,40 @@
1515
</dependency>
1616
</dependencies>
1717
<build>
18+
<resources>
19+
<resource>
20+
<directory>${baseDir}</directory>
21+
<filtering>true</filtering>
22+
<includes>
23+
<include>project-package.json</include>
24+
</includes>
25+
<targetPath>${baseDir}</targetPath>
26+
</resource>
27+
</resources>
1828
<plugins>
1929
<plugin>
20-
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-resources-plugin</artifactId>
31+
<executions>
32+
<execution>
33+
<id>copy-package.json</id>
34+
<phase>initialize</phase>
35+
<goals>
36+
<goal>copy-resources</goal>
37+
</goals>
38+
<configuration>
39+
<outputDirectory>${basedir}</outputDirectory>
40+
<resources>
41+
<resource>
42+
<directory>src/main/npm</directory>
43+
<filtering>true</filtering>
44+
</resource>
45+
</resources>
46+
</configuration>
47+
</execution>
48+
</executions>
49+
</plugin>
50+
<plugin>
2151
<artifactId>maven-dependency-plugin</artifactId>
22-
<version>2.8</version>
2352
<executions>
2453
<execution>
2554
<id>unpack</id>
@@ -59,6 +88,20 @@
5988
</arguments>
6089
</configuration>
6190
</execution>
91+
<execution>
92+
<id>publish</id>
93+
<phase>deploy</phase>
94+
<goals>
95+
<goal>exec</goal>
96+
</goals>
97+
<configuration>
98+
<executable>npm</executable>
99+
<arguments>
100+
<argument>publish</argument>
101+
<argument>.</argument>
102+
</arguments>
103+
</configuration>
104+
</execution>
62105
</executions>
63106
</plugin>
64107
</plugins>

npm/src/main/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" : "${project.version}",
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+
}

0 commit comments

Comments
 (0)