[
https://issues.jboss.org/browse/FORGE-1045?page=com.atlassian.jira.plugin...
]
Lincoln Baxter III commented on FORGE-1045:
-------------------------------------------
I'm not sure actually. I think that the ClasspathWorkspaceReader should be able to
figure this out based on what's added. We can close this issue, but a new bug should
be reopened for this problem.
Unit tests should not have a fixed version
------------------------------------------
Key: FORGE-1045
URL:
https://issues.jboss.org/browse/FORGE-1045
Project: Forge
Issue Type: Enhancement
Components: Test Harness
Affects Versions: 2.0.0.Alpha7
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.0.0.Alpha10
Tests now depend on 2.0.0-SNAPSHOT, which may fail when a new version of the addon
dependency is released.
We should find some way to avoid declaring the addon dependencies version directly in the
Java class.
Excerpt from IRC:
{quote}
<gastaldi> lincolnthree, about the version in the dependencies
<gastaldi> in the tests
<lincolnthree> yes
<gastaldi> What if we consider that if no @Dependencies annotation were provided it
should use the pom's dependencies ?
<lincolnthree> can't do that
<gastaldi> why ?
<lincolnthree> because you should be able to depend on dependencies that don't
exist
<lincolnthree> without having to remove them from the pom
<lincolnthree> it's a valid failure scenario (laughs at that wording)
<lincolnthree> so we need to be able to test it
<lincolnthree> gastaldi: i would much prefer setting the version to
"POM"
<lincolnthree> or omitting the version entirely
<lincolnthree> from the @AddonDependency annotation
<gastaldi> I think it's already optional, no ?
<lincolnthree> it is
<lincolnthree> and the default is LATEST
<lincolnthree> default should probably be POM, which we should intercept and
replace with the pom version
<lincolnthree> or throw a deployment exception if it could not be resolved
<gastaldi> I see
<lincolnthree> thoughts?
<gastaldi> What about the AddonDependencyEntry.create statements ?
<gastaldi> sounds fair so far
<gastaldi> we could introduce a new method in ForgeArchive
<gastaldi> addAddonDependenciesAsDeclaredInPOMForGodsSake()
<lincolnthree> ah… right
<lincolnthree> well
<lincolnthree> the version there doesn't matter, remember?
<lincolnthree> so we could actually make the version optional
<lincolnthree> it could default to "anything"
<gastaldi> so so we need a AnythingGoesVersion implements Version subclass
<gastaldi> an enum
<gastaldi> public enum Anything implements Version { INSTANCE;}
<gastaldi> hum, or the version could be empty, right
<gastaldi> in that case there is already the EmptyVersion class
<lincolnthree> right
{quote}
--
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