[JBoss JIRA] (FORGE-1045) Unit tests should not have a fixed version
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1045?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1045:
----------------------------------------
Given that the reactor build is not sharing state with the dependency resolution provided by the furnace-manager-resolver-maven implementation, the best solution is to change the release:prepare goals to perform _clean install_ as explained above. Other solutions could involve adding a new goal to the furnace-maven-plugin, however I believe that changing the release:prepare goals should be enough.
> 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
10 years, 11 months
[JBoss JIRA] (FORGE-1045) Unit tests should not have a fixed version
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1045?page=com.atlassian.jira.plugin... ]
Work on FORGE-1045 started by George Gastaldi.
> 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
10 years, 11 months