[JBoss JIRA] (FORGE-2071) Command java-new-package-info to create a new package-info.java class
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2071:
----------------------------------------
Summary: Command java-new-package-info to create a new package-info.java class
Key: FORGE-2071
URL: https://issues.jboss.org/browse/FORGE-2071
Project: Forge
Issue Type: Sub-task
Components: Parsers / File Manipulation
Affects Versions: 2.12.0.Final
Reporter: Antonio Goncalves
It would be good to have a command to create a {{package-info.java}} class. The command would just have a mandatory {{targetPackage}} attribute (no named). So something like that :
{code}
java-new-package-info --targetPackage foo.bar
{code}
Will create a the class under {{foo.bar.package-info.java}}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2067) The java-new-field generates getters/setters even if --generateGetter and --generateSetter are set to false
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2067?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2067:
------------------------------------------
In {{org.jboss.forge.addon.parser.java.ui.JavaFieldCommandImpl}} you have the following :
{code}
@Inject
@WithAttributes(label = "Generate Getter", description = "Generate accessor method", defaultValue = "true")
private UIInput<Boolean> generateGetter;
@Inject
@WithAttributes(label = "Generate Setter", description = "Generate mutator method", defaultValue = "true")
private UIInput<Boolean> generateSetter;
{code}
So the default value is {{true}}, which makes sense (by default you want getters/setters on your field). If we want the command to be intuitive (i.e. behaves like the other CLI commands), then we need something like that
{code}
java-new-field --named field4 --generateGetter false
{code}
> The java-new-field generates getters/setters even if --generateGetter and --generateSetter are set to false
> -----------------------------------------------------------------------------------------------------------
>
> Key: FORGE-2067
> URL: https://issues.jboss.org/browse/FORGE-2067
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 2.12.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ståle Pedersen
> Fix For: 2.x Future
>
>
> No matter if you set {{generateGetter}} or {{generateSetter}} to true or false, get/set are always generated. The following commands generate get/set (which is normal) :
> {code}
> java-new-class --named DatabaseProducer ;
> java-new-field --named em --type javax.persistence.EntityManager ;
> {code}
> But the following command should not generate get/set :
> {code}
> java-new-class --named DatabaseProducer ;
> java-new-field --named em --type javax.persistence.EntityManager --generateGetter false --generateSetter false ;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2070) Forge Arquillian doesn't respect -Dmaven.repo.local=... in tests
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-2070?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-2070:
--------------------------------
Description:
When using -Dmaven.repo.local, Forge Arquillian doesn't respect that and the build fails with something like WINDUP-329:
[FATAL] Non-resolvable parent POM for org.jboss.windup:windup-parent:2.0.0-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:14 due to Could not find artifact org.jboss:jboss-parent:pom:14 and 'parent.relativePath' points at wrong local POM
was:
When using -Dmaven.repo.local, Forge Arquillian doesn't respect that and the build fails with something like WINDUP-329:
[FATAL] Non-resolvable parent POM for org.jboss.windup:windup-parent:2.0.0-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:14 due to Could not find artifact org.jboss:jboss-par
ent:pom:14 and 'parent.relativePath' points at wrong local POM
> Forge Arquillian doesn't respect -Dmaven.repo.local=... in tests
> ----------------------------------------------------------------
>
> Key: FORGE-2070
> URL: https://issues.jboss.org/browse/FORGE-2070
> Project: Forge
> Issue Type: Bug
> Affects Versions: 2.12.0.Final
> Reporter: Ondrej Zizka
>
> When using -Dmaven.repo.local, Forge Arquillian doesn't respect that and the build fails with something like WINDUP-329:
> [FATAL] Non-resolvable parent POM for org.jboss.windup:windup-parent:2.0.0-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:14 due to Could not find artifact org.jboss:jboss-parent:pom:14 and 'parent.relativePath' points at wrong local POM
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2070) Forge Arquillian doesn't respect -Dmaven.repo.local=... in tests
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-2070?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-2070:
--------------------------------
Description:
When using -Dmaven.repo.local, Forge Arquillian doesn't respect that and the build fails with something like WINDUP-329:
[FATAL] Non-resolvable parent POM for org.jboss.windup:windup-parent:2.0.0-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:14 due to Could not find artifact org.jboss:jboss-par
ent:pom:14 and 'parent.relativePath' points at wrong local POM
was:
When using -Dmaven.repo.local, Forge Arquillian doesn't respect that and the build fails with something like WINDUP-329:
> Forge Arquillian doesn't respect -Dmaven.repo.local=... in tests
> ----------------------------------------------------------------
>
> Key: FORGE-2070
> URL: https://issues.jboss.org/browse/FORGE-2070
> Project: Forge
> Issue Type: Bug
> Affects Versions: 2.12.0.Final
> Reporter: Ondrej Zizka
>
> When using -Dmaven.repo.local, Forge Arquillian doesn't respect that and the build fails with something like WINDUP-329:
> [FATAL] Non-resolvable parent POM for org.jboss.windup:windup-parent:2.0.0-SNAPSHOT: Failed to resolve POM for org.jboss:jboss-parent:14 due to Could not find artifact org.jboss:jboss-par
> ent:pom:14 and 'parent.relativePath' points at wrong local POM
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2067) The java-new-field generates getters/setters even if --generateGetter and --generateSetter are set to false
by Ståle Pedersen (JIRA)
[ https://issues.jboss.org/browse/FORGE-2067?page=com.atlassian.jira.plugin... ]
Ståle Pedersen commented on FORGE-2067:
---------------------------------------
hi, it would seem like that property (generateGetter) is set to hasValue=false. if so specifying the option will set it to true, omitting it would set it to false.
if that property was set to have a value the above would happen as you describe.
> The java-new-field generates getters/setters even if --generateGetter and --generateSetter are set to false
> -----------------------------------------------------------------------------------------------------------
>
> Key: FORGE-2067
> URL: https://issues.jboss.org/browse/FORGE-2067
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 2.12.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ståle Pedersen
> Fix For: 2.x Future
>
>
> No matter if you set {{generateGetter}} or {{generateSetter}} to true or false, get/set are always generated. The following commands generate get/set (which is normal) :
> {code}
> java-new-class --named DatabaseProducer ;
> java-new-field --named em --type javax.persistence.EntityManager ;
> {code}
> But the following command should not generate get/set :
> {code}
> java-new-class --named DatabaseProducer ;
> java-new-field --named em --type javax.persistence.EntityManager --generateGetter false --generateSetter false ;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months
[JBoss JIRA] (FORGE-2067) The java-new-field generates getters/setters even if --generateGetter and --generateSetter are set to false
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2067?page=com.atlassian.jira.plugin... ]
Antonio Goncalves commented on FORGE-2067:
------------------------------------------
I would expect TAB completion to display true false choices like this :
{code}
java-new-field --named field4 --generateGetter <TAB>
true false
{code}
> The java-new-field generates getters/setters even if --generateGetter and --generateSetter are set to false
> -----------------------------------------------------------------------------------------------------------
>
> Key: FORGE-2067
> URL: https://issues.jboss.org/browse/FORGE-2067
> Project: Forge
> Issue Type: Bug
> Components: UI - Shell
> Affects Versions: 2.12.0.Final
> Reporter: Antonio Goncalves
> Assignee: Ståle Pedersen
> Fix For: 2.x Future
>
>
> No matter if you set {{generateGetter}} or {{generateSetter}} to true or false, get/set are always generated. The following commands generate get/set (which is normal) :
> {code}
> java-new-class --named DatabaseProducer ;
> java-new-field --named em --type javax.persistence.EntityManager ;
> {code}
> But the following command should not generate get/set :
> {code}
> java-new-class --named DatabaseProducer ;
> java-new-field --named em --type javax.persistence.EntityManager --generateGetter false --generateSetter false ;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 6 months