[JBoss JIRA] (FORGE-2494) when composing commands from other commands we need to be able to hide inputs in the base command
by James Strachan (JIRA)
James Strachan created FORGE-2494:
-------------------------------------
Summary: when composing commands from other commands we need to be able to hide inputs in the base command
Key: FORGE-2494
URL: https://issues.jboss.org/browse/FORGE-2494
Project: Forge
Issue Type: Feature Request
Reporter: James Strachan
right now in fabric8-forge for creating new projects; we reuse the project-new command; but we've added a hack to override the targetLocation property; so that the user doesn't' get to pick that - we want to hide that completely from the user. Meanwhile the project-new-git logical wrapper command defaults this value, uses a canonical temporary folder and then stores the new project in git (instead of a local file system on the developers laptop).
It would be good to port this code to be pure vanilla forge commands that could be reused from the CLI / eclipse / IDEA too. To do this we'd need to be able to wrap the project-new command with a project-new-git command that then hides the input for the "targetLocation" property (defaulting the value so that the inner project-new command can work as before; then the outer command, project-new-git can do the git thingy.
I've not had chance to experiment a way to do this nicely; maybe using a proxy command or something and using a temporary UIBuilder class that we pass to the delegate inner command to build its stuff; so that the outer command can remove things from the real UIBuilder etc - but I figured it'd be nice for this kind of thing to be a standard feature to make commands easier to combine and compose. It'd also make it easier for us to move the project-new-git command back into the main forge project (though I guess thats kinda complex as the project-new-git command would probably want to create a local copy too on the users desktop when not running in a REST service - so maybe this kinda thing is highly environment specific?)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (FORGE-2492) forge hangs on AbstractProjectCommand.getSelectedProject() when used inside fabric8-forge (the REST service)
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/FORGE-2492?page=com.atlassian.jira.plugin... ]
James Strachan commented on FORGE-2492:
---------------------------------------
Thanks for all of that George! I'll give that system property a go. I'm pretty convinced now (from watching ~/.m2/repository as I use the forge wizards) that the hang is due to downloading of mvn dependencies for plugins and so forth. I'm currently trying to hack a test case to force the download of everything; so I can pre-load the ~/.m2/repository with all the possible requirements on startup.
Thanks again!
> forge hangs on AbstractProjectCommand.getSelectedProject() when used inside fabric8-forge (the REST service)
> ------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-2492
> URL: https://issues.jboss.org/browse/FORGE-2492
> Project: Forge
> Issue Type: Feature Request
> Affects Versions: 2.17.0.Final, 2.19.2.Final
> Environment: using the fabric8-forge docker image inside OpenShift
> Reporter: James Strachan
>
> Here's a stack trace:
> https://gist.github.com/jstrachan/741d65b7dd87ca0e701e
> when using Forge from the hawtio console, the JVM seems to hang for 1-2 minutes now inside the call to AbstractProjectCommand.getSelectedProject(). Whats odd is I can create an archetype and invoke this code path on startup just fine - but then thats in a different thread to the one using Forge from inside the JAXRS service; so am wondering if its related to which thread is being used?
> Seems to ultimately be a wagon / aether issue; taking too long to download things.
> Wonder is there any way to configure the maven addon in forge to register a Wagon listener maybe? No idea whats causing the pause
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (FORGE-2492) forge hangs on AbstractProjectCommand.getSelectedProject() when used inside fabric8-forge (the REST service)
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/FORGE-2492?page=com.atlassian.jira.plugin... ]
James Strachan commented on FORGE-2492:
---------------------------------------
BTW do you happen to know if there's a system property we can use to define the users ~/.m2/repository folder? I can try the standard env vars but it'll be handy to override them in tests
> forge hangs on AbstractProjectCommand.getSelectedProject() when used inside fabric8-forge (the REST service)
> ------------------------------------------------------------------------------------------------------------
>
> Key: FORGE-2492
> URL: https://issues.jboss.org/browse/FORGE-2492
> Project: Forge
> Issue Type: Feature Request
> Affects Versions: 2.17.0.Final, 2.19.2.Final
> Environment: using the fabric8-forge docker image inside OpenShift
> Reporter: James Strachan
>
> Here's a stack trace:
> https://gist.github.com/jstrachan/741d65b7dd87ca0e701e
> when using Forge from the hawtio console, the JVM seems to hang for 1-2 minutes now inside the call to AbstractProjectCommand.getSelectedProject(). Whats odd is I can create an archetype and invoke this code path on startup just fine - but then thats in a different thread to the one using Forge from inside the JAXRS service; so am wondering if its related to which thread is being used?
> Seems to ultimately be a wagon / aether issue; taking too long to download things.
> Wonder is there any way to configure the maven addon in forge to register a Wagon listener maybe? No idea whats causing the pause
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months