lazybones-aem-templates icon indicating copy to clipboard operation
lazybones-aem-templates copied to clipboard

AEM Simple Multimodule Lazy Bones Template

Open schoudry opened this issue 7 years ago • 8 comments

A skimmed version of the template aem-multimodule-project, this template aem-simple-multimodule-project accepts 6 parameters

groupId - com.myco.group artifactId - myco-project projectName - My AEM Project appsFolderName - my-aem-project packageGroup - my-packages aemVersion - 6.3

eg. the following command creates a project module in no-interactive mode (silent creation)

lazybones create aem-simple-multimodule-project 0.0.1-SNAPSHOT . ^
             -PgroupId=apps.experienceaem.assets ^
             -PartifactId=eaem-assets-list-view-columns ^
             -PprojectName="EAEM Assets List View Columns"  ^
             -PappsFolderName="eaem-assets-list-view-columns"  ^
             -PpackageGroup="Experience AEM"  ^
             -PaemVersion="6.3" 

Running the above command, creates

        bundle\src\main\java\apps\experienceaem\assets
               package-info.java
               HelloService.java               
               HelloServlet.java
               impl
                    HelloServiceImpl.java

        content\src\main\content\jcr_root\apps\eaem-assets-list-view-columns\clientlib
               .content.xml
               css.txt
               js.txt
               readme.txt

        content\src\main\content\jcr_root\apps\eaem-assets-list-view-columns\install
               .vltignore

to ease creation of authoring extensions (so the clientlib) assumption is user will delete the not-required ones (clientlib/servlet/service) instead of providing parameters to create command

@justinedelson @davidjgonzalez

schoudry avatar Jun 29 '17 22:06 schoudry

@schoudry I've done some further cleanup on this to remove the sample code -- since the normal template contains no sample code, it stands to reason that a "simple" template also shouldn't create sample code. I also removed the client library largely since the presence of this seemed confusing. The generated readme said "This client library should be used to store your site's JavaScript and CSS." but it doesn't have the allowproxy property and depends upon authoring libs, so it clearly isn't for the "site" JS/CSS.

justinedelson avatar Oct 03 '17 13:10 justinedelson

@justinedelson so it just creates folders? i think it has become rather too simple

schoudry avatar Oct 03 '17 14:10 schoudry

well, it creates the pom files and the folders. IMO, anything more would require prompts, so I'm not sure how to balance the desire for minimal prompts with anything more complex.

justinedelson avatar Oct 03 '17 14:10 justinedelson

@justinedelson personal experience, any project with multiple core modules have minimum services and servlets and generally we go to existing implementation or acs samples for examples; the idea was to provide sample code within the created project (and delete the rest)

schoudry avatar Oct 03 '17 15:10 schoudry

@schoudry there's a few problems with sample code, mostly that it stays around (I don't know how many projects I've seen in production with the filter from the old archetype still deployed). but ultimately, I'm fine with generating sample code as long as it is optional. but that conflicts with the goal of minimizing options.

Also, if the goal of this template is to support multiple bundles, then it should put the core bundle in a bundles directory so as to allow an easy glidepath. The existing template does that, but behind a prompt.

justinedelson avatar Oct 03 '17 15:10 justinedelson

@justinedelson ok so lets leave this one as simple and if necessary create another template providing sample code?

schoudry avatar Oct 03 '17 15:10 schoudry

well, why not put the sample code behind one prompt? it is only one additional prompt. alternatively, you could skip the prompt and only allow the inclusion of sample code if it was specified on the command-line. That would be net equivalent to a separate template.

justinedelson avatar Oct 03 '17 15:10 justinedelson

ok sound good, default is no inclusion of sample code... let me work on it

schoudry avatar Oct 03 '17 15:10 schoudry