rocambille / barista

Barista is a CLI that can assist you while you build your Java application
MIT License
7 stars 15 forks source link

generate package in templates from pom.xml #3

Open rocambille opened 5 years ago

rocambille commented 5 years ago

read groupId and artifactId from pom.xml (it is assumed that Barista is used at root of a maven project), and use the information to generate package line in templates -- see src/main/resources/templates/barista.

the package declaration in a template should be package groupId.artifactId;.

a subpackage should be used for subdirectories. eg an entity should be generated in src/main/java/groupId/artifactId/entities, and should have a package declaration package groupId.artifactId.entities;.

Ruchika8 commented 5 years ago

I would like to be assigned this issue please

bhegmanns commented 5 years ago

If you want to use "barista" in maven projects, it would be a good idea creating a maven-plugin instead of that simple project. The benefit is, that your are able to proceed(and configure) it inside the pom and integrate the execution inside the maven lifecycle.

rocambille commented 5 years ago

If you want to use "barista" in maven projects, it would be a good idea creating a maven-plugin instead of that simple project. The benefit is, that your are able to proceed(and configure) it inside the pom and integrate the execution inside the maven lifecycle.

thx @bhegmanns for the feedback. the maven-plugin is a great idea, I will investigate it :)

bhegmanns commented 5 years ago

I can do it (I think in a short way). Create a new branch vor mavenized project and I'll make a PR.

rocambille commented 5 years ago

@bhegmanns here it is: https://github.com/wasthishelpful/barista/tree/maven-plugin