[JBoss JIRA] (FORGE-1479) Explicitly setup in Bean Validation, not in JPA
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1479?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1479:
----------------------------------------
Here is a sample output of the behavior implemented in the pull-request:
{code}
_____
| ___|__ _ __ __ _ ___
| |_ / _ \| `__/ _` |/ _ \ \\
| _| (_) | | | (_| | __/ //
|_| \___/|_| \__, |\___|
|___/
JBoss Forge, version [ 2.0.1-SNAPSHOT ] - JBoss, by Red Hat, Inc. [ http://forge.jboss.org ]
[bin]$ project-new --named mydemo
***SUCCESS*** Project named 'mydemo' has been created.
[mydemo]$ jpa-new-entity --named Customer --
--jpaVersion --container --provider --configureMetadata --targetPackage --idStrategy
[mydemo]$ jpa-new-entity --named Customer
***SUCCESS*** Persistence (JPA) is installed.
***SUCCESS*** Entity org.mydemo.model.Customer created
[Customer.java]$ rest-
rest-generate-endpoints-from-entities rest-setup
[Customer.java]$ rest-generate-endpoints-from-entities --
--jaxrsVersion --config --className --targets --contentType --persistenceUnit
--applicationPath --targetPackage --ejbVersion --generator --packageName
[Customer.java]$ rest-generate-endpoints-from-entities --target
--targetPackage --targets
[Customer.java]$ rest-generate-endpoints-from-entities --targets --
--jaxrsVersion --config --className --generator --packageName
--applicationPath --targetPackage --targets --contentType --persistenceUnit
[Customer.java]$ rest-generate-endpoints-from-entities --targets org.mydemo.model.Customer
***SUCCESS*** JAX-RS has been installed.
***SUCCESS*** EJB has been installed.
***SUCCESS*** Endpoint created
[CustomerEndpoint.java]$ build
***SUCCESS*** Build Success
{code}
> Explicitly setup in Bean Validation, not in JPA
> -----------------------------------------------
>
> Key: FORGE-1479
> URL: https://issues.jboss.org/browse/FORGE-1479
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.0.0.CR2
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> Just after a creating a project, a create a new entity without setting up the persistence ({{jpa-setup}}) :
> {code}
> ***SUCCESS*** Project named 'test' has been created.
> [test]$ jpa-new-entity --named Author
> [Author.java]$ jpa-new-field --named firstname --length 50
> ***SUCCESS*** Field firstname created
> {code}
> This hasn't created a {{persistence.xml}} file. But on the other hand, if I want to add a constraint on the entity, I need to explicitelly setup Bean Validation :
> {code}
> [Author.java]$ con
> connection-profile-create connection-profile-remove constraint-setup
> [Author.java]$ constraint-setup
> ***SUCCESS*** Bean Validation is installed.
> [Author.java]$ con
> connection-profile-create connection-profile-remove constraint-add constraint-setup
> [Author.java]$ constraint-add --constraint NotNull --onProperty firstname
> ***SUCCESS*** Constraint NotNull successfully configured
> {code}
> if most of the information is giving at project creation, do we still need to explicitly setup Java EE components ? At the moment we have the following :
> {code}
> servlet-setup
> ejb-setup
> soap-setup
> cdi-setup
> jms-setup
> rest-setup
> jpa-setup
> faces-setup
> jstl-setup
> jta-setup
> constraint-setup
> {code}
> Most of these commands do not have parameters (except for persistence, rest, validation). So why not activate them by default (or only if {{export ACCEPT_DEFAULTS=true}} ) ? Something like : "if the command {{constraint-add}} is entered, Forge would go {{if constraint is not setup, then I invoke constraint-setup}}", "if the command {{ejb-new}} is entered, Forge would go {{if ejb is not setup, then I invoke ejb-setup}}"
> That would save some bugs (developers forgetting to setup things), less typing and shorter scripts.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 4 months
[JBoss JIRA] (FORGE-1479) Explicitly setup in Bean Validation, not in JPA
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1479?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1479:
-----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/forge/core/pull/382
> Explicitly setup in Bean Validation, not in JPA
> -----------------------------------------------
>
> Key: FORGE-1479
> URL: https://issues.jboss.org/browse/FORGE-1479
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.0.0.CR2
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> Just after a creating a project, a create a new entity without setting up the persistence ({{jpa-setup}}) :
> {code}
> ***SUCCESS*** Project named 'test' has been created.
> [test]$ jpa-new-entity --named Author
> [Author.java]$ jpa-new-field --named firstname --length 50
> ***SUCCESS*** Field firstname created
> {code}
> This hasn't created a {{persistence.xml}} file. But on the other hand, if I want to add a constraint on the entity, I need to explicitelly setup Bean Validation :
> {code}
> [Author.java]$ con
> connection-profile-create connection-profile-remove constraint-setup
> [Author.java]$ constraint-setup
> ***SUCCESS*** Bean Validation is installed.
> [Author.java]$ con
> connection-profile-create connection-profile-remove constraint-add constraint-setup
> [Author.java]$ constraint-add --constraint NotNull --onProperty firstname
> ***SUCCESS*** Constraint NotNull successfully configured
> {code}
> if most of the information is giving at project creation, do we still need to explicitly setup Java EE components ? At the moment we have the following :
> {code}
> servlet-setup
> ejb-setup
> soap-setup
> cdi-setup
> jms-setup
> rest-setup
> jpa-setup
> faces-setup
> jstl-setup
> jta-setup
> constraint-setup
> {code}
> Most of these commands do not have parameters (except for persistence, rest, validation). So why not activate them by default (or only if {{export ACCEPT_DEFAULTS=true}} ) ? Something like : "if the command {{constraint-add}} is entered, Forge would go {{if constraint is not setup, then I invoke constraint-setup}}", "if the command {{ejb-new}} is entered, Forge would go {{if ejb is not setup, then I invoke ejb-setup}}"
> That would save some bugs (developers forgetting to setup things), less typing and shorter scripts.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 4 months
[JBoss JIRA] (FORGE-1574) JavaWebProjectType should have a more important priority than JavaProjectType
by George Gastaldi (JIRA)
George Gastaldi created FORGE-1574:
--------------------------------------
Summary: JavaWebProjectType should have a more important priority than JavaProjectType
Key: FORGE-1574
URL: https://issues.jboss.org/browse/FORGE-1574
Project: Forge
Issue Type: Feature Request
Components: Builtin Plugins
Affects Versions: 2.0.0.Final
Reporter: George Gastaldi
Assignee: George Gastaldi
Priority: Minor
Fix For: 2.0.1.Final
Usually Forge is used to create Web Application projects, so it's better to make the {{Java Web Application}} the first and default option in the {{project-new}} command.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 4 months
[JBoss JIRA] (FORGE-1572) forge --install doesn't work on Windows Powershell
by Adam Wyłuda (JIRA)
Adam Wyłuda created FORGE-1572:
----------------------------------
Summary: forge --install doesn't work on Windows Powershell
Key: FORGE-1572
URL: https://issues.jboss.org/browse/FORGE-1572
Project: Forge
Issue Type: Bug
Components: UI - Shell, Windows
Affects Versions: 2.0.0.Final
Environment: Windows 7 x64, Powershell 2.0
Reporter: Adam Wyłuda
Priority: Minor
Fix For: 2.x Future
It seems that comma character is preprocessed by Powershell before it executes command.
{code}
C:\Users\Adam\forge-workspace\core [master]> forge --install org.jboss.forge.add
on:core,2.0.1-SNAPSHOT
Unknown option: 2.0.1-SNAPSHOT
java.lang.RuntimeException: Failed to look up versions for [org.jboss.forge.addo
n:org.jboss.forge.addon:core]
at org.jboss.forge.furnace.manager.maven.addon.MavenAddonDependencyResol
ver.getVersions(MavenAddonDependencyResolver.java:269)
at org.jboss.forge.furnace.manager.maven.addon.MavenAddonDependencyResol
ver.resolveVersions(MavenAddonDependencyResolver.java:147)
at org.jboss.forge.bootstrap.Bootstrap.install(Bootstrap.java:229)
at org.jboss.forge.bootstrap.Bootstrap.<init>(Bootstrap.java:150)
at org.jboss.forge.bootstrap.Bootstrap.main(Bootstrap.java:93)
Caused by: java.lang.IllegalArgumentException: Bad artifact coordinates org.jbos
s.forge.addon:org.jboss.forge.addon:core:jar:forge-addon:[,), expected format is
<groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
at org.eclipse.aether.artifact.DefaultArtifact.<init>(DefaultArtifact.ja
va:68)
at org.eclipse.aether.artifact.DefaultArtifact.<init>(DefaultArtifact.ja
va:51)
at org.jboss.forge.furnace.manager.maven.addon.MavenAddonDependencyResol
ver.getVersions(MavenAddonDependencyResolver.java:262)
... 4 more
> Forge version [2.0.1-SNAPSHOT]
C:\Users\Adam\forge-workspace\core [master]>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 4 months