[JBoss JIRA] (FORGE-2273) MavenFacet - Write properties sorted A..Z
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2273?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2273:
-----------------------------------
Issue Type: Enhancement (was: Feature Request)
> MavenFacet - Write properties sorted A..Z
> -----------------------------------------
>
> Key: FORGE-2273
> URL: https://issues.jboss.org/browse/FORGE-2273
> Project: Forge
> Issue Type: Enhancement
> Components: Build Tools - Maven
> Affects Versions: 2.15.0.Final
> Reporter: Claus Ibsen
> Priority: Minor
> Labels: Starter
> Fix For: 2.x Future
>
>
> We have a custom addon that adds various commands.
> We have a docket setup command that enables docker to a maven project. And for that we set some values in the <properties> section of the maven pom.xml.
> To update and set those, we use the following code:
> {code}
> // update properties section in pom.xml
> MavenFacet maven = project.getFacet(MavenFacet.class);
> Model pom = maven.getModel();
> Properties properties = pom.getProperties();
> properties.put("docker.registryPrefix", "${env.DOCKER_REGISTRY}/");
> properties.put("docker.from", fromImage);
> properties.put("docker.image", "${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}");
> properties.put("docker.assemblyDescriptorRef", descriptorRef);
> properties.put("docker.port.container.jolokia", "8778");
> if (war) {
> properties.put("docker.port.container.http", "8080");
> }
> // to save then set the model
> maven.setModel(pom);
> {code}
> Which then generates the following in the pom.xml
> {code}
> <properties>
> <docker.port.container.http>8080</docker.port.container.http>
> <docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
> <docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
> <maven.compiler.target>1.7</maven.compiler.target>
> <docker.port.container.jolokia>8778</docker.port.container.jolokia>
> <docker.from>fabric8/tomcat-8.0</docker.from>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <docker.assemblyDescriptorRef>rootWar</docker.assemblyDescriptorRef>
> <maven.compiler.source>1.7</maven.compiler.source>
> </properties>
> {code}
> Notice the order of the properties is "random". It would be great if forge would sort the properties A..Z so they are more human readable.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2273) MavenFacet - Write properties sorted A..Z
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2273?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2273:
-----------------------------------
Priority: Minor (was: Major)
> MavenFacet - Write properties sorted A..Z
> -----------------------------------------
>
> Key: FORGE-2273
> URL: https://issues.jboss.org/browse/FORGE-2273
> Project: Forge
> Issue Type: Feature Request
> Components: Build Tools - Maven
> Affects Versions: 2.15.0.Final
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 2.x Future
>
>
> We have a custom addon that adds various commands.
> We have a docket setup command that enables docker to a maven project. And for that we set some values in the <properties> section of the maven pom.xml.
> To update and set those, we use the following code:
> {code}
> // update properties section in pom.xml
> MavenFacet maven = project.getFacet(MavenFacet.class);
> Model pom = maven.getModel();
> Properties properties = pom.getProperties();
> properties.put("docker.registryPrefix", "${env.DOCKER_REGISTRY}/");
> properties.put("docker.from", fromImage);
> properties.put("docker.image", "${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}");
> properties.put("docker.assemblyDescriptorRef", descriptorRef);
> properties.put("docker.port.container.jolokia", "8778");
> if (war) {
> properties.put("docker.port.container.http", "8080");
> }
> // to save then set the model
> maven.setModel(pom);
> {code}
> Which then generates the following in the pom.xml
> {code}
> <properties>
> <docker.port.container.http>8080</docker.port.container.http>
> <docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
> <docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
> <maven.compiler.target>1.7</maven.compiler.target>
> <docker.port.container.jolokia>8778</docker.port.container.jolokia>
> <docker.from>fabric8/tomcat-8.0</docker.from>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <docker.assemblyDescriptorRef>rootWar</docker.assemblyDescriptorRef>
> <maven.compiler.source>1.7</maven.compiler.source>
> </properties>
> {code}
> Notice the order of the properties is "random". It would be great if forge would sort the properties A..Z so they are more human readable.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2273) MavenFacet - Write properties sorted A..Z
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2273?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2273:
-----------------------------------
Fix Version/s: 2.x Future
> MavenFacet - Write properties sorted A..Z
> -----------------------------------------
>
> Key: FORGE-2273
> URL: https://issues.jboss.org/browse/FORGE-2273
> Project: Forge
> Issue Type: Feature Request
> Components: Build Tools - Maven
> Affects Versions: 2.15.0.Final
> Reporter: Claus Ibsen
> Fix For: 2.x Future
>
>
> We have a custom addon that adds various commands.
> We have a docket setup command that enables docker to a maven project. And for that we set some values in the <properties> section of the maven pom.xml.
> To update and set those, we use the following code:
> {code}
> // update properties section in pom.xml
> MavenFacet maven = project.getFacet(MavenFacet.class);
> Model pom = maven.getModel();
> Properties properties = pom.getProperties();
> properties.put("docker.registryPrefix", "${env.DOCKER_REGISTRY}/");
> properties.put("docker.from", fromImage);
> properties.put("docker.image", "${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}");
> properties.put("docker.assemblyDescriptorRef", descriptorRef);
> properties.put("docker.port.container.jolokia", "8778");
> if (war) {
> properties.put("docker.port.container.http", "8080");
> }
> // to save then set the model
> maven.setModel(pom);
> {code}
> Which then generates the following in the pom.xml
> {code}
> <properties>
> <docker.port.container.http>8080</docker.port.container.http>
> <docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
> <docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
> <maven.compiler.target>1.7</maven.compiler.target>
> <docker.port.container.jolokia>8778</docker.port.container.jolokia>
> <docker.from>fabric8/tomcat-8.0</docker.from>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <docker.assemblyDescriptorRef>rootWar</docker.assemblyDescriptorRef>
> <maven.compiler.source>1.7</maven.compiler.source>
> </properties>
> {code}
> Notice the order of the properties is "random". It would be great if forge would sort the properties A..Z so they are more human readable.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2273) MavenFacet - Write properties sorted A..Z
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2273?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2273:
-----------------------------------
Component/s: Build Tools - Maven
> MavenFacet - Write properties sorted A..Z
> -----------------------------------------
>
> Key: FORGE-2273
> URL: https://issues.jboss.org/browse/FORGE-2273
> Project: Forge
> Issue Type: Feature Request
> Components: Build Tools - Maven
> Affects Versions: 2.15.0.Final
> Reporter: Claus Ibsen
> Fix For: 2.x Future
>
>
> We have a custom addon that adds various commands.
> We have a docket setup command that enables docker to a maven project. And for that we set some values in the <properties> section of the maven pom.xml.
> To update and set those, we use the following code:
> {code}
> // update properties section in pom.xml
> MavenFacet maven = project.getFacet(MavenFacet.class);
> Model pom = maven.getModel();
> Properties properties = pom.getProperties();
> properties.put("docker.registryPrefix", "${env.DOCKER_REGISTRY}/");
> properties.put("docker.from", fromImage);
> properties.put("docker.image", "${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}");
> properties.put("docker.assemblyDescriptorRef", descriptorRef);
> properties.put("docker.port.container.jolokia", "8778");
> if (war) {
> properties.put("docker.port.container.http", "8080");
> }
> // to save then set the model
> maven.setModel(pom);
> {code}
> Which then generates the following in the pom.xml
> {code}
> <properties>
> <docker.port.container.http>8080</docker.port.container.http>
> <docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
> <docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
> <maven.compiler.target>1.7</maven.compiler.target>
> <docker.port.container.jolokia>8778</docker.port.container.jolokia>
> <docker.from>fabric8/tomcat-8.0</docker.from>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <docker.assemblyDescriptorRef>rootWar</docker.assemblyDescriptorRef>
> <maven.compiler.source>1.7</maven.compiler.source>
> </properties>
> {code}
> Notice the order of the properties is "random". It would be great if forge would sort the properties A..Z so they are more human readable.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2273) MavenFacet - Write properties sorted A..Z
by Claus Ibsen (JIRA)
Claus Ibsen created FORGE-2273:
----------------------------------
Summary: MavenFacet - Write properties sorted A..Z
Key: FORGE-2273
URL: https://issues.jboss.org/browse/FORGE-2273
Project: Forge
Issue Type: Feature Request
Affects Versions: 2.15.0.Final
Reporter: Claus Ibsen
We have a custom addon that adds various commands.
We have a docket setup command that enables docker to a maven project. And for that we set some values in the <properties> section of the maven pom.xml.
To update and set those, we use the following code:
{code}
// update properties section in pom.xml
MavenFacet maven = project.getFacet(MavenFacet.class);
Model pom = maven.getModel();
Properties properties = pom.getProperties();
properties.put("docker.registryPrefix", "${env.DOCKER_REGISTRY}/");
properties.put("docker.from", fromImage);
properties.put("docker.image", "${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}");
properties.put("docker.assemblyDescriptorRef", descriptorRef);
properties.put("docker.port.container.jolokia", "8778");
if (war) {
properties.put("docker.port.container.http", "8080");
}
// to save then set the model
maven.setModel(pom);
{code}
Which then generates the following in the pom.xml
{code}
<properties>
<docker.port.container.http>8080</docker.port.container.http>
<docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
<docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
<maven.compiler.target>1.7</maven.compiler.target>
<docker.port.container.jolokia>8778</docker.port.container.jolokia>
<docker.from>fabric8/tomcat-8.0</docker.from>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<docker.assemblyDescriptorRef>rootWar</docker.assemblyDescriptorRef>
<maven.compiler.source>1.7</maven.compiler.source>
</properties>
{code}
Notice the order of the properties is "random". It would be great if forge would sort the properties A..Z so they are more human readable.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2233) Documenting how to create and test a command that updates Java code
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2233?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2233:
-------------------------------------
Description:
The idea is to document commands that add new code to existing classes ({{add}} commands). Example, the command to add a [CDI producer|FORGE-2079] or add a [CDI injection point|FORGE-2226]
Draft notes from #IRC
gastaldi UIContext.getInitialSelection() should return a UISelection of Resource objects
gastaldi Call get() on it and you should have a JavaResource if the command is executed in the context of a java class
gastaldi Make it the default value of the targetClass field
agoncal What does the Callable do in the initializeUI method do then ?
gastaldi That should be used when the value changes over the UI interaction
gastaldi That is not the case afaik
gastaldi Because once you execute the command, the initial selection will not change
was:The idea is to document commands that add new code to existing classes ({{add}} commands). Example, the command to add a [CDI producer|FORGE-2079] or add a [CDI injection point|FORGE-2226]
> Documenting how to create and test a command that updates Java code
> -------------------------------------------------------------------
>
> Key: FORGE-2233
> URL: https://issues.jboss.org/browse/FORGE-2233
> Project: Forge
> Issue Type: Sub-task
> Components: Documentation
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 2.x Future
>
>
> The idea is to document commands that add new code to existing classes ({{add}} commands). Example, the command to add a [CDI producer|FORGE-2079] or add a [CDI injection point|FORGE-2226]
> Draft notes from #IRC
> gastaldi UIContext.getInitialSelection() should return a UISelection of Resource objects
> gastaldi Call get() on it and you should have a JavaResource if the command is executed in the context of a java class
> gastaldi Make it the default value of the targetClass field
> agoncal What does the Callable do in the initializeUI method do then ?
> gastaldi That should be used when the value changes over the UI interaction
> gastaldi That is not the case afaik
> gastaldi Because once you execute the command, the initial selection will not change
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years
[JBoss JIRA] (FORGE-2226) Being able to add a CDI injection point
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2226?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2226:
-------------------------------------
Description:
It would be useful to have a command to add a new CDI injection point to an existing bean. A command such as :
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger
{code}
Would add to an existing class the following code :
{code}
@Inject
private Logger logger;
{code}
A qualifier could be added with:
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --qualifiers Debug Trace
{code}
Would add to an existing class the following code :
{code}
@Inject @Debug @Trace
private Logger logger;
{code}
was:
It would be useful to have a command to add a new CDI injection point to an existing bean. A command such as :
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger
{code}
Would add to an existing class the following code :
{code}
@Inject
private Logger logger;
{code}
A qualifier could be added with:
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --qualifier Debug
{code}
Would add to an existing class the following code :
{code}
@Inject @Debug
private Logger logger;
{code}
> Being able to add a CDI injection point
> ---------------------------------------
>
> Key: FORGE-2226
> URL: https://issues.jboss.org/browse/FORGE-2226
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> It would be useful to have a command to add a new CDI injection point to an existing bean. A command such as :
> {code}
> cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger
> {code}
> Would add to an existing class the following code :
> {code}
> @Inject
> private Logger logger;
> {code}
> A qualifier could be added with:
> {code}
> cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --qualifiers Debug Trace
> {code}
> Would add to an existing class the following code :
> {code}
> @Inject @Debug @Trace
> private Logger logger;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month
[JBoss JIRA] (FORGE-2226) Being able to add a CDI injection point
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2226?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2226:
-------------------------------------
Description:
It would be useful to have a command to add a new CDI injection point to an existing bean. A command such as :
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger
{code}
Would add to an existing class the following code :
{code}
@Inject
private Logger logger;
{code}
A qualifier could be added with:
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --qualifier Debug
{code}
Would add to an existing class the following code :
{code}
@Inject @Debug
private Logger logger;
{code}
was:
It would be useful to have a command to add a new CDI injection point to an existing bean. A command such as :
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --accessType private
{code}
Would add to an existing class the following code :
{code}
@Inject
private Logger logger;
{code}
Private is the default access type and can be omited. A qualifier could be added with:
{code}
cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --qualifier Debug
{code}
Would add to an existing class the following code :
{code}
@Inject @Debug
private Logger logger;
{code}
> Being able to add a CDI injection point
> ---------------------------------------
>
> Key: FORGE-2226
> URL: https://issues.jboss.org/browse/FORGE-2226
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> It would be useful to have a command to add a new CDI injection point to an existing bean. A command such as :
> {code}
> cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger
> {code}
> Would add to an existing class the following code :
> {code}
> @Inject
> private Logger logger;
> {code}
> A qualifier could be added with:
> {code}
> cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --qualifier Debug
> {code}
> Would add to an existing class the following code :
> {code}
> @Inject @Debug
> private Logger logger;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month
[JBoss JIRA] (FORGE-2226) Being able to add a CDI injection point
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2226?page=com.atlassian.jira.plugin... ]
Antonio Goncalves reassigned FORGE-2226:
----------------------------------------
Assignee: Antonio Goncalves
> Being able to add a CDI injection point
> ---------------------------------------
>
> Key: FORGE-2226
> URL: https://issues.jboss.org/browse/FORGE-2226
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.14.0.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.x Future
>
>
> It would be useful to have a command to add a new CDI injection point to an existing bean. A command such as :
> {code}
> cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --accessType private
> {code}
> Would add to an existing class the following code :
> {code}
> @Inject
> private Logger logger;
> {code}
> Private is the default access type and can be omited. A qualifier could be added with:
> {code}
> cdi-add-injection-point --named logger --type org.apache.logging.log4j.Logger --qualifier Debug
> {code}
> Would add to an existing class the following code :
> {code}
> @Inject @Debug
> private Logger logger;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month
[JBoss JIRA] (FORGE-2093) Being able to create a new JPA listener
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2093?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2093:
-----------------------------------
Status: Closed (was: Pull Request Sent)
Fix Version/s: 2.15.1.Final
(was: 2.x Future)
Resolution: Done
> Being able to create a new JPA listener
> ---------------------------------------
>
> Key: FORGE-2093
> URL: https://issues.jboss.org/browse/FORGE-2093
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.12.1.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.15.1.Final
>
>
> It would be good to be able to create a new JPA listener. A basic command could just be :
> {code}
> jpa-new-listener --named MyListener
> {code}
> This will generate the following code :
> {code}
> class MyListener {
> }
> {code}
> Then we would add as many lifecycle events as needed, something like :
> {code}
> jpa-new-listener --named MyListener --lifecycle PRE_PERSIST, POST_UPDATE, POST_REMOVE
> {code}
> {code}
> class MyListener {
> @PrePersist
> private void prePersist(Object object)
> {
> }
> @PostUpdate
> private void postUpdate(Object object)
> {
> }
> @PostRemove
> private void postRemove(Object object)
> {
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month