Giter Site home page Giter Site logo

mvn2bzl's People

Contributors

nfisher avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

nuritkarni1

mvn2bzl's Issues

Walk workspace directory sub-tree

Given a workspace path
When navigation is initiated
Then all valid paths should be traversed
And they should be emitted.

Tasks

  • walk directory.
  • ignore list of prefixes.
  • emit file names onto queue.

Ignore

  • bazel-* in pom search.
  • dot file paths.
  • target directories.

Infer package node from path

Given a java file exists in a sub-module 
When it's filename is emitted from the walker
Then it should add a unique package node to the workspace graph based on its path.

Tasks

  • subscribe to directory walker queue for *.java files.
  • infer the package based on maven standard directory structure.
  • add package node with required fields to the workspace graph.

Add all Files to workspace graph

Given a file exists
When it is emitted
Then it should be stored in the workspace graph.
  • subscribe to directory walker queue for all files.
  • add file node into file trie for indexed look-up.
  • add file node with required fields to the workspace graph.

Required Fields

  • path.
  • mimetype.

WORKSPACE and BUILD templates

Given a target workspace
When the BUILD and WORKSPACE files are generated
Then they should be rendered from a resource template.

Tasks

  • repositories.bzl template and view model.
  • WORKSPACE template and view model.
  • BUILD template and view model.

Create module nodes

Given the `metrics/pom.xml`:
  | groupId    | com.instana    |
  | artifactId | metrics        |
  | version    | 1.0.0-SNAPSHOT |  
When it is processed
Then a module node should be added to the workspace graph.

Tasks

  • subscribe to directory walker queue for pom.xml files.
  • read pom.xml files using the model reader.
  • add module node with required fields to the workspace graph.

Required Fields

  • path - path to the related pom.xml file..
  • groupId - maven group ID for this module.
  • artifactId - maven artifact ID for this module.
  • version - maven version for this module.

Create class and package nodes from source

Given a java file exists in a sub-module 
When it's filename is emitted from the walker
Then it should add a unique package node to the workspace graph
And it should add the parsed class nodes.

Tasks

  • subscribe to directory walker queue for *.java files.
  • parse source and extract relevant class and package names.
  • add package node with required fields to the workspace graph.

References

Resolve dependencies for module

Given a module's maven coordinate
When I resolve its dependencies
Then I should receive a list of all direct and transitive dependencies for the module.

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.