Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] how does the tycho compiler for test code find all the dependencies?

but for now this will just not work with tycho 2.4 right?

so for this project i just need to fallback to 2.3 until 2.5 is out with a fix that really looks at the pom (test) dependencies for compiling and running tests.


On Fri, 30 Jul 2021 at 12:05, Christoph Läubrich <laeubi@xxxxxxxxxxxxxx> wrote:
Many thanks Johan for this example and the clarifications!

 > The manifest (plugin stuff) shouldn't really do anything with that.
 > The final build of this project should be completely without any test
 > references.

I fully agree with you that this should 'just work' but until now it was
  doubt that this is useful or even a valid use-case and I was a bit
lost to argue fore more support in that area.

Because of this its good to know that there are other people having such
'strange' setup/uses and I'll try to provide a fix for your case ASAP...



Am 30.07.21 um 11:50 schrieb Johan Compagner:
>
>
> Op do 29 jul. 2021 06:56 schreef Christoph Läubrich
> <laeubi@xxxxxxxxxxxxxx <mailto:laeubi@xxxxxxxxxxxxxx>>:
>
>     Hi Johan,
>
>     I think your right that this case (using tycho+...?) is not covered by
>     any integration test, can you provide a PR with an itest[1] that shows
>     the problem?
>
>
>
> i created a copy of the current jsunit test:
> jsunit with mvn test dependencies by jcompagner · Pull Request #206 ·
> eclipse/tycho (github.com) <https://github.com/eclipse/tycho/pull/206>
>
> and added 1 more pure test dependency
>
> (in eclipse itself this is must be configured to use the M2_REPO
> variable to compile, this is becaues a project can't be a plugin and a
> maven project at at the same time, at least last time i checked)
>
> But thats just the .classpath for eclipse itself.
> in pom.xml we have that extra test dependency
>
> <https://github.com/eclipse/tycho/pull/206>
>
>
>
>       > because tycho I guess only looks at plugin dependencies?
>
>     It looks at the plugin dependencies + some classpath containers, but
>     pure maven-dependecies are not (yet) taken into account, I'll add
>     support for this right now its clear how your setup works.
>
>
> yes how else can this be done?
> If not through mvn depedencies?
> The manifest (plugin stuff) shouldn't really do anything with that.
> The final build of this project should be completely without any test
> references.
>
>
>     [1]
>     https://github.com/eclipse/tycho/wiki#providing-an-integration-test
>     <https://github.com/eclipse/tycho/wiki#providing-an-integration-test>
>
>     Am 28.07.21 um 18:01 schrieb Johan Compagner:
>      > hi,
>      >
>      > now that we have instead of this:
>      >
>      > [INFO] --- maven-compiler-plugin:3.8.1:testCompile (compiletests) @
>      > sablo ---
>      > [INFO] Toolchain in maven-compiler-plugin: JDK[c:/javatools/jdk18/]
>      > [INFO] Nothing to compile - all classes are up to date
>      >
>      > this:
>      >
>      > [INFO] --- tycho-compiler-plugin:2.4.0:testCompile
>     (default-testCompile)
>      > @ sablo ---
>      > [INFO] Compiling 5 source files to
>      > C:\Users\jcomp\git\servoy_master\sablo\sablo\target\test-classes
>      > [INFO]
>      >
>     ------------------------------------------------------------------------
>      >
>      > we have problem that it can't find all kind of classes that are
>     just by
>      > the test classes
>      > i am not talking about the junit itself but:
>      > sablo/pom.xml at master · Servoy/sablo (github.com
>     <http://github.com>)
>      > <https://github.com/Servoy/sablo/blob/master/sablo/pom.xml#L285
>     <https://github.com/Servoy/sablo/blob/master/sablo/pom.xml#L285>>
>      >
>      > for us testing always just worked because we use the normal maven
>      > compile and the normal maven dependency resolution (so we have
>     all the
>      > jars that are used by test as a normal pom dependency)
>      >
>      > but now we get:
>      >
>      > [ERROR] Failed to execute goal
>      > org.eclipse.tycho:tycho-compiler-plugin:2.4.0:testCompile
>      > (default-testCompile) on project sablo: Compilation failure:
>     Compilation
>      > failure:
>      > [ERROR]
>      >
>     C:\Users\jcomp\git\servoy_master\sablo\sablo\src\test\java\org\sablo\filter\SecurityFilterTest.java:[22]
>      > [ERROR]         import static org.mockito.Matchers.any;
>      >
>      >
>      > because tycho I guess only looks at plugin dependencies?
>      > But i don't want to add that to the plugins dependencies they are
>     purely
>      > test stuff
>      >
>      > reading this: tycho/RELEASE_NOTES.md at master · eclipse/tycho
>      > (github.com <http://github.com>)
>     <https://github.com/eclipse/tycho/blob/master/RELEASE_NOTES.md
>     <https://github.com/eclipse/tycho/blob/master/RELEASE_NOTES.md>>
>      >
>      > i only see stuff about the jsunit container, but thats only part
>     of the
>      > problem
>      >
>      > also the sample:
>      >
>      > tycho/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle at
>      > master · eclipse/tycho (github.com <http://github.com>)
>      >
>     <https://github.com/eclipse/tycho/tree/master/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle
>     <https://github.com/eclipse/tycho/tree/master/tycho-its/projects/compiler.junitcontainer/junit4-in-bundle>>
>      >
>      > is to simple because that doesn't use extra pure test libs
>      >
>      > --
>      > Johan Compagner
>      > Servoy
>      >
>      > _______________________________________________
>      > tycho-user mailing list
>      > tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
>      > To unsubscribe from this list, visit
>     https://www.eclipse.org/mailman/listinfo/tycho-user
>     <https://www.eclipse.org/mailman/listinfo/tycho-user>
>      >
>     _______________________________________________
>     tycho-user mailing list
>     tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
>     To unsubscribe from this list, visit
>     https://www.eclipse.org/mailman/listinfo/tycho-user
>     <https://www.eclipse.org/mailman/listinfo/tycho-user>
>
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user
>
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user


--
Johan Compagner
Servoy

Back to the top