GithubHelp home page GithubHelp logo

javaflow-maven-plugin's People

Contributors

havardh avatar misino avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

javaflow-maven-plugin's Issues

non-existing package should give a better exception

When using the wrong package name, the error produced looked like this:

[ERROR] Failed to execute goal com.github.havardh:javaflow-maven-plugin:1.0.0:build (default-cli) on project cap: Could not generate types: Parameter 'directory' is not a directory -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

This turned out to be because the package defined in packageName was incorrect, thus generating an invalid baseSourceDirectory in

String baseSourceDirectory = sourceDirectory + "/" + api.getPackageName().replace('.', '/');

Contents of the paramter 'directory' could be useful information

Allow multiple input directories

Let's say we have the following (Maven) project structure:

common
  src/main/java/com/example/common/Address.java
domain
  src/main/java/com/example/domain/User.java
ui
  src/some-page.js

and we want to generate types for the ui module.

Currently, there is no way to specify the two input directories common and domain (along with packages com.example.common and com.example.domain) as input directories.

It's possible to give multiple <api> sections in the config of this plugin, but then the generation of domain will fail because type User has an unknown type Address

Add a integration test and execute it on circleci

Add a simple sample project to verify that the plugin is working on circleci.

  1. Create a subfolder called sample
  2. Implement a small project with a model and pom.xml depending on the latest snapshot of the maven plugin
  3. Build and install javaflow and javaflow-maven-pluginfrom source on the circleci env
  4. Run mvn javaflow:build and verify successful exit code.

Create target directory if missing

Hello,

While using the plugin, we ran into an issue where the target directory (custom one, not the default /target) was not existing so we got an NoSuchFileException. Creating the folder manually fixed this and we do not have this issue anymore.

However, I was thinking, what if there is an option which will tell the plugin to create the target folder (if missing)? Something like createIfMissing, or feel free to propose a better name.
What do you think about it?

I could submit a PR for that if that's fine with you.

Regards,
Goce

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.