GithubHelp home page GithubHelp logo

classicvalues / maven-build-scanner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intuit/maven-build-scanner

1.0 1.0 0.0 503 KB

Know your build - so you can make it faster

License: Apache License 2.0

JavaScript 11.24% HTML 33.32% Shell 1.94% Java 53.18% Dockerfile 0.32%

maven-build-scanner's Introduction

CircleCI

Maven Build Scanner

Know your build - so you can make it faster

What Is Maven Build Scanner?

Maven Build Scanner is a tool that hooks into Maven builds and produces reports and charts that breakdown the time Maven spent. These reports provide insights into your builds that can be used to tune it.

It's been designed to work with large and complex builds; ones with hundreds of modules and plugins.

At Intuit it helped take a 40m build run by hundreds of developers every day and reduce it to 4m - a 10x reduction.

Video

Inspired by Gradle Build Scan.

How Do I Use It?

Start by install the following:

  • Java 8
  • Maven 3
  • Docker
  • Node + NPM

Run:

./setup.sh

This will:

  1. Start up a Mongo database on Docker for storing data.
  2. Create a JAR for the extension and copies it into your local Maven extensions folder (on MacOS this is something like /usr/local/Cellar/maven/3.5.4/libexec/lib/ext)
  3. Build and start the NPM web application for viewing your reports (listening on port 3000).
  4. Run a quick build scan on itself so you can try out the report.

You can then view your first scan at (http://localhost:3000). The page will show:

  • A timeline of the build, so you can see how effective concurrency is being used.
  • A pie chart showing the Maven plugins that took the longest.
  • A module-by-module breakdown of tasks.
  • Links to reports on previous builds.

To create a scan for another application, do the following:

cd your-app
env MAVEN_BUILD_SCANNER=1 mvn install

You should see the following line in the Maven console output:

Open http://localhost:3000/?projectId=com.intuit:maven-build-scanner&sessionId=60acc519-ff2a-4c06-b79a-2aa23c47c861 to view your Maven build scanner results to view your Maven build scanner results

Alternative install via docker-compose and maven

  1. Checkout the project from github
  2. Run docker-compose up -d to build the server and run mongo db and the server
  3. Run mvn install to build and install the maven plugin locally
  4. Configure the maven plugin using Maven CoreExtensions by adding add the following content to .mvn/extensions.xml:
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
  <extension>
    <groupId>com.intuit</groupId>
    <artifactId>maven-build-scanner</artifactId>
    <version>1.0.0-SNAPSHOT</version>
  </extension>
</extensions>

Goto your project and run a maven build with profiling:

To create a scan for another application, do the following:

env MAVEN_BUILD_SCANNER=1 mvn install

License

Maven Build Scanner is released under the Apache 2.0 licenses. It uses junit which is licensed under EPL 1.0.

maven-build-scanner's People

Contributors

alexec avatar dependabot[bot] avatar edumco avatar stefanpenndorf avatar vivekmore avatar baerrach avatar asemy avatar ibethencourt avatar

Stargazers

Classic Values avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.