Socket
Socket
Sign inDemoInstall

maven-webpack-plugin

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    maven-webpack-plugin

Webpack plugin that calls maven


Version published
Weekly downloads
0
Maintainers
1
Install size
26.0 kB
Created
Weekly downloads
 

Readme

Source

maven-webpack-plugin

A webpack plugin that calls mvn (Java build tool).

Requirements

  • webpack >= 4

Installation

For npm:

npm install --save-dev maven-webpack-plugin

For yarn;

yarn add -D maven-webpack-plugin

Usage

Load the plugin in your webpack config:

const MavenWebpackPlugin = require('maven-webpack-plugin')

module.exports = {
  plugins: [
    new MavenWebpackPlugin()
  ]
}

The plugin replaces [maven-project-version] with the ${project.version} from pom.xml.

Example:

module.exports = {
  output: {
    publicPath: 'http://example.com/[maven-project-version]/',
    filename: '[name]-[maven-project-version].js'
  }
}

Plugin API

The ${project.version} is exposed via public API.

Example using the DefinePlugin:

const webpack = require('webpack')
const MavenWebpackPlugin = require('maven-webpack-plugin')
const mavenWebpackPlugin = new MavenWebpackPlugin()

module.exports = {
  plugins: [
    mavenWebpackPlugin,
    new webpack.DefinePlugin({
      'VERSION': JSON.stringify(mavenWebpackPlugin.projectVersion())
    })
  ]
}

License

Copyright (c) 2019 by Cornelius Buschka.

Apache License, Version 2.0

Keywords

FAQs

Last updated on 04 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc