Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] why do you need to add <executionEnvironment>JavaSE-11</executionEnvironment> to configurtation now?

Hi,

i am moving to Tycho 2.0, and i am just wondering a few things.

First some background, we move to Eclipse 4.17 and Tycho 2.0
but for now we keep compiling our own stuff to java 8

in my toolchains file i just have:

  <toolchain>
       <type>jdk</type>
       <provides>
        <id>JavaSE-1.8</id>
       </provides>
       <configuration>
        <jdkHome>c:/javatools/jdk18/</jdkHome>
       </configuration>
  </toolchain>

and in tycho compiler plugin i have:

<useJDK>BREE</useJDK>

in the maven toolchains plugin i have:
                        <toolchains>
<jdk>
   <id>JavaSE-1.8</id>
</jdk>
</toolchains>

but moving to tycho 2.0  i need to add:

<executionEnvironment>JavaSE-11</executionEnvironment>

(and ofcourse run with java 11)

I don't need to change anything in the toolchain stuff so i don't fully understand what that does

i did read up stuff on:


but i still don't understand it what that does.. or why i need that
because where does it get JavaSE-11 from? and is the compiler using that? (because we really want that it compiles against the BREE, so if we are using api by accident of a higher java then we specify it should bomb out)

But where does it get from? is it the runtime where you run with? But if i just change it and run with Java15 then that is fine?

I do see this output when i run with -X

[INFO] Computing target platform for MavenProject: org.sablo:sablo:2020.12.0.3620_rc @ C:\Users\jcomp\git\servoy_master\sablo\sablo\pom.xml
[DEBUG] Using execution environment 'JavaSE-11' configured in target-platform-configuration <executionEnvironment>
[DEBUG] Toolchain JDK[c:/javatools/jdk18/] doesn't match required property: id
[DEBUG] Found system.packages in profile defintion file for JavaSE-11,
[DEBUG] Adding target definition file "C:\Users\jcomp\.m2\repository\com\servoy\com.servoy.eclipse.target\2020.12.0.3620_rc\com.servoy.eclipse.target-2020.12.0.3620_rc.target"


"Found system.packages in profile defintion file for JavaSE-11,"

which profile definition? and is it logical that java 15 maps also just fine? (so anything higher is fine)

why it also bothers me, if i keep
<executionEnvironment>JavaSE-11</executionEnvironment>

and i go back to tycho 1.7.0 i get:


ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.7.0:compile (default-compile) on project sablo: useJDK = BREE configured, but no toolchain of type 'jdk' with id 'JavaSE-11' found. See http://maven.apache.org/guides/mini/guide-using-toolchains.html -> [Help 1]

so it seems that that is completely overruling BREE (at least in tycho 1.7)
So it is fully logical that we didn't have that in our pom file.



by the way this looks now a lot slower:

[DEBUG] Resolving target definition content...

because tycho 1.7 shows what it did so slowly adding all the p2 sites..
but with 2.0 there is no output it just sits there for almost half of the build time (15 seconds of 33 total)

I would love if tycho just could do what we now do internally for our selfs in our eclipse.
Export the target file to local disk and then use another target file that just gets all the stuff from a local disk. So we never have problems when something is wrong with resolving the sites ..

So cache the result locally in a temp location (p2 repo?) as long as the sha hash of the target file stays the same..

Johan


Back to the top