[JBoss JIRA] (FORGE-2362) Generated projects should contain a sample README.asciidoc
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2362?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2362:
-----------------------------------
It already does for addon projects. Do you mean other projects as well?
Enviado do meu smartphone Samsung Galaxy.<div>
</div><div>
</div><div>-------- Mensagem original --------</div><div>De: "Antonio Goncalves (JIRA)" <issues(a)jboss.org> </div><div>Data: 16/06/2015 18:14 (GMT-03:00) </div><div>Para: forge-issues(a)lists.jboss.org </div><div>Assunto: [forge-issues] [JBoss JIRA] (FORGE-2362) Generated projects should contain a sample README.asciidoc </div><div>
</div>Antonio Goncalves created FORGE-2362:
----------------------------------------
Summary: Generated projects should contain a sample README.asciidoc
Key: FORGE-2362
URL: https://issues.jboss.org/browse/FORGE-2362
Project: Forge
Issue Type: Feature Request
Components: Projects
Affects Versions: 2.16.2.Final
Reporter: Antonio Goncalves
When creating a new project with {{project-new}}, it should generate a basic {{README.asciidoc}} file.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
> Generated projects should contain a sample README.asciidoc
> ----------------------------------------------------------
>
> Key: FORGE-2362
> URL: https://issues.jboss.org/browse/FORGE-2362
> Project: Forge
> Issue Type: Feature Request
> Components: Projects
> Affects Versions: 2.16.2.Final
> Reporter: Antonio Goncalves
>
> When creating a new project with {{project-new}}, it should generate a basic {{README.asciidoc}} file.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months
[JBoss JIRA] (FORGE-2361) Having web front related commands
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2361?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2361:
----------------------------------------
Maybe {{js-new-function}} instead of {{js-new-method}}?
> Having web front related commands
> ---------------------------------
>
> Key: FORGE-2361
> URL: https://issues.jboss.org/browse/FORGE-2361
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.16.2.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> We should have a set of commands to create all sorts of web front artifacts. For example :
> {code}
> html-new-page
> html-new-template
> jsp-new-page
> css-new-sheet
> css-add-style
> js-new-script
> js-new-method
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months
[JBoss JIRA] (FORGE-2361) Having web front related commands
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2361:
----------------------------------------
Summary: Having web front related commands
Key: FORGE-2361
URL: https://issues.jboss.org/browse/FORGE-2361
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.16.2.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
We should have a set of commands to create all sorts of web front artifacts. For example :
{code}
html-new-page
html-new-template
jsp-new-page
css-new-sheet
css-add-style
js-new-script
js-new-method
...
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months
[JBoss JIRA] (FORGE-2179) project-list-dependencies command
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2179?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2179:
-------------------------------------
Parent: FORGE-1926
Issue Type: Sub-task (was: Feature Request)
> project-list-dependencies command
> ---------------------------------
>
> Key: FORGE-2179
> URL: https://issues.jboss.org/browse/FORGE-2179
> Project: Forge
> Issue Type: Sub-task
> Components: Projects
> Affects Versions: 2.12.3.Final
> Reporter: Claus Ibsen
> Priority: Minor
> Labels: Starter
> Fix For: 2.x Future
>
>
> It would be good to have a command that can list all the project dependencies in a nice table structure that can be used from the shell.
> Today there is no such command.
> There is a project-has-dependencies which is rather useless, it requires the user to type in a group + artifact id, to see if its added or not, and you just get a kinda true|false response.
> When you work with a project, you often want to be able to add / remove dependencies, and therefore also want to see the current list. And also their scope etc, which are compile | test scoped etc.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months
[JBoss JIRA] (FORGE-2360) Upgrade to Furnace 2.18.2.Final
by George Gastaldi (JIRA)
George Gastaldi created FORGE-2360:
--------------------------------------
Summary: Upgrade to Furnace 2.18.2.Final
Key: FORGE-2360
URL: https://issues.jboss.org/browse/FORGE-2360
Project: Forge
Issue Type: Component Upgrade
Components: Furnace (Container)
Affects Versions: 2.16.1.Final
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.16.2.Final
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months
[JBoss JIRA] (FORGE-2359) command-list - Should output the commands sorted
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2359?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-2359.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.16.2.Final
Resolution: Done
> command-list - Should output the commands sorted
> ------------------------------------------------
>
> Key: FORGE-2359
> URL: https://issues.jboss.org/browse/FORGE-2359
> Project: Forge
> Issue Type: Enhancement
> Components: UI - Shell
> Affects Versions: 2.16.1.Final
> Reporter: Claus Ibsen
> Assignee: George Gastaldi
> Priority: Minor
> Fix For: 2.16.2.Final
>
>
> When running forge from the command line, and typing command-list its random sorted
> {code}
> [crap]$ command-list
> Java EE/JSTL > jstl-setup - Setup JSTL in your project
> Camel > camel-route-profile - Display profile information about Camel routes
> Camel > camel-disconnect - Disconnects from the Jolokia agent
> Camel > camel-context-start - Start a Camel context
> Camel > camel-context-suspend - Suspend a Camel context
> Camel > camel-rest-show - Display the Camel REST definition in XML
> Java EE/CDI > cdi-new-annotation-literal - Creates an Annotation Literal Type
> Project/Manage > project-set-compiler-version - Set the java sources and the target compilation version
> Maven > archetype-add - Adds an archetype catalog to the Forge configuration file
> Camel > camel-route-reset-stats - Reset route performance stats from a CamelContext
> Shell > ls - List files
> Forge/Manage > addon-remove - Command to remove a Furnace 2 addon.
> Java EE/JPA > jpa-new-embeddable - Create a new JPA Embeddable
> Shell > cat - The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order.
> Camel > camel-route-info - Display information about a Camel route.
> SCM / GIT > git-checkout - Checkout a branch from GIT repository or create a new one
> Project/Generation > project-new - Create a new project
> Camel > camel-context-stop - Stop a Camel context
> Java EE/Servlet > servlet-new-servlet - Creates a new Servlet
> Java > java-new-exception - Creates a new Java Exception
> Uncategorized > io-fabric8-forge-camel-commands-project-fabricstepcommand - No Description
> Database/Connections > connection-create-profile - Command to create a database connection profile.
> Shell > edit - Edit files with the default system editor
> Camel > camel-new-component-cdi - Creates a new Camel component instance configuration using CDI
> Camel > camel-route-stop - Stop a Camel route
> Shell > run - Execute/run a forge script file.
> ...
> {code}
> It should list those nicely sorted, so its readable.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months
[JBoss JIRA] (FORGE-2359) command-list - Should output the commands sorted
by Claus Ibsen (JIRA)
Claus Ibsen created FORGE-2359:
----------------------------------
Summary: command-list - Should output the commands sorted
Key: FORGE-2359
URL: https://issues.jboss.org/browse/FORGE-2359
Project: Forge
Issue Type: Enhancement
Components: UI - Shell
Affects Versions: 2.16.1.Final
Reporter: Claus Ibsen
Priority: Minor
When running forge from the command line, and typing command-list its random sorted
{code}
[crap]$ command-list
Java EE/JSTL > jstl-setup - Setup JSTL in your project
Camel > camel-route-profile - Display profile information about Camel routes
Camel > camel-disconnect - Disconnects from the Jolokia agent
Camel > camel-context-start - Start a Camel context
Camel > camel-context-suspend - Suspend a Camel context
Camel > camel-rest-show - Display the Camel REST definition in XML
Java EE/CDI > cdi-new-annotation-literal - Creates an Annotation Literal Type
Project/Manage > project-set-compiler-version - Set the java sources and the target compilation version
Maven > archetype-add - Adds an archetype catalog to the Forge configuration file
Camel > camel-route-reset-stats - Reset route performance stats from a CamelContext
Shell > ls - List files
Forge/Manage > addon-remove - Command to remove a Furnace 2 addon.
Java EE/JPA > jpa-new-embeddable - Create a new JPA Embeddable
Shell > cat - The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order.
Camel > camel-route-info - Display information about a Camel route.
SCM / GIT > git-checkout - Checkout a branch from GIT repository or create a new one
Project/Generation > project-new - Create a new project
Camel > camel-context-stop - Stop a Camel context
Java EE/Servlet > servlet-new-servlet - Creates a new Servlet
Java > java-new-exception - Creates a new Java Exception
Uncategorized > io-fabric8-forge-camel-commands-project-fabricstepcommand - No Description
Database/Connections > connection-create-profile - Command to create a database connection profile.
Shell > edit - Edit files with the default system editor
Camel > camel-new-component-cdi - Creates a new Camel component instance configuration using CDI
Camel > camel-route-stop - Stop a Camel route
Shell > run - Execute/run a forge script file.
...
{code}
It should list those nicely sorted, so its readable.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months
[JBoss JIRA] (FORGE-2098) Being able to create a new JPA converter
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2098?page=com.atlassian.jira.plugin... ]
Antonio Goncalves reassigned FORGE-2098:
----------------------------------------
Assignee: (was: Antonio Goncalves)
> Being able to create a new JPA converter
> ----------------------------------------
>
> Key: FORGE-2098
> URL: https://issues.jboss.org/browse/FORGE-2098
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.12.1.Final
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> It would be good to be able to create a new JPA converter with just the following command :
> {code}
> jpa-new-converter --name CreditCardConverter --fromAttribute CreditCard --toColumn String
> {code}
> This will generate the following code :
> {code}
> @Converter(autoApply = true)
> public class CreditCardConverter implements AttributeConverter<CreditCard, String> {
> @Override
> public String convertToDatabaseColumn(CreditCard entityAttribute) {
> return null;
> }
> @Override
> public CreditCard convertToEntityAttribute(String databaseColumn) {
> return null;
> }
> }
> {code}
> (!) This command is only available in JPA 2.1
> We need [] to parameterize the {{Converter}} API. So the following code doesn't work, but it's a good start :
> {code}
> public class JPANewConverterCommand extends AbstractJPACommand<JavaClassSource>
> {
> @Inject
> @WithAttributes(label = "Custom Scope Annotation", type = InputType.JAVA_CLASS_PICKER, required = true)
> private UIInput<String> fromAttribute;
> @Inject
> @WithAttributes(label = "Custom Scope Annotation", type = InputType.JAVA_CLASS_PICKER, required = true)
> private UIInput<String> toColumn;
> @Override
> public Metadata getMetadata(UIContext context)
> {
> return Metadata.from(super.getMetadata(context), getClass())
> .name("JPA: New Converter")
> .description("Create a new JPA Converter");
> }
> @Override
> protected String getType()
> {
> return "Converter";
> }
> @Override
> protected Class<JavaClassSource> getSourceType()
> {
> return JavaClassSource.class;
> }
> @Override
> public void initializeUI(UIBuilder builder) throws Exception
> {
> super.initializeUI(builder);
> builder.add(fromAttribute).add(toColumn);
> }
> @Override
> public JavaClassSource decorateSource(UIExecutionContext context, Project project, JavaClassSource source)
> throws Exception
> {
> // Class
> source.addInterface(AttributeConverter.class).addAnnotation(Converter.class).setLiteralValue("autoApply", "true");
> // Methods
> source.addMethod().setPublic().setName("convertToDatabaseColumn")
> .setReturnType(toColumn.getValue())
> .setParameters(fromAttribute.getValue() + " entityAttribute")
> .setBody("return null;")
> .addAnnotation(Override.class);
> source.addMethod().setPublic().setName("convertToEntityAttribute")
> .setReturnType(fromAttribute.getValue())
> .setParameters(toColumn.getValue() + " databaseColumn")
> .setBody("return null;")
> .addAnnotation(Override.class);
> return source;
> }
> }
> {code}
> {code}
> @RunWith(Arquillian.class)
> public class JPANewConverterCommandTest
> {
> @Deployment
> @AddonDependencies({
> @AddonDependency(name = "org.jboss.forge.addon:ui-test-harness"),
> @AddonDependency(name = "org.jboss.forge.addon:shell-test-harness"),
> @AddonDependency(name = "org.jboss.forge.addon:javaee"),
> @AddonDependency(name = "org.jboss.forge.addon:maven"),
> @AddonDependency(name = "org.jboss.forge.furnace.container:cdi")
> })
> public static AddonArchive getDeployment()
> {
> return ShrinkWrap.create(AddonArchive.class).addBeansXML().addClass(ProjectHelper.class);
> }
> @Inject
> private UITestHarness uiTestHarness;
> @Inject
> private ShellTest shellTest;
> @Inject
> private ProjectHelper projectHelper;
> @Inject
> private FacetFactory facetFactory;
> private Project project;
> @Before
> public void setUp()
> {
> project = projectHelper.createJavaLibraryProject();
> projectHelper.installJPA_2_1(project);
> }
> @Test
> public void checkCommandMetadata() throws Exception
> {
> try (CommandController controller = uiTestHarness.createCommandController(JPANewConverterCommand.class,
> project.getRoot()))
> {
> controller.initialize();
> // Checks the command metadata
> assertTrue(controller.getCommand() instanceof JPANewConverterCommand);
> UICommandMetadata metadata = controller.getMetadata();
> assertEquals("JPA: New Converter", metadata.getName());
> assertEquals("Java EE", metadata.getCategory().getName());
> assertEquals("JPA", metadata.getCategory().getSubCategory().getName());
> assertFalse("Project is created, shouldn't have targetLocation", controller.hasInput("targetLocation"));
> assertEquals(5, controller.getInputs().size());
> assertTrue(controller.hasInput("named"));
> assertTrue(controller.hasInput("targetPackage"));
> assertTrue(controller.hasInput("fromAttribute"));
> assertTrue(controller.hasInput("toColumn"));
> assertTrue(controller.getValueFor("targetPackage").toString().endsWith(DEFAULT_ENTITY_PACKAGE));
> }
> }
> @Test
> public void checkCommandShell() throws Exception
> {
> shellTest.getShell().setCurrentResource(project.getRoot());
> Result result = shellTest.execute(("jpa-new-converter --named Dummy --fromAttribute java.lang.String --toColumn java.lang.Integer"), 10, TimeUnit.SECONDS);
> Assert.assertThat(result, not(instanceOf(Failed.class)));
> Assert.assertTrue(project.hasFacet(JPAFacet.class));
> }
> @Test
> public void testCreateConverter() throws Exception
> {
> facetFactory.install(project, JavaSourceFacet.class);
> try (CommandController controller = uiTestHarness.createCommandController(JPANewConverterCommand.class,
> project.getRoot()))
> {
> controller.initialize();
> controller.setValueFor("named", "CreditCardConverter");
> controller.setValueFor("fromAttribute", "java.lang.String");
> controller.setValueFor("toColumn", "java.lang.Integer");
> controller.setValueFor("targetPackage", "org.jboss.forge.test");
> Assert.assertTrue(controller.isValid());
> Assert.assertTrue(controller.canExecute());
> Result result = controller.execute();
> Assert.assertThat(result, is(not(instanceOf(Failed.class))));
> }
> JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
> JavaResource javaResource = facet.getJavaResource("org.jboss.forge.test.CreditCardConverter");
> Assert.assertTrue(javaResource.exists());
> Assert.assertThat(javaResource.getJavaType(), is(instanceOf(JavaClass.class)));
> Assert.assertTrue(javaResource.getJavaType().hasAnnotation(Converter.class));
> }
> @Test
> public void testCreateConverterDefaultPackage() throws Exception
> {
> facetFactory.install(project, JavaSourceFacet.class);
> try (CommandController controller = uiTestHarness.createCommandController(JPANewConverterCommand.class,
> project.getRoot()))
> {
> controller.initialize();
> controller.setValueFor("named", "CreditCardConverter");
> controller.setValueFor("fromAttribute", "java.lang.String");
> controller.setValueFor("toColumn", "java.lang.Integer");
> Assert.assertTrue(controller.isValid());
> Assert.assertTrue(controller.canExecute());
> Result result = controller.execute();
> Assert.assertThat(result, is(not(instanceOf(Failed.class))));
> }
> JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
> String packageName = project.getFacet(JavaSourceFacet.class).getBasePackage() + "." + DEFAULT_ENTITY_PACKAGE;
> JavaResource javaResource = facet.getJavaResource(packageName + ".CreditCardConverter");
> Assert.assertTrue(javaResource.exists());
> Assert.assertThat(javaResource.getJavaType(), is(instanceOf(JavaClass.class)));
> Assert.assertTrue(javaResource.getJavaType().hasAnnotation(Converter.class));
> }
> @Test
> public void testCreateConverterWithNoMandatoryAttribute() throws Exception
> {
> facetFactory.install(project, JavaSourceFacet.class);
> try (CommandController controller = uiTestHarness.createCommandController(JPANewConverterCommand.class,
> project.getRoot()))
> {
> controller.initialize();
> controller.setValueFor("named", "CreditCardConverter");
> controller.setValueFor("targetPackage", "org.jboss.forge.test");
> Assert.assertFalse(controller.isValid());
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 10 months