Skip to main content



      Home
Home » Eclipse Projects » Oomph » Oomph triggers first Build before applying the correct compiler compliance level preference
Oomph triggers first Build before applying the correct compiler compliance level preference [message #1705948] Thu, 20 August 2015 07:02 Go to next message
Eclipse UserFriend
I have an Oomph setup model in which I've recorded the java compiler compliance level, to 1.7:

<?xml version="1.0" encoding="UTF-8"?>
<setup:PreferenceTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance"
    value="1.7"/>


However, the first build is full of compiler errors, and I think the reason is that it only applies this preference setting after the initial build has been started.

I've also set the 'Build workspace automatically' preference to false, but is still triggers the initial build, though I cannot find any task for this in the model.

If I then clean the workspace and trigger a new build, everything is fine.

Is there a place where I can force the preferences to be applied before the first build? Or the opposite, if I can set the first build to be last thing to be done?

[Updated on: Thu, 20 August 2015 07:03] by Moderator

Re: Oomph trigger Build before applying the correct compiler compliance level preference [message #1705960 is a reply to message #1705948] Thu, 20 August 2015 08:35 Go to previous messageGo to next message
Eclipse UserFriend
Silvestre,

Comments below.

On 20/08/2015 1:02 PM, Silvestre Martins wrote:
> I have an Oomph setup model in which I've recorded the java compiler
> compliance level, to 1.7:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <setup:PreferenceTask
> xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
> key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.compliance"
> value="1.7"/>
>
>
> However, the first build is full of compiler errors, and I think the
> reason is that it only applies this preference setting after the
> initial build has been started.
No, that should not be the case, the build runs after the tasks have
performed, so all preferences should be in their final state.
>
> I've also set the 'Build workspace automatically' preference to false,
> but is still triggers the initial build, though I cannot find any task
> for this in the model.
In
org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(IProgressMonitor)
we only trigger a build is auto build is enabled. But we test for that
initially, so if a preference task sets it to false while we've already
set it to false, we won't notice that.
>
> If I then clean the workspace and trigger a new build, everything is
> fine.

Of course we've never seen such a problem for the several dozen project
setups, so something else must be going on here...
>
> Is there a place where I can force the preferences to be applied
> before the first build?
The assumption that the preferences are set later is not correct.
> Or the opposite, if I can set the first build to be last thing to be
> done?
A build is definitely scheduled only after all tasks are performed.
Re: Oomph trigger Build before applying the correct compiler compliance level preference [message #1706037 is a reply to message #1705960] Fri, 21 August 2015 05:37 Go to previous message
Eclipse UserFriend
Hi Ed,
you're right. The problem had nothing to do with the preferences, it was related with some wrong target platform setup.

Thanks.
Previous Topic:How to use jars from bundle pool in the PDE headless build?
Next Topic:How to configure ResourceCopy task to run only after GitClone task?
Goto Forum:
  


Current Time: Thu Jul 10 07:14:01 EDT 2025

Powered by FUDForum. Page generated in 0.03232 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top