java - Where to put maven generated webapp artifacts? -
i'm using swagger maven plugin generate swagger.json file. want available static resource in webapp (src/main/webapp).
in example on github page configure this.
<swaggerdirectory>generated/swagger-ui</swaggerdirectory>
i can't see how useful it's not in webapp folder. guess you'd have manually copy somewhere useful what's point in maven if it's not automated.
i've configured in project.
<swaggerdirectory>${basedir}/src/main/webapp/swagger</swaggerdirectory>
this allows me access file both during development (as eclipse project) , when deployed (as built war file).
the question whether it's ok pop generated artifacts in usual src/main folder?
i have generated code jaxb goes generated-sources folder in target folder. added source folder in eclipse , maven knows add these classes build.
i want check haven't comitted maven faux pas dumping generated code in src/main/webapp. know i'll have gitignore file.
you place generated files in directory such target/generated-webapp
. use resource plugin copy other files src/main/webbpp
target/generated-webapp
. , point war plugin target/generated-webapp
it's warsourcedirectory
Comments
Post a Comment