[JBoss JIRA] (FORGE-2239) Auto pickup of ArchetypeCatalogFactory instances from AddonRegistry is not working
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2239?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2239:
-----------------------------------
Fix Version/s: 2.14.1.Final
Affects Version/s: 2.14.0.Final
Component/s: Build Tools - Maven
> Auto pickup of ArchetypeCatalogFactory instances from AddonRegistry is not working
> ----------------------------------------------------------------------------------
>
> Key: FORGE-2239
> URL: https://issues.jboss.org/browse/FORGE-2239
> Project: Forge
> Issue Type: Bug
> Components: Build Tools - Maven
> Affects Versions: 2.14.0.Final
> Environment: Using a vanilla Forge 2.14.0 from the command line
> Reporter: Claus Ibsen
> Assignee: George Gastaldi
> Fix For: 2.14.1.Final
>
>
> I try to create a new project, and select [7] to select from maven archetype catalog, but the values for catalog and archetype cannot be entered. I am not sure how its supposed to work.
> Here is what I did
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: muydemo
> ? Top level package [org.muydemo]:
> ? 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] ( ) ear
> [5] ( ) resource-jar
> [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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2239) Auto pickup of ArchetypeCatalogFactory instances from AddonRegistry is not working
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2239?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-2239.
----------------------------------
Resolution: Done
> Auto pickup of ArchetypeCatalogFactory instances from AddonRegistry is not working
> ----------------------------------------------------------------------------------
>
> Key: FORGE-2239
> URL: https://issues.jboss.org/browse/FORGE-2239
> Project: Forge
> Issue Type: Bug
> Components: Build Tools - Maven
> Affects Versions: 2.14.0.Final
> Environment: Using a vanilla Forge 2.14.0 from the command line
> Reporter: Claus Ibsen
> Assignee: George Gastaldi
> Fix For: 2.14.1.Final
>
>
> I try to create a new project, and select [7] to select from maven archetype catalog, but the values for catalog and archetype cannot be entered. I am not sure how its supposed to work.
> Here is what I did
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: muydemo
> ? Top level package [org.muydemo]:
> ? 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] ( ) ear
> [5] ( ) resource-jar
> [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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2239) project-new - Cannot create a new project from-archetype-catalog
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2239?page=com.atlassian.jira.plugin... ]
George Gastaldi reopened FORGE-2239:
------------------------------------
Assignee: George Gastaldi
> project-new - Cannot create a new project from-archetype-catalog
> ----------------------------------------------------------------
>
> Key: FORGE-2239
> URL: https://issues.jboss.org/browse/FORGE-2239
> Project: Forge
> Issue Type: Bug
> Environment: Using a vanilla Forge 2.14.0 from the command line
> Reporter: Claus Ibsen
> Assignee: George Gastaldi
>
> I try to create a new project, and select [7] to select from maven archetype catalog, but the values for catalog and archetype cannot be entered. I am not sure how its supposed to work.
> Here is what I did
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: muydemo
> ? Top level package [org.muydemo]:
> ? 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] ( ) ear
> [5] ( ) resource-jar
> [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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2239) project-new - Cannot create a new project from-archetype-catalog
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2239?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2239:
----------------------------------------
I fixed in master branch. You don't need any implicit registration from now on.
> project-new - Cannot create a new project from-archetype-catalog
> ----------------------------------------------------------------
>
> Key: FORGE-2239
> URL: https://issues.jboss.org/browse/FORGE-2239
> Project: Forge
> Issue Type: Bug
> Environment: Using a vanilla Forge 2.14.0 from the command line
> Reporter: Claus Ibsen
>
> I try to create a new project, and select [7] to select from maven archetype catalog, but the values for catalog and archetype cannot be entered. I am not sure how its supposed to work.
> Here is what I did
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: muydemo
> ? Top level package [org.muydemo]:
> ? 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] ( ) ear
> [5] ( ) resource-jar
> [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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2239) project-new - Cannot create a new project from-archetype-catalog
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2239?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2239:
----------------------------------------
Or even better, just adding the following method to your {{CamelArchetypeCatalogFactory}} class:
{code:java}
void startup(@Observes @Local PostStartup startup, ArchetypeCatalogFactoryRegistry registry)
{
registry.addArchetypeCatalogFactory(this);
}
{code}
> project-new - Cannot create a new project from-archetype-catalog
> ----------------------------------------------------------------
>
> Key: FORGE-2239
> URL: https://issues.jboss.org/browse/FORGE-2239
> Project: Forge
> Issue Type: Bug
> Environment: Using a vanilla Forge 2.14.0 from the command line
> Reporter: Claus Ibsen
>
> I try to create a new project, and select [7] to select from maven archetype catalog, but the values for catalog and archetype cannot be entered. I am not sure how its supposed to work.
> Here is what I did
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: muydemo
> ? Top level package [org.muydemo]:
> ? 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] ( ) ear
> [5] ( ) resource-jar
> [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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2239) project-new - Cannot create a new project from-archetype-catalog
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2239?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2239:
----------------------------------------
I have a feeling that it is because this method is invoked before your addon is loaded. We need to review this code, for the meantime, the best is to have a class that does the registration implicitly, like:
{code:java}
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import org.jboss.forge.furnace.container.cdi.events.Local;
import org.jboss.forge.furnace.event.PostStartup;
class ArchetypeCatalogRegistration
{
@Inject
private ArchetypeCatalogFactoryRegistry registry;
@Inject
private CamelArchetypeCatalogFactory catalog;
public void startup(@Observes @Local PostStartup startup)
{
registry.addArchetypeCatalogFactory(catalog);
}
}
{code}
> project-new - Cannot create a new project from-archetype-catalog
> ----------------------------------------------------------------
>
> Key: FORGE-2239
> URL: https://issues.jboss.org/browse/FORGE-2239
> Project: Forge
> Issue Type: Bug
> Environment: Using a vanilla Forge 2.14.0 from the command line
> Reporter: Claus Ibsen
>
> I try to create a new project, and select [7] to select from maven archetype catalog, but the values for catalog and archetype cannot be entered. I am not sure how its supposed to work.
> Here is what I did
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: muydemo
> ? Top level package [org.muydemo]:
> ? 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] ( ) ear
> [5] ( ) resource-jar
> [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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2241) Configuration.clearProperty() does not work for multilevel subsets
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2241?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2241:
-----------------------------------
Description:
Having:
{code:java}
@Inject
Configuration config;
@Inject
@Subset("subset.subset")
private Configuration subSubsetConfiguration;
{code}
The following test should pass:
{code:java}
@Test
public void testSubSubsetConfigurationClearProperty() throws Exception
{
configuration.clear();
configuration.setProperty("subset.subset.A", "Value");
assertTrue(subSubsetConfiguration.getKeys().hasNext());
subSubsetConfiguration.clearProperty("A");
assertFalse(subSubsetConfiguration.getKeys().hasNext());
assertFalse(configuration.getKeys().hasNext());
}
{code}
was:
Having:
{code}
@Inject
Configuration config;
@Inject
@Subset("subset.subset")
private Configuration subSubsetConfiguration;
{code}
The following test should pass:
{code}
@Test
public void testSubSubsetConfigurationClearProperty() throws Exception
{
configuration.clear();
configuration.setProperty("subset.subset.A", "Value");
assertTrue(subSubsetConfiguration.getKeys().hasNext());
subSubsetConfiguration.clearProperty("A");
assertFalse(subSubsetConfiguration.getKeys().hasNext());
assertFalse(configuration.getKeys().hasNext());
}
> Configuration.clearProperty() does not work for multilevel subsets
> ------------------------------------------------------------------
>
> Key: FORGE-2241
> URL: https://issues.jboss.org/browse/FORGE-2241
> Project: Forge
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 2.14.0.Final
> Reporter: George Gastaldi
> Fix For: 2.x Future
>
>
> Having:
> {code:java}
> @Inject
> Configuration config;
> @Inject
> @Subset("subset.subset")
> private Configuration subSubsetConfiguration;
> {code}
> The following test should pass:
> {code:java}
> @Test
> public void testSubSubsetConfigurationClearProperty() throws Exception
> {
> configuration.clear();
> configuration.setProperty("subset.subset.A", "Value");
> assertTrue(subSubsetConfiguration.getKeys().hasNext());
> subSubsetConfiguration.clearProperty("A");
> assertFalse(subSubsetConfiguration.getKeys().hasNext());
> assertFalse(configuration.getKeys().hasNext());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2240) project-new - Do not show from-archetype-catalog if there are no catalogs
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2240?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2240:
-----------------------------------
Component/s: Build Tools - Maven
Projects
> project-new - Do not show from-archetype-catalog if there are no catalogs
> -------------------------------------------------------------------------
>
> Key: FORGE-2240
> URL: https://issues.jboss.org/browse/FORGE-2240
> Project: Forge
> Issue Type: Enhancement
> Components: Build Tools - Maven, Projects
> Affects Versions: 2.14.0.Final
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 2.x Future
>
>
> eg out of the box there is no archetype-catalogs registered, but if you choose no #7 in the project-new it would fail
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: mydemo
> ? Top level package [org.mydemo]:
> ? 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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
> So I think project-new should hide [7] if there is no catalogs, eg archetype-list is empty.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2240) project-new - Do not show from-archetype-catalog if there are no catalogs
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2240?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2240:
-----------------------------------
Fix Version/s: 2.x Future
> project-new - Do not show from-archetype-catalog if there are no catalogs
> -------------------------------------------------------------------------
>
> Key: FORGE-2240
> URL: https://issues.jboss.org/browse/FORGE-2240
> Project: Forge
> Issue Type: Enhancement
> Components: Build Tools - Maven, Projects
> Affects Versions: 2.14.0.Final
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 2.x Future
>
>
> eg out of the box there is no archetype-catalogs registered, but if you choose no #7 in the project-new it would fail
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: mydemo
> ? Top level package [org.mydemo]:
> ? 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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
> So I think project-new should hide [7] if there is no catalogs, eg archetype-list is empty.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months
[JBoss JIRA] (FORGE-2240) project-new - Do not show from-archetype-catalog if there are no catalogs
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2240?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2240:
-----------------------------------
Affects Version/s: 2.14.0.Final
> project-new - Do not show from-archetype-catalog if there are no catalogs
> -------------------------------------------------------------------------
>
> Key: FORGE-2240
> URL: https://issues.jboss.org/browse/FORGE-2240
> Project: Forge
> Issue Type: Enhancement
> Affects Versions: 2.14.0.Final
> Reporter: Claus Ibsen
> Priority: Minor
>
> eg out of the box there is no archetype-catalogs registered, but if you choose no #7 in the project-new it would fail
> {code}
> [forge-distribution-2.14.0.Final]$ project-new
> ***INFO*** Required inputs not satisfied, entering interactive mode
> ? Project name: mydemo
> ? Top level package [org.mydemo]:
> ? 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]
> ***ERROR*** Catalog must be specified.
> ***ERROR*** Archetype must be specified.
> {code}
> So I think project-new should hide [7] if there is no catalogs, eg archetype-list is empty.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 4 months