[JBoss JIRA] (FORGE-2224) Rename attribute methodName in command java-new-method
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2224?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2224:
------------------------------------------
Ouch ! So is it something we will be able to do in Forge 3 (by breaking some backward compatibility like we did from Forge 1 and Forge 2) ?
> Rename attribute methodName in command java-new-method
> ------------------------------------------------------
>
> Key: FORGE-2224
> URL: https://issues.jboss.org/browse/FORGE-2224
> Project: Forge
> Issue Type: Enhancement
> Components: Java EE
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> The {{java-new-method}} has the following attributes :
> {code}
> $ java-new-method
> --targetClass --returnType --parameters --accessType --methodName
> {code}
> The attribute {{methodName}} should be renamed to {{named}} to follow the Forge naming convention.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2243) Programmatically added maven archetype catalog does not work with new-project
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2243?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2243:
-----------------------------------
Fix Version/s: 2.x Future
> Programmatically added maven archetype catalog does not work with new-project
> -----------------------------------------------------------------------------
>
> Key: FORGE-2243
> URL: https://issues.jboss.org/browse/FORGE-2243
> Project: Forge
> Issue Type: Bug
> Affects Versions: 2.14.0.Final
> Reporter: Claus Ibsen
> Fix For: 2.x Future
>
>
> See also FORGE-2242
> When using the new-project command it doesnt work with catalogs that has been added from java code.
> I have added an archetype catalog named "central", eg see FORGE-2242, and when I use it in project-new it fails, as the last output.
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: mydemo2
> ? Top level package [org.mydemo2]:
> ? Version [1.0.0-SNAPSHOT]:
> ? Final name:
> ? Project location [/opt/forge-distribution-2.14.0.Final]:
> [0] (x) war
> [1] ( ) jar
> [2] ( ) parent
> [3] ( ) addon
> [4] ( ) resource-jar
> [5] ( ) ear
> [6] ( ) from-archetype
> [7] ( ) from-archetype-catalog
> Press <ENTER> to confirm, or <CTRL>+C to cancel.
> ? Project type: [0-7] 7
> [0] (x) Maven
> Press <ENTER> to confirm, or <CTRL>+C to cancel.
> ? Build system: [0]
> [0] ( ) central
> Press <ENTER> to confirm, or <CTRL>+C to cancel.
> ? Catalog: [0]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> [forge-distribution-2.14.0.Final]$
> {code}
> But if I add an archetype catalog using archetype-add from the forge shell then it works with project-new, even though they both load the same set of archetypes from maven central.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2224) Rename attribute methodName in command java-new-method
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2224?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2224:
----------------------------------------
Yes, because Forge 2 is now part of JBoss Developer Studio, we can't afford breaking scripts.
> Rename attribute methodName in command java-new-method
> ------------------------------------------------------
>
> Key: FORGE-2224
> URL: https://issues.jboss.org/browse/FORGE-2224
> Project: Forge
> Issue Type: Enhancement
> Components: Java EE
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> The {{java-new-method}} has the following attributes :
> {code}
> $ java-new-method
> --targetClass --returnType --parameters --accessType --methodName
> {code}
> The attribute {{methodName}} should be renamed to {{named}} to follow the Forge naming convention.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2224) Rename attribute methodName in command java-new-method
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2224?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2224:
------------------------------------------
What do you mean by "scripts" that already use this command ? Are we talking about Forge shell scripts ?
A few months ago there was plenty of command renaming (see [FORGE-1387]). I'm sure it broke plenty of scripts (I am a big fan of Forge Shell scripts and I spend always a bit of time to update them)
> Rename attribute methodName in command java-new-method
> ------------------------------------------------------
>
> Key: FORGE-2224
> URL: https://issues.jboss.org/browse/FORGE-2224
> Project: Forge
> Issue Type: Enhancement
> Components: Java EE
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> The {{java-new-method}} has the following attributes :
> {code}
> $ java-new-method
> --targetClass --returnType --parameters --accessType --methodName
> {code}
> The attribute {{methodName}} should be renamed to {{named}} to follow the Forge naming convention.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2242) Programmatically adding maven archetype catalog - is shown as unknown in archetype-list
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2242?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-2242.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.14.1.Final
Resolution: Done
> Programmatically adding maven archetype catalog - is shown as unknown in archetype-list
> ---------------------------------------------------------------------------------------
>
> Key: FORGE-2242
> URL: https://issues.jboss.org/browse/FORGE-2242
> Project: Forge
> Issue Type: Bug
> Affects Versions: 2.14.0.Final
> Reporter: Claus Ibsen
> Assignee: George Gastaldi
> Priority: Minor
> Fix For: 2.14.1.Final
>
>
> When installing the Camel forge commands we want to install the Camel archetypes as a catalog out of the box.
> I got some code that does that (but currently coded to include all from central, but we will filter out this later)
> {code}
> // TODO: Remove when when using Forge 2.14.1+
> void startup(@Observes @Local PostStartup startup, ArchetypeCatalogFactoryRegistry registry) {
> // registry.addArchetypeCatalogFactory(this);
> try {
> URL url = new URL("http://repo2.maven.org/maven2/archetype-catalog.xml");
> String defaultRepo = extractRepository(url);
> registry.addArchetypeCatalogFactory("central", url, defaultRepo);
> } catch (MalformedURLException e) {
> logger.log(Level.SEVERE, "Error while retrieving archetypes", e);
> }
> }
> {code}
> But the archeype-list command shows this as unknown.
> {code}
> [forge-distribution-2.14.0.Final]$ addon-install --coordinate io.fabric8.forge:camel,2.2-SNAPSHOT
> ***SUCCESS*** Addon io.fabric8.forge:camel,2.2-SNAPSHOT was installed successfully.
> [forge-distribution-2.14.0.Final]$ archetype-list
> central = unknown
> {code}
> If I add the archetype manually using archetype-add then the url is listed correctly.
> As I am using the add command that takes an URL then it should be shown
> {code}
> void addArchetypeCatalogFactory(String name, URL catalogURL, String defaultRepositoryName);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2224) Rename attribute methodName in command java-new-method
by Devanshu Singh (JIRA)
[ https://issues.jboss.org/browse/FORGE-2224?page=com.atlassian.jira.plugin... ]
Devanshu Singh commented on FORGE-2224:
---------------------------------------
As George points out , this change may break scripts that already use this command.
> Rename attribute methodName in command java-new-method
> ------------------------------------------------------
>
> Key: FORGE-2224
> URL: https://issues.jboss.org/browse/FORGE-2224
> Project: Forge
> Issue Type: Enhancement
> Components: Java EE
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> The {{java-new-method}} has the following attributes :
> {code}
> $ java-new-method
> --targetClass --returnType --parameters --accessType --methodName
> {code}
> The attribute {{methodName}} should be renamed to {{named}} to follow the Forge naming convention.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2255) Adding helper methods in CommandController
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2255:
----------------------------------------
Summary: Adding helper methods in CommandController
Key: FORGE-2255
URL: https://issues.jboss.org/browse/FORGE-2255
Project: Forge
Issue Type: Sub-task
Components: UI - API
Affects Versions: 2.14.0.Final
Reporter: Antonio Goncalves
Priority: Minor
Fix For: 2.x Future
CommandController has a method that list of the command inputs :
{code}
Map<String, InputComponent<?, ?>> getInputs();
{code}
It would be good to add a few helper methods (like in Roaster) :
{code}
InputComponent<?, ?> getInput(String input); // returns one input
boolean hasInput(String input); // checks if the input is present
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2243) Programmatically added maven archetype catalog does not work with new-project
by Claus Ibsen (JIRA)
[ https://issues.jboss.org/browse/FORGE-2243?page=com.atlassian.jira.plugin... ]
Claus Ibsen commented on FORGE-2243:
------------------------------------
Okay tried with a local build of latest forge code.
I got it working when I manually add the archetype catalog with this code
{code}
void startup(@Observes @Local PostStartup startup, ArchetypeCatalogFactoryRegistry registry) {
// must use this to trigger startup event so we can add ourselves
if (registry.getArchetypeCatalogFactory("camel") == null) {
registry.addArchetypeCatalogFactory(this);
}
}
{code}
When I do this, then using project-new can see the catalog, and I can choose the Camel archetypes I added from my catalog factory.
If I remove this code, then project-new does not see the catalog, and option no 7 is not shown (eg to select from catalog). But when I do archetype-list it shows one catalog
camel = unknown.
So know I know why it shows 2 times before
camel = unknown
camel = unknown
That was because of the post startup code that registers it. But that is needed to make it work.
So we are almost there, but it seems there is a little cat vs dog fight registering custom catalog factory, and what project-new can use.
> Programmatically added maven archetype catalog does not work with new-project
> -----------------------------------------------------------------------------
>
> Key: FORGE-2243
> URL: https://issues.jboss.org/browse/FORGE-2243
> Project: Forge
> Issue Type: Bug
> Affects Versions: 2.14.0.Final
> Reporter: Claus Ibsen
>
> See also FORGE-2242
> When using the new-project command it doesnt work with catalogs that has been added from java code.
> I have added an archetype catalog named "central", eg see FORGE-2242, and when I use it in project-new it fails, as the last output.
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: mydemo2
> ? Top level package [org.mydemo2]:
> ? Version [1.0.0-SNAPSHOT]:
> ? Final name:
> ? Project location [/opt/forge-distribution-2.14.0.Final]:
> [0] (x) war
> [1] ( ) jar
> [2] ( ) parent
> [3] ( ) addon
> [4] ( ) resource-jar
> [5] ( ) ear
> [6] ( ) from-archetype
> [7] ( ) from-archetype-catalog
> Press <ENTER> to confirm, or <CTRL>+C to cancel.
> ? Project type: [0-7] 7
> [0] (x) Maven
> Press <ENTER> to confirm, or <CTRL>+C to cancel.
> ? Build system: [0]
> [0] ( ) central
> Press <ENTER> to confirm, or <CTRL>+C to cancel.
> ? Catalog: [0]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> [forge-distribution-2.14.0.Final]$
> {code}
> But if I add an archetype catalog using archetype-add from the forge shell then it works with project-new, even though they both load the same set of archetypes from maven central.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months