Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:02 Go to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
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 11:03]

Report message to a 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 12:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph trigger Build before applying the correct compiler compliance level preference [message #1706037 is a reply to message #1705960] Fri, 21 August 2015 09:37 Go to previous message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
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: Sat Dec 14 13:29:35 GMT 2024

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

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

Back to the top