[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III commented on FORGE-1790:
-------------------------------------------
[~ozizka] That isn't really a solution, more of a workaround. This needs to be addressed in the Forge test-harness API.
In order to fix this, we need to:
* Copy @AddonDependency to @AddonDeployment
* Deprecate existing @AddonDependency() annotation:
* Create a new @AddonDeployment annotation:
{code}
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AddonDeployment
{
/** The {@link AddonId} coordinates.
String name();
/** Whether or not the specified addon should be imported as a dependency to the current @Deployment. **/
boolean imported();
/** Whether or not the specified addon should be exported to dependencies of the current @Deployment. **/
boolean exported();
/** Whether or not the specified addon should be marked as an optional dependency of the current @Deployment. **/
boolean optional();
/**
* If version is empty, resolve to the version specified in the pom.xml of the project being tested
*/
String version() default "";
}
{code}
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Components: Test Harness
> Affects Versions: 2.13.1.Final
> Reporter: Ondrej Zizka
> Assignee: George Gastaldi
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Ondrej Zizka edited comment on FORGE-1790 at 1/26/15 2:11 PM:
--------------------------------------------------------------
How about this:
{code:java}
private static <T> AddonDependencyEntry[] classToAddonDepEntries(final Class<T> cls)
{
AddonDependency[] annDeps = cls.getAnnotation(Dependencies.class).value();
AddonDependencyEntry[] entries = new AddonDependencyEntry[annDeps.length];
for( int i = 0; i < annDeps.length; i++ )
{
AddonDependency annDep = annDeps[i];
entries[i] = AddonDependencyEntry.create(annDep.name());
}
return entries;
}
{code}
{code:java}
@Deployment
@Dependencies({
@AddonDependency(name = "org.jboss.windup.config:windup-config"),
@AddonDependency(name = "org.jboss.windup.exec:windup-exec"),
@AddonDependency(name = "org.jboss.windup.utils:utils"),
@AddonDependency(name = "org.jboss.windup.rules.apps:rules-java"),
//@AddonDependency(name = "org.jboss.windup.reporting:windup-reporting"),
@AddonDependency(name = "org.jboss.windup.quickstarts:windup-skiparchives"),
@AddonDependency(name = "org.jboss.forge.furnace.container:cdi"),
})
public static ForgeArchive getDeployment()
{
AddonDependencyEntry[] entries = copyAddonDeps(SkipArchRulesetTest.class);
final ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
.addBeansXML()
.addPackages(true, SkipArchRulesetTest.class.getPackage())
.addAsAddonDependencies(copyAddonDeps(SkipArchRulesetTest.class));
return archive;
}
{code}
was (Author: ozizka):
How about this:
{code:java}
private static <T> AddonDependencyEntry[] classToAddonDepEntries(final Class<T> cls)
{
AddonDependency[] annDeps = cls.getAnnotation(Dependencies.class).value();
AddonDependencyEntry[] entries = new AddonDependencyEntry[annDeps.length];
for( int i = 0; i < annDeps.length; i++ )
{
AddonDependency annDep = annDeps[i];
entries[i] = AddonDependencyEntry.create(annDep.name());
}
return entries;
}
{code}
{code:java}
@Deployment
@Dependencies({
@AddonDependency(name = "org.jboss.windup.config:windup-config"),
@AddonDependency(name = "org.jboss.windup.exec:windup-exec"),
@AddonDependency(name = "org.jboss.windup.utils:utils"),
@AddonDependency(name = "org.jboss.windup.rules.apps:rules-java"),
//@AddonDependency(name = "org.jboss.windup.reporting:windup-reporting"),
@AddonDependency(name = "org.jboss.windup.quickstarts:windup-skiparchives"),
@AddonDependency(name = "org.jboss.forge.furnace.container:cdi"),
})
public static ForgeArchive getDeployment()
{
AddonDependencyEntry[] entries = classToAddonDepEntries(SkipArchRulesetTest.class);
final ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
.addBeansXML()
.addPackages(true, SkipArchRulesetTest.class.getPackage())
.addAsAddonDependencies(classToAddonDepEntries(SkipArchRulesetTest.class));
return archive;
}
{code}
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Components: Test Harness
> Affects Versions: 2.13.1.Final
> Reporter: Ondrej Zizka
> Assignee: George Gastaldi
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Ondrej Zizka edited comment on FORGE-1790 at 1/26/15 2:11 PM:
--------------------------------------------------------------
How about this:
{code:java}
private static <T> AddonDependencyEntry[] copyAddonDeps(final Class<T> cls)
{
AddonDependency[] annDeps = cls.getAnnotation(Dependencies.class).value();
AddonDependencyEntry[] entries = new AddonDependencyEntry[annDeps.length];
for( int i = 0; i < annDeps.length; i++ )
{
AddonDependency annDep = annDeps[i];
entries[i] = AddonDependencyEntry.create(annDep.name());
}
return entries;
}
{code}
{code:java}
@Deployment
@Dependencies({
@AddonDependency(name = "org.jboss.windup.config:windup-config"),
@AddonDependency(name = "org.jboss.windup.exec:windup-exec"),
@AddonDependency(name = "org.jboss.windup.utils:utils"),
@AddonDependency(name = "org.jboss.windup.rules.apps:rules-java"),
//@AddonDependency(name = "org.jboss.windup.reporting:windup-reporting"),
@AddonDependency(name = "org.jboss.windup.quickstarts:windup-skiparchives"),
@AddonDependency(name = "org.jboss.forge.furnace.container:cdi"),
})
public static ForgeArchive getDeployment()
{
final ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
.addBeansXML()
.addPackages(true, SkipArchRulesetTest.class.getPackage())
.addAsAddonDependencies(copyAddonDeps(SkipArchRulesetTest.class));
return archive;
}
{code}
was (Author: ozizka):
How about this:
{code:java}
private static <T> AddonDependencyEntry[] classToAddonDepEntries(final Class<T> cls)
{
AddonDependency[] annDeps = cls.getAnnotation(Dependencies.class).value();
AddonDependencyEntry[] entries = new AddonDependencyEntry[annDeps.length];
for( int i = 0; i < annDeps.length; i++ )
{
AddonDependency annDep = annDeps[i];
entries[i] = AddonDependencyEntry.create(annDep.name());
}
return entries;
}
{code}
{code:java}
@Deployment
@Dependencies({
@AddonDependency(name = "org.jboss.windup.config:windup-config"),
@AddonDependency(name = "org.jboss.windup.exec:windup-exec"),
@AddonDependency(name = "org.jboss.windup.utils:utils"),
@AddonDependency(name = "org.jboss.windup.rules.apps:rules-java"),
//@AddonDependency(name = "org.jboss.windup.reporting:windup-reporting"),
@AddonDependency(name = "org.jboss.windup.quickstarts:windup-skiparchives"),
@AddonDependency(name = "org.jboss.forge.furnace.container:cdi"),
})
public static ForgeArchive getDeployment()
{
AddonDependencyEntry[] entries = copyAddonDeps(SkipArchRulesetTest.class);
final ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
.addBeansXML()
.addPackages(true, SkipArchRulesetTest.class.getPackage())
.addAsAddonDependencies(copyAddonDeps(SkipArchRulesetTest.class));
return archive;
}
{code}
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Components: Test Harness
> Affects Versions: 2.13.1.Final
> Reporter: Ondrej Zizka
> Assignee: George Gastaldi
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1790:
--------------------------------
Affects Version/s: 2.13.1.Final
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Affects Versions: 2.13.1.Final
> Reporter: Ondrej Zizka
> Assignee: George Gastaldi
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Ondrej Zizka updated FORGE-1790:
--------------------------------
Component/s: Test Harness
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Components: Test Harness
> Affects Versions: 2.13.1.Final
> Reporter: Ondrej Zizka
> Assignee: George Gastaldi
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Ondrej Zizka reopened FORGE-1790:
---------------------------------
Assignee: George Gastaldi
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Reporter: Ondrej Zizka
> Assignee: George Gastaldi
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Ondrej Zizka commented on FORGE-1790:
-------------------------------------
(For the cases when the two lists are identical, which is most, at least in Windup)
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Reporter: Ondrej Zizka
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-1790) Make adding addon deps easier in getDeployment().
by Ondrej Zizka (JIRA)
[ https://issues.jboss.org/browse/FORGE-1790?page=com.atlassian.jira.plugin... ]
Ondrej Zizka commented on FORGE-1790:
-------------------------------------
How about this:
{code:java}
private static <T> AddonDependencyEntry[] classToAddonDepEntries(final Class<T> cls)
{
AddonDependency[] annDeps = cls.getAnnotation(Dependencies.class).value();
AddonDependencyEntry[] entries = new AddonDependencyEntry[annDeps.length];
for( int i = 0; i < annDeps.length; i++ )
{
AddonDependency annDep = annDeps[i];
entries[i] = AddonDependencyEntry.create(annDep.name());
}
return entries;
}
{code}
{code:java}
@Deployment
@Dependencies({
@AddonDependency(name = "org.jboss.windup.config:windup-config"),
@AddonDependency(name = "org.jboss.windup.exec:windup-exec"),
@AddonDependency(name = "org.jboss.windup.utils:utils"),
@AddonDependency(name = "org.jboss.windup.rules.apps:rules-java"),
//@AddonDependency(name = "org.jboss.windup.reporting:windup-reporting"),
@AddonDependency(name = "org.jboss.windup.quickstarts:windup-skiparchives"),
@AddonDependency(name = "org.jboss.forge.furnace.container:cdi"),
})
public static ForgeArchive getDeployment()
{
AddonDependencyEntry[] entries = classToAddonDepEntries(SkipArchRulesetTest.class);
final ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
.addBeansXML()
.addPackages(true, SkipArchRulesetTest.class.getPackage())
.addAsAddonDependencies(classToAddonDepEntries(SkipArchRulesetTest.class));
return archive;
}
{code}
> Make adding addon deps easier in getDeployment().
> -------------------------------------------------
>
> Key: FORGE-1790
> URL: https://issues.jboss.org/browse/FORGE-1790
> Project: Forge
> Issue Type: Feature Request
> Reporter: Ondrej Zizka
>
> Currently, the deps need to be stated twice - once in annotations, and then in getDeployment(). If getDeployment() wasn't static, one could get that using reflection. But Arquillian needs getDeployment static.
> This also limits usage of subclassing, because subclass can't add dependencies to it's parent.
> Would be nice to come up with some solution to this.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-2202) Provide formatter configuration when using Forge
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2202?page=com.atlassian.jira.plugin... ]
George Gastaldi reassigned FORGE-2202:
--------------------------------------
Assignee: George Gastaldi
> Provide formatter configuration when using Forge
> ------------------------------------------------
>
> Key: FORGE-2202
> URL: https://issues.jboss.org/browse/FORGE-2202
> Project: Forge
> Issue Type: Feature Request
> Components: Builtin Plugins, Configuration, Parsers / File Manipulation
> Affects Versions: 2.x Future
> Reporter: Ivan St. Ivanov
> Assignee: George Gastaldi
> Fix For: 2.x Future
>
>
> When Forge generates code it formats it with the current Forge [Eclipse-based] formatter: 3 spaces indentation and opening braces on the next line. As mentioned by George in the mailing list, if you develop an addon, it is possible to control that via the Roaster API by calling Roaster.format() passing as an argument the Eclipse formatter profile XML.
> However, it would be a good idea if I am just a Forge user to be able to configure the already existing addons that generate code (e.g. the new entity command) to use a formatter that I have provided, so that the generated code follows the code conventions adopted in the project/team I work in
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months