-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOMEE-1380 - add examples for liquibase/flyway usage #1525
Conversation
…ically and via maven plugin
…matically and via maven plugin
…matically and via maven plugin
…matically and via maven plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR, we can always need more examples that guide users! I've annotated a few minor things I'd like to see changed, then we can merge this IMO
...e/src/main/java/org/apache/openejb/assembler/classic/migrate/database/ImportByLiquibase.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/apache/openejb/assembler/classic/migrate/database/liquibase/changelog.xml
Outdated
Show resolved
Hide resolved
I saw the problem, and i am fixing it.
|
…the use Liquibase tool, via programmatically and via maven plugin
…the use Liquibase tool, via programmatically and via maven plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few more small changes from my side, most of which are cleaning up POMs and READMEs
…the use Liquibase tool, via programmatically and via maven plugin
…the use Liquibase tool, via programmatically and via maven plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Please find some comments / feedback.
@@ -17,6 +17,70 @@ | |||
|
|||
package org.apache.openejb.assembler.classic; | |||
|
|||
import static org.apache.openejb.util.Classes.ancestors; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we revert this change in import order? It doesn't actually contribute to the change set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not understand correctly, what do you mean ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import ordering of the Assembler
class was changed for no reason. I think, it was done by auto formatting of your IDE. Just restore the previous order of the import
statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will return the imports that are in the master branch.
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
Outdated
Show resolved
Hide resolved
@@ -122,8 +122,13 @@ public EntityManagerFactory call() throws Exception { | |||
emf.createEntityManager().close(); | |||
} | |||
|
|||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ImportSql.java
Show resolved
Hide resolved
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ImportSql.java
Show resolved
Hide resolved
@@ -90,6 +101,11 @@ public static class Something { | |||
private long id; | |||
} | |||
|
|||
/* | |||
* The code below should no longer be used, because the ImportSql class, is no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment can be dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Flyway flyway = Flyway.configure().locations("filesystem:src/test/resources").dataSource(dataSource) | ||
.cleanDisabled(false).load(); | ||
|
||
flyway.clean(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not be a good idea to suggest to use clean
;-) - if you do that in a productive app, you need to restore from backup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, i will change.
<dependency> | ||
<groupId>com.zaxxer</groupId> | ||
<artifactId>HikariCP</artifactId> | ||
<version>5.1.0</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.0.0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, i will change.
…the use Liquibase tool, via programmatically and via maven plugin
…the use Liquibase tool, via programmatically and via maven plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have two points:
-
(1) Please revert the changes in import order and any formatting in classes, which aren't changed. These Changes are still in the changeset.
-
(2) Please reduce the amount of copy paste comments. Duplicating the same comments about the deprecation of a class is Not necessary. IDE will highlight the deprecation anyway, so it is enough to have it in ImportSql itself.
Otherwise, looks good to me
Responding to your observations: |
|
(1) - Wouldn't it be better to create a checkstyle in TomEE, so that anyone who changes the code, the formatting would always be forced on everyone, and this problem would not happen ? |
In a perfect world, enforcing style and providing formatting profiles for IntelliJ and Eclipse would be beneficial, yes. But there are more sophisticated challenges atm, imho (one would need to start a discussion and find consensus about a common style, etc). |
Ok. |
…the use Liquibase tool, via programmatically and via maven plugin
Thanks for the examples and the PR, @jrxxjr !! |
Added the example of the use Flyway and Liquibase tool, via programmatically and via maven plugin