package-json-maven-plugin

This mojo reads a package.json file and stores the name and version fields as properties in the maven build process.

License

License

BSD
Categories

Categories

Maven Build Tools JSON Data
GroupId

GroupId

de.matrixweb
ArtifactId

ArtifactId

package-json-maven-plugin
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

package-json-maven-plugin
This mojo reads a package.json file and stores the name and version fields as properties in the maven build process.
Project URL

Project URL

https://github.com/KnisterPeter/package-json-maven-plugin
Source Code Management

Source Code Management

https://github.com/KnisterPeter/package-json-maven-plugin

Download package-json-maven-plugin

How to add to project

<plugin>
    <groupId>de.matrixweb</groupId>
    <artifactId>package-json-maven-plugin</artifactId>
    <version>0.0.2</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.1.0
org.sonatype.plexus : plexus-build-api jar 0.0.7
org.codehaus.jackson : jackson-mapper-asl jar 1.9.13

provided (2)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.1.0
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

Project Modules

There are no modules declared in this project.

package-json-maven-plugin

This mojo reads a package.json file and stores the name and version fields as properties in the maven build process. This could be useful e.g. to name build artifacts with package.json name and version.

Configuration

<build>
  <plugins>
    <plugin>
      <groupId>de.matrixweb</groupId>
      <artifactId>package-json-maven-plugin</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <executions>
        <execution>
          <goals>
            <goal>package-json</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

After executing this goal the properties package.json.name and package.json.version are defined.

Usage

For example name the main build artifacts of a maven build with this properties:

<build>
  <finalName>${package.json.name}-${package.json.version}</finalName>
</build>

Versions

Version
0.0.2
0.0.1