[JBoss JIRA] (FORGE-2588) support creating projects from archetypes which don't use maven
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/FORGE-2588?page=com.atlassian.jira.plugin... ]
James Strachan commented on FORGE-2588:
---------------------------------------
We're using an ArchetypeCatalog in fabric8-forge to import all the iPaaS archetypes and use that to detect them
> support creating projects from archetypes which don't use maven
> ---------------------------------------------------------------
>
> Key: FORGE-2588
> URL: https://issues.jboss.org/browse/FORGE-2588
> Project: Forge
> Issue Type: Feature Request
> Reporter: James Strachan
>
> we've a bunch of archetypes for projects like nodejs, golang, swift, python, ruby; we're also hoping to add archetypes for things like Gradle / SBT etc.
> It'd be nice to allow the project-new wizard to not always create a pom.xml and src/main/* src/test/* folders if the archetype does not contain a pom.xml file.
> PR on the way shortly...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (FORGE-2588) support creating projects from archetypes which don't use maven
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2588?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2588:
----------------------------------------
One question: how are projects created with the archetype expected to be detected by Forge? If it helps, I have created a Generic project addon to store project metadata inside a .forge_settings file inside the project.
> support creating projects from archetypes which don't use maven
> ---------------------------------------------------------------
>
> Key: FORGE-2588
> URL: https://issues.jboss.org/browse/FORGE-2588
> Project: Forge
> Issue Type: Feature Request
> Reporter: James Strachan
>
> we've a bunch of archetypes for projects like nodejs, golang, swift, python, ruby; we're also hoping to add archetypes for things like Gradle / SBT etc.
> It'd be nice to allow the project-new wizard to not always create a pom.xml and src/main/* src/test/* folders if the archetype does not contain a pom.xml file.
> PR on the way shortly...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (FORGE-2588) support creating projects from archetypes which don't use maven
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/FORGE-2588?page=com.atlassian.jira.plugin... ]
James Strachan commented on FORGE-2588:
---------------------------------------
so one really simple workaround for this issue is to remove the pom.xml and src folder before the ArchtypeHelper processes the archetype jar; as for java / maven projects its going to replace whatever is there with the pom.xml thats inside the archetype anyway and will generate all the required java source folders with the correct package names or files from the archetype etc.
Then if there's no pom.xml or src folders in the archetype jar, things just work beautifully without having to make major changes to ProjectType / NewProjectWizardImpl.java to defer decisions on what facets are inside a MavenArchetypeProjectType.java until after the archetype has been generated.
Does this simple patch seem OK to you? It only affects projects created using MavenArchetypeProjectType.
I did ponder about adding a custom "non-java" marker to the archetype to restrict the scope of this fix further; but thats harder right now as ArchetypeHelper is called with an InputStream of the archetype jar so its harder to pre-process the jar first to look for a magic file to delete pom.xml and src before processing it again.
If you're happy with the above I can submit a PR?
> support creating projects from archetypes which don't use maven
> ---------------------------------------------------------------
>
> Key: FORGE-2588
> URL: https://issues.jboss.org/browse/FORGE-2588
> Project: Forge
> Issue Type: Feature Request
> Reporter: James Strachan
>
> we've a bunch of archetypes for projects like nodejs, golang, swift, python, ruby; we're also hoping to add archetypes for things like Gradle / SBT etc.
> It'd be nice to allow the project-new wizard to not always create a pom.xml and src/main/* src/test/* folders if the archetype does not contain a pom.xml file.
> PR on the way shortly...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (FORGE-2589) Throw when AddonRegistry().getServices(Class) finds nothing
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-2589?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-2589:
--------------------------------
Description:
This is just a suggestion to strenghten the contract of getServices(Class).
Often, the code looks like this:
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
And all works until something goes wrong with the addons setup.
In that case, getServices() returns null and it may end up with user seeing a NullPointerException with a nasty stacktrace.
For the sake of better usability,
I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
was:
This is just a suggestion to strenghten the contract of getServices(Class).
Often, the code looks like this:
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
And all works until something goes wrong with the addons setup.
In that case, getServices() returns null and the user sees a NullPointerException.
For the sake of better usability,
I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
> Throw when AddonRegistry().getServices(Class) finds nothing
> -----------------------------------------------------------
>
> Key: FORGE-2589
> URL: https://issues.jboss.org/browse/FORGE-2589
> Project: Forge
> Issue Type: Feature Request
> Components: Addon Manager, Furnace (Container), Usability
> Affects Versions: 2.20.1.Final
> Reporter: Ondrej Zizka
>
> This is just a suggestion to strenghten the contract of getServices(Class).
> Often, the code looks like this:
> {code}
> furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
> {code}
> And all works until something goes wrong with the addons setup.
> In that case, getServices() returns null and it may end up with user seeing a NullPointerException with a nasty stacktrace.
> For the sake of better usability,
> I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (FORGE-2589) Throw when AddonRegistry().getServices(Class) finds nothing
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-2589?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-2589:
--------------------------------
Description:
This is just a suggestion to strenghten the contract of getServices(Class).
Often, the code looks like this:
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
And all works until something goes wrong with the addons setup.
In that case, getServices() returns null and the user sees a NullPointerException.
I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
was:
This is just a suggestion to strenghten the contract of
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
> Throw when AddonRegistry().getServices(Class) finds nothing
> -----------------------------------------------------------
>
> Key: FORGE-2589
> URL: https://issues.jboss.org/browse/FORGE-2589
> Project: Forge
> Issue Type: Feature Request
> Components: Addon Manager, Furnace (Container)
> Affects Versions: 2.20.1.Final
> Reporter: Ondrej Zizka
>
> This is just a suggestion to strenghten the contract of getServices(Class).
> Often, the code looks like this:
> {code}
> furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
> {code}
> And all works until something goes wrong with the addons setup.
> In that case, getServices() returns null and the user sees a NullPointerException.
> I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (FORGE-2589) Throw when AddonRegistry().getServices(Class) finds nothing
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-2589?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-2589:
--------------------------------
Description:
This is just a suggestion to strenghten the contract of getServices(Class).
Often, the code looks like this:
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
And all works until something goes wrong with the addons setup.
In that case, getServices() returns null and the user sees a NullPointerException.
For the sake of better usability,
I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
was:
This is just a suggestion to strenghten the contract of getServices(Class).
Often, the code looks like this:
{code}
furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
{code}
And all works until something goes wrong with the addons setup.
In that case, getServices() returns null and the user sees a NullPointerException.
I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
> Throw when AddonRegistry().getServices(Class) finds nothing
> -----------------------------------------------------------
>
> Key: FORGE-2589
> URL: https://issues.jboss.org/browse/FORGE-2589
> Project: Forge
> Issue Type: Feature Request
> Components: Addon Manager, Furnace (Container), Usability
> Affects Versions: 2.20.1.Final
> Reporter: Ondrej Zizka
>
> This is just a suggestion to strenghten the contract of getServices(Class).
> Often, the code looks like this:
> {code}
> furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
> {code}
> And all works until something goes wrong with the addons setup.
> In that case, getServices() returns null and the user sees a NullPointerException.
> For the sake of better usability,
> I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (FORGE-2589) Throw when AddonRegistry().getServices(Class) finds nothing
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-2589?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-2589:
--------------------------------
Component/s: Usability
> Throw when AddonRegistry().getServices(Class) finds nothing
> -----------------------------------------------------------
>
> Key: FORGE-2589
> URL: https://issues.jboss.org/browse/FORGE-2589
> Project: Forge
> Issue Type: Feature Request
> Components: Addon Manager, Furnace (Container), Usability
> Affects Versions: 2.20.1.Final
> Reporter: Ondrej Zizka
>
> This is just a suggestion to strenghten the contract of getServices(Class).
> Often, the code looks like this:
> {code}
> furnace.getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class).get();
> {code}
> And all works until something goes wrong with the addons setup.
> In that case, getServices() returns null and the user sees a NullPointerException.
> I suggest that there could be 2 methods, getServices() which would throw an informative exception if no such services are found, and findServices() which would return null, as the current getServices() does.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months