Thanks !
Jeremie
2013/3/28 Thomas Mortagne <thomas.mortagne(a)xwiki.com>
On Thu, Mar 28, 2013 at 2:36 PM, Jeremie BOUSQUET
<jeremie.bousquet(a)gmail.com> wrote:
Hi,
I proposed a pull request to fix XWIKI-8960:
https://github.com/xwiki/xwiki-platform/pull/89
Seems to work well, and I added an IT test to check it. I'm not sure of
the
naming though ...
It's my first pull request so I hope I did things correctly :-)
Looks good to me, applied it.
Br,
Jeremie
2013/3/27 Marius Dumitru Florea <mariusdumitru.florea(a)xwiki.com>
> On Tue, Mar 26, 2013 at 3:44 PM, Jeremie BOUSQUET
> <jeremie.bousquet(a)gmail.com> wrote:
> > Hi again,
> >
> > On this topic I created a new JIRA:
> >
http://jira.xwiki.org/browse/XWIKI-8960
>
> Indeed, I can reproduce locally. It seems you are the first to use the
> packager plugin outside platform and we didn't took this use case into
> account. I'll try to fix the packager plugin asap.
>
> Thanks,
> Marius
>
> >
> > ... and proposed some sort of solution as a comment.
> > If you agree with the problem and proposal, I could try to contribute
a
> > patch, as anyway I need it for the
mailarchive tests.
> > Of course if you want to fix it I don't disagree :-)
> >
> > BR,
> > Jeremie
> >
> >
> > 2013/3/25 Jeremie BOUSQUET <jeremie.bousquet(a)gmail.com>
> >
> >> I think the problem lies on this kind of expressions [1] ...
> >>
> >> The packager plugin defines version for all mandatory platform
artifacts
> >> with
"this.getProject().getVersion()", meaning if I'm correct that it
> >> returns correct version only if project is part of xwiki platform -
or
> if
> >> it shares the same version.
> >> Maybe it should use property "platform.version" instead ?
> >>
> >>
> >> BR,
> >> Jeremie
> >>
> >>
> >> [1]
> >>
>
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-tools/xw…
> >>
> >>
> >> 2013/3/25 Jeremie BOUSQUET <jeremie.bousquet(a)gmail.com>
> >>
> >>> Note: it goes a bit further if I declare a bunch of xwiki platform
> >>> dependencies in my pom, but breaks again, trying to look at those
> platform
> >>> artifacts for version ${project.version} instead of
> ${platform.version} :
> >>>
> >>> [INFO] Copying JAR dependencies ...
> >>> [WARNING] Missing POM for
> >>> org.xwiki.platform:xwiki-platform-wysiwyg-server:jar:0.3-SNAPSHOT
> >>> [WARNING] Missing POM for
> >>>
org.xwiki.platform:xwiki-platform-localization-script:jar:0.3-SNAPSHOT
> >>> [WARNING] Missing POM for
> >>> org.xwiki.platform:xwiki-platform-oldcore:jar:0.3-SNAPSHOT
> >>> [...]
> >>> [ERROR] Failed to execute goal
> >>> org.xwiki.platform:xwiki-platform-tool-packager-plugi
> >>> datory artifacts: Missing:
> >>> [ERROR] ----------
> >>> [ERROR] 1)
> >>>
org.xwiki.platform:xwiki-platform-localization-script:jar:0.3-SNAPSHOT
> >>> [ERROR]
> >>> [ERROR] Try downloading the file manually from the project website.
> >>> [...]
> >>> Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to
> >>> resolve mandatory artifacts
> >>> at
> >>>
>
org.xwiki.tool.packager.PackageMojo.resolveTransitively(PackageMojo.java:614)
> >>> at
> >>>
>
org.xwiki.tool.packager.PackageMojo.resolveJarArtifacts(PackageMojo.java:543)
>> >>> at
>> >>> org.xwiki.tool.packager.PackageMojo.execute(PackageMojo.java:209)
> >>> at
> >>>
>
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> >>> at
> >>>
>
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> >>> ... 19 more
> >>>
> >>>
> >>> 2013/3/25 Jeremie BOUSQUET <jeremie.bousquet(a)gmail.com>
> >>>
> >>>> 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
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.bousquet(a)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.florea(a)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/xwi…
> >>>>>>
> >>>>>>
>
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwi…
> >>>>>>
> >>>>>>
>
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwi…
> >>>>>>
> >>>>>> 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.bousquet(a)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-basedFrame…
>>>>> >
_______________________________________________
>>>>> > users mailing list
>>>>> > users(a)xwiki.org
>>>>> >
http://lists.xwiki.org/mailman/listinfo/users
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users(a)xwiki.org
>>>>>
http://lists.xwiki.org/mailman/listinfo/users
>>>>>
>>>>
>>>>
>>>
>>
>
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users