-
Enhancement
-
Resolution: Done
-
Major
-
2.0.0.Alpha7
-
None
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:
<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 VersionUnknown macro: { INSTANCE;}<gastaldi> hum, or the version could be empty, right
<gastaldi> in that case there is already the EmptyVersion class
<lincolnthree> right