[NPMCLI-162] Run Maven commands from JS in order to get webapps Created: 12/Feb/18 Updated: 25/Oct/18 Resolved: 25/Oct/18 |
|
| Status: | Closed |
| Project: | Magnolia CLI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Maxime Michel | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
During the demonstration of the latest features of the CLI I couldn't help but think we should rely on Maven config when available. If somebody has credentials to our Nexus, then they most likely have configured Maven. Running Maven commands in such cases would allow to not deal with security ourselves, and not download artifacts many times. They would be stored in the local repository, from which we can copy-paste them to where the person is working on their system. To download bundles I have a shell script that does this and that could serve as an inspiration. |
| Comments |
| Comment by Jaroslav Simak [ 12/Feb/18 ] |
|
CLI should be imho as simple as possible, i wouldn't force front-enders to maven installation and setup (they have to install Java if they want to use mgnl jumpstart, and imho that should be enough). Yes, for Java devs, this could have benefits, but not so much for front-end guys - and imho they are CLI's main target. |
| Comment by Jan Haderka [ 12/Feb/18 ] |
That is unfortunately not the case. Target audience for CLI is mainly frontend developers not java developers. That said we could still implement described improvement to simplify things for backend developers, but we must ensure that this is not done at the expense of main target audience which is still frontend devs that do not use maven. |
| Comment by Federico Grilli [ 13/Feb/18 ] |
|
I would agree with the comments above. Also, concerning authentication, that is taken care of by https://github.com/request/request |
| Comment by Maxime Michel [ 13/Feb/18 ] |
|
The authentication we're providing can't be compared with Maven's. With the bash script I attached, I never type my credentials to download EE artifacts, I did that once and now rely on Maven's encrypted token. With the CLI it has to be done all the time. As far as forcing devs to use Maven, I don't think we should do this, no. But we could check whether it's installed behing the scenes and swap the Nexus communication logic with another class if it is. Or we could install it transparently and start downloading the adequate Maven template. Something like mgnl setup? |