On 27.12.2009, at 13:46, Todor Boev wrote:
> Turns out PaxExam installs not the bundle that is currently being built but
> the latest version stored in the local maven repo. This happens because my
> test code lives in the same maven project as my bundle code. So to test the
> bundle I must install it to the repo. But to install it to the repo it must
> pass the tests. Can't lift myself by the hair :)
>
> I can either try to install the bundle from the local "target" directory or I
> can move the test code to another project.
well, maven has the integration-test phase that is being executed after the
bundle has been build. Only thing you need to archive now is using this (not
yet installed to local m2) bundle: see your next question
>
> A related question is how do I pass the value of "${basedir}" from maven to
> my test code?
You can use maven filters to to write any maven reactor property to a file that
is reachable from classpath (so a file that sits in target/classes).
We do this in pax projects to get the current version into the program itself.
See pax-exam/pax-exam/pom.xml + src/main/resources/ content for an example.
Code that reads this data: Info.java (search in pax exam sources)
>
> On Sun, Dec 27, 2009 at 12:52 PM, Todor Boev <[email protected]> wrote:
> Hi,
> I was wondering if Pax Exam does something with System.out. I notice that
> System.out.println() statements in the JUnit test code are printed on the
> console but statements in the production code are not. I can't find the dumps
> in
> the test case reports either.
>
> Cheers,
> Todor
>
>
>
> --
> Go on! Destroy the fabric of the universe! See if I care!
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general