Hummm, running through a strange issue during build:

[ERROR] Failed to execute goal
org.xwiki.platform:xwiki-platform-tool-packager-plugin:4.5.2:package
(default) on project xwiki-contrib-mailarchive-test-tests: Failed to
resolve art
ifact
[org.xwiki.platform:xwiki-platform-tool-jetty-resources:zip:0.3-SNAPSHOT:]:
Failure to find
org.xwiki.platform:xwiki-platform-tool-jetty-resources:zip:0.3-SNAPSHOT in
http://
nexus.xwiki.org/nexus/content/groups/public-snapshots was cached in the
local repository, resolution will not be reattempted until the update
interval of xwiki-snapshots has elapse
d or updates are forced

4.5.2 is ${platform.version}, 0.3-SNAPSHOT is ${project.version}. The
packager plugin is declared in my pom in version ${platform.version} of
course.

Surprisingly though, here's an extract of the output of
"dependency:resolve-plugins":

[INFO] Plugin Resolved: xwiki-platform-tool-packager-plugin-4.5.2.jar
[...]
[INFO]     Plugin Dependency Resolved:
xwiki-platform-tool-jetty-resources-4.5.2.zip
[...]

Seems that it finds correct 4.5.2 version for same dependency, that it
doesn't find at runtime ... Maybe an issue on packager plugin, "invisible"
until you use it on a non-xwiki project ? :-)

BR,
Jeremie





2013/3/25 Jeremie BOUSQUET <jeremie.bousq...@gmail.com>

> Thanks Marius, that's exactly what I was looking for !
> I'll follow that practice,
>
> BR,
> Jeremie
>
>
> 2013/3/20 Marius Dumitru Florea <mariusdumitru.flo...@xwiki.com>
>
>> Hi Jeremie,
>>
>> We have started moving functional tests from xwiki-enterprise to
>> xwiki-platform so that they are grouped by functional domain. Thus
>> xwiki-enterprise-test-ui is not the best example. You should take a
>> look at the platform modules that have functional tests:
>>
>>
>> https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-administration
>>
>> https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-faq
>>
>> https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-index
>>
>> to name a few. The packager maven plugin is taking care of importing
>> (installing) your XAR and (I believe) adding the required jar
>> dependencies to the WAR. You should follow this practice.
>>
>> Hope this helps,
>> Marius
>>
>> On Wed, Mar 20, 2013 at 1:07 PM, Jeremie BOUSQUET
>> <jeremie.bousq...@gmail.com> wrote:
>> > Hello,
>> >
>> > I would like to discuss a little on writing of Selenium2 tests, as
>> > described in test strategy [1], ie use Selenium 2 and apply Page Objects
>> > pattern.
>> >
>> > My particular use-case is that I'm on a mission : write some functional
>> > tests for my mail archive application.
>> > I also think these would be the best tests for my app, as it greatly
>> relies
>> > on 2 external interfaces (xwiki for persistence/conf, javamail and mail
>> > accounts on another side). There are some good unit tests to write of
>> > course, but the main logic of the app has more meaning to be tested in
>> > "real life", or close to that.
>> >
>> > To do that, I decided to try and plug myself in xwiki test framework, in
>> > order to avoid redeveloping everything (such as deploying / launching an
>> > xwiki instance from the tests).
>> > I added 2 modules in my project:
>> > - xwiki-contrib-mailarchive-test-pageobjects
>> > - xwiki-contrib-mailarchive-test-ui
>> >
>> > Both inherit from org.xwiki.enterprise:xwiki-enterprise-test pom, and
>> are
>> > greatly inspired from poms of xwiki-enterprise-test-pageobjects and
>> > xwiki-enterprise-test-ui poms.
>> > It's unfinished and untested, but I believe I'll be able to have xwiki
>> > instance installed, launched, and tests run automatically.
>> >
>> > My main question, is how should I do in order to also deploy my app in
>> this
>> > wiki instance prior to run the tests ?
>> > For now I have several possible solutions that come to my mind, but I
>> don't
>> > know what would be the best... :
>> > A-
>> >   - grab xwiki-standalone zip version x.y.z, unzip it, launch it
>> >   - make EM install my application (call some REST API ? GET some page
>> with
>> > proper parameters ?)
>> >   - run the tests
>> > B-
>> >   - grab xwiki-standalone zip version x.y.z, unzip it
>> >   - "patch" it in some way with my application binaries, (ie, add things
>> > directly under permanent directory / extension / repository ?)
>> >   - launch it and run the tests
>> >
>> > I personnally prefer A-, but it supposes also that the xwiki instance
>> knows
>> > any of my "dev" maven repositories (either my local repository .m2, or
>> my
>> > local instance of Nexus), so it would mean an additional step would be
>> to
>> > "patch" the standalone wiki xwiki.properties to add my personal repo.
>> > Or maybe I can add such repo programmatically in the wiki instance from
>> > java by looking up and using the right component ?
>> >
>> > Maybe this point has already been solved by anyone, so if you have any
>> > samples it would be good enough. I did not search exhaustively, but I
>> don't
>> > remember having seen such use-cases on existing extensions on github.
>> > Also, I think it might be interesting to extract from all this some
>> kind of
>> > maven archetype for functional testing of UI extension ? So contributors
>> > could just call the archetype and get everything properly prepared, and
>> > just have to add page objects and tests for their app ...
>> >
>> > WDYT ?
>> >
>> > BR,
>> > Jeremie
>> >
>> >
>> > [1]
>> >
>> http://dev.xwiki.org/xwiki/bin/view/Community/Testing#HSelenium2-basedFramework
>> > _______________________________________________
>> > users mailing list
>> > users@xwiki.org
>> > http://lists.xwiki.org/mailman/listinfo/users
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to