[JBoss JIRA] (FORGE-1268) MavenPomResource should extend XMLResource
by George Gastaldi (JIRA)
George Gastaldi created FORGE-1268:
--------------------------------------
Summary: MavenPomResource should extend XMLResource
Key: FORGE-1268
URL: https://issues.jboss.org/browse/FORGE-1268
Project: Forge
Issue Type: Feature Request
Components: Build Tools - Maven, Parsers / File Manipulation
Affects Versions: 2.0.0.Alpha13
Reporter: George Gastaldi
Fix For: 2.0.0.Alpha14
When MavenPomResource is requested from the ResourceFactory AND the parser-xml addon is installed, a XMLResource is returned instead, causing exceptions and returning null if the reify method is used.
Since a maven pom is a XML, the solution is to extend XMLResource.
--
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
11 years, 2 months
[JBoss JIRA] (FORGE-1268) MavenPomResource should extend XMLResource
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1268?page=com.atlassian.jira.plugin... ]
George Gastaldi reassigned FORGE-1268:
--------------------------------------
Assignee: George Gastaldi
> MavenPomResource should extend XMLResource
> ------------------------------------------
>
> Key: FORGE-1268
> URL: https://issues.jboss.org/browse/FORGE-1268
> Project: Forge
> Issue Type: Feature Request
> Components: Build Tools - Maven, Parsers / File Manipulation
> Affects Versions: 2.0.0.Alpha13
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Fix For: 2.0.0.Alpha14
>
>
> When MavenPomResource is requested from the ResourceFactory AND the parser-xml addon is installed, a XMLResource is returned instead, causing exceptions and returning null if the reify method is used.
> Since a maven pom is a XML, the solution is to extend XMLResource.
--
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
11 years, 2 months
[JBoss JIRA] (FORGE-1267) rest/ResourceGeneratorUtil generates bogus id name from Method
by Thomas Maslen (JIRA)
Thomas Maslen created FORGE-1267:
------------------------------------
Summary: rest/ResourceGeneratorUtil generates bogus id name from Method
Key: FORGE-1267
URL: https://issues.jboss.org/browse/FORGE-1267
Project: Forge
Issue Type: Bug
Components: Java EE APIs
Affects Versions: 2.0.0.Alpha13, 1.4.2.Final
Reporter: Thomas Maslen
Priority: Minor
The "rest endpoint-from-entity" command uses this class (ResourceGeneratorUtil).
Everything works fine if the @Id annotation is attached to a field.
However, if the @Id annotation is attached to the setXYZ() or getXYZ() method, ResourceGeneratorUtil ends up producing an incorrect name for the id property: the name should be "xyz" but this class incorrectly produces "txyz".
The problem is that the code in ResourceGeneratorUtil invokes substring(2) when it should actually have used substring(3). One site in the class correctly uses substring(3) but there are four other sites that use substring(2).
The workaround is to attach @Id to the field, not to the setter or getter methods.
Probably this bug has lain low because (a) the "entity" command always attaches @Id to the field, and (b) the JBoss Tools "New JPA Entity" wizard has an "Access Type" radio button that defaults to using the field, so the bug is only triggered if you explicitly change the radio button (or use an editor to attach the @Id annotation).
--
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
11 years, 3 months
[JBoss JIRA] (FORGE-1261) "rest endpoint-from-entity" fails, ClassNotFoundException: org.apache.log4j.Priority
by Thomas Maslen (JIRA)
[ https://issues.jboss.org/browse/FORGE-1261?page=com.atlassian.jira.plugin... ]
Thomas Maslen commented on FORGE-1261:
--------------------------------------
Yup, 1.4.2 looks much happier, thanks.
> "rest endpoint-from-entity" fails, ClassNotFoundException: org.apache.log4j.Priority
> ------------------------------------------------------------------------------------
>
> Key: FORGE-1261
> URL: https://issues.jboss.org/browse/FORGE-1261
> Project: Forge
> Issue Type: Bug
> Components: Plugin API
> Affects Versions: 1.4.1.Final
> Environment: (Environment-independent, but...) JDK 1.6.0_45, Windows Server 2008 R2
> Reporter: Thomas Maslen
> Assignee: George Gastaldi
> Priority: Minor
> Fix For: 1.4.2.Final
>
>
> Summary: the org.freemarker module should express a dependency on org.apache.log4j but doesn't
> Workaround: edit modules/org/freemarker/main/module.xml and add the dependency
> The long version:
> "rest endpoint-from-entity" works fine in the version of Forge that is bundled in JBoss Tools 4.1 (Forge 1.3.3).
> However, the DTO-based functionality added in FORGE-1060 looked tasty, so I downloaded Forge 1.4.1 and took it for a spin.
> Regardless of whether I run 1.4.1 standalone or within JBoss Tools (Eclipse), "rest endpoint-from-entity" fails with
> java.lang.ClassNotFoundException: org.apache.log4j.Priority from [Module "org.freemarker:main"
> (I have a complete stack trace but it doesn't add anything profound).
> Once I edited modules/org/freemarker/main/module.xml and added a dependency for the "org.apache.log4j" class, "rest endpoint-from-entity" ran happily and generated the expected classes.
--
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
11 years, 3 months