Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

AEM Simple Multimodule Lazy Bones Template #28

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

schoudry
Copy link
Contributor

@schoudry schoudry commented Jun 29, 2017

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

@justinedelson
Copy link
Contributor

@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.

@schoudry
Copy link
Contributor Author

schoudry commented Oct 3, 2017

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

@justinedelson
Copy link
Contributor

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.

@schoudry
Copy link
Contributor Author

schoudry commented Oct 3, 2017

@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)

@justinedelson
Copy link
Contributor

@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.

@schoudry
Copy link
Contributor Author

schoudry commented Oct 3, 2017

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

@justinedelson
Copy link
Contributor

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.

@schoudry
Copy link
Contributor Author

schoudry commented Oct 3, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants