public class FlywayMigrationPlugin extends PlayPlugin {
public void onApplicationStart() {
Flyway flyway = new Flyway();
flyway.setDataSource(DB.datasource);
flyway.migrate();
}
}
But since the plugin priorities (in play.plugins) have no
'gaps' (DBPlugin is 3, JPAPlugin 4) I'm stuck. I know I can change the
play.plugins, but I'm wondering if there is any other solution.
Thanks!
> public class FlywayMigrationPlugin extends PlayPlugin { > public void onApplicationStart() { > Flyway flyway = new Flyway(); > flyway.setDataSource(DB.datasource); > flyway.migrate(); > } > }
> But since the plugin priorities (in play.plugins) have no > 'gaps' (DBPlugin is 3, JPAPlugin 4) I'm stuck. I know I can change the > play.plugins, but I'm wondering if there is any other solution. > Thanks!
> Mathias
> -- > You received this message because you are subscribed to the Google Groups "play-framework" group. > To post to this group, send email to play-framework@googlegroups.com. > To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
Can we say that all priorities < 1000 are reserved for the framework
and should only be used if there are reasons why a plugin must run
before another plugin. Then we could have wide spaces between the
numbers. The problem we has with this is, that some other plugins can
become broken because the JPAPlugin get a to high number.
I want to suggest another idea:
Making it possible to overwrite the numbers, this can be done by one
masterplay.plugins or if we make sure that a plugin will only be
loaded once and say that first a play.plugins in the conf-folder of
the app will be read.
Last but not least I think the compareTo should be fixed
http://play.lighthouseapp.com/projects/57987/tickets/121. If you add
the plugin name to compareTo it will allow a quick hack. This give us
time to think a little bit more about a good solution for plugin dependencies and ordering.
Niels
On 27 Okt., 19:19, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> > public class FlywayMigrationPlugin extends PlayPlugin {
> > public void onApplicationStart() {
> > Flyway flyway = new Flyway();
> > flyway.setDataSource(DB.datasource);
> > flyway.migrate();
> > }
> > }
> > But since the plugin priorities (in play.plugins) have no
> > 'gaps' (DBPlugin is 3, JPAPlugin 4) I'm stuck. I know I can change the
> > play.plugins, but I'm wondering if there is any other solution.
> > Thanks!
> > Mathias
> > --
> > You received this message because you are subscribed to the Google Groups "play-framework" group.
> > To post to this group, send email to play-framework@googlegroups.com.
> > To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.
<opensourc...@googlemail.com> wrote: > Can we say that all priorities < 1000 are reserved for the framework > and should only be used if there are reasons why a plugin must run > before another plugin. Then we could have wide spaces between the > numbers. The problem we has with this is, that some other plugins can > become broken because the JPAPlugin get a to high number.
> I want to suggest another idea: > Making it possible to overwrite the numbers, this can be done by one > masterplay.plugins or if we make sure that a plugin will only be > loaded once and say that first a play.plugins in the conf-folder of > the app will be read.
> Last but not least I think the compareTo should be fixed > http://play.lighthouseapp.com/projects/57987/tickets/121. If you add > the plugin name to compareTo it will allow a quick hack. This give us > time to think a little bit more about a good solution for plugin > dependencies and ordering.
> Niels
> On 27 Okt., 19:19, Guillaume Bort <guillaume.b...@gmail.com> wrote: >> No, I should add more space between plugin numbers. I'll fix that.
>> On Wed, Oct 27, 2010 at 1:05 PM, Mathias Bogaert
>> > public class FlywayMigrationPlugin extends PlayPlugin { >> > public void onApplicationStart() { >> > Flyway flyway = new Flyway(); >> > flyway.setDataSource(DB.datasource); >> > flyway.migrate(); >> > } >> > }
>> > But since the plugin priorities (in play.plugins) have no >> > 'gaps' (DBPlugin is 3, JPAPlugin 4) I'm stuck. I know I can change the >> > play.plugins, but I'm wondering if there is any other solution. >> > Thanks!
>> > Mathias
>> > -- >> > You received this message because you are subscribed to the Google Groups "play-framework" group. >> > To post to this group, send email to play-framework@googlegroups.com. >> > To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com. >> > For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.
>> For anything work-related, use g...@zenexity.fr; for everything else, >> write guillaume.b...@gmail.com
> -- > You received this message because you are subscribed to the Google Groups "play-framework" group. > To post to this group, send email to play-framework@googlegroups.com. > To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
With fixing http://play.lighthouseapp.com/projects/57987/tickets/121 you could provide a solution for now and get time to solve the problem
in 1.2. For 1.1 you could add a note that module priorities should be
greater than 1000, so that you have there the possibilities without
any problems.
But if you are sure that you don't want to solve the dependency-issue
with a smarter, but complexer solution, the change now is quite good.
Niels
On 27 Okt., 19:45, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> On Wed, Oct 27, 2010 at 7:32 PM, GrailsDeveloper
> <opensourc...@googlemail.com> wrote:
> > Can we say that all priorities < 1000 are reserved for the framework
> > and should only be used if there are reasons why a plugin must run
> > before another plugin. Then we could have wide spaces between the
> > numbers. The problem we has with this is, that some other plugins can
> > become broken because the JPAPlugin get a to high number.
> > I want to suggest another idea:
> > Making it possible to overwrite the numbers, this can be done by one
> > masterplay.plugins or if we make sure that a plugin will only be
> > loaded once and say that first a play.plugins in the conf-folder of
> > the app will be read.
> > Last but not least I think the compareTo should be fixed
> >http://play.lighthouseapp.com/projects/57987/tickets/121. If you add
> > the plugin name to compareTo it will allow a quick hack. This give us
> > time to think a little bit more about a good solution for plugin > > dependencies and ordering.
> > Niels
> > On 27 Okt., 19:19, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> >> No, I should add more space between plugin numbers. I'll fix that.
> >> On Wed, Oct 27, 2010 at 1:05 PM, Mathias Bogaert
> >> > public class FlywayMigrationPlugin extends PlayPlugin {
> >> > public void onApplicationStart() {
> >> > Flyway flyway = new Flyway();
> >> > flyway.setDataSource(DB.datasource);
> >> > flyway.migrate();
> >> > }
> >> > }
> >> > But since the plugin priorities (in play.plugins) have no
> >> > 'gaps' (DBPlugin is 3, JPAPlugin 4) I'm stuck. I know I can change the
> >> > play.plugins, but I'm wondering if there is any other solution.
> >> > Thanks!
> >> > Mathias
> >> > --
> >> > You received this message because you are subscribed to the Google Groups "play-framework" group.
> >> > To post to this group, send email to play-framework@googlegroups.com.
> >> > To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.
> >> For anything work-related, use g...@zenexity.fr; for everything else,
> >> write guillaume.b...@gmail.com
> > --
> > You received this message because you are subscribed to the Google Groups "play-framework" group.
> > To post to this group, send email to play-framework@googlegroups.com.
> > To unsubscribe from this group, send email to play-framework+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/play-framework?hl=en.