# Maven-liquibase-plugin: diff does not recognize changes

**URL:** <https://forum.liquibase.org/t/maven-liquibase-plugin-diff-does-not-recognize-changes/5205>\
**Category:** General Discussion\
**Created:** [March 16, 2021, 1:24pm UTC](https://forum.liquibase.org/t/maven-liquibase-plugin-diff-does-not-recognize-changes/5205 "2021-03-16T13:24:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fpezzati](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@fpezzati](https://forum.liquibase.org/u/fpezzati)\
**Post date:** [March 16, 2021, 1:24pm UTC](https://forum.liquibase.org/t/maven-liquibase-plugin-diff-does-not-recognize-changes/5205/1 "2021-03-16T13:24:52Z")

</div>

Hello everyone!

I am trying to get a changelog by diff-ing my JPA entities agains a not-up-to-date database. You can check [this](https://github.com/fpezzati/jsci/tree/master/jsfcihelloworld) project. I am using the `hibernate:ejb3` mode. This is the command I run:

```
mvn liquibase:diff -Dliquibase.diffChangeLogFile=/tmp/databasechangelog.txt -DPG_HOST=localhost -DPG_PORT=5432 -DPG_DATABASE=postgres -DPG_USER=postgres -DPG_PASSWORD=password

```

Output says entities were found, old ones and those early added to my code (so not registered in the database), but

```
....
[INFO] No changes found, nothing to do
[INFO] Differences written to Change Log File, /tmp/databasechangelog.txt
....

```

What am I doing wrong? Thankyou!

---

<div class="post-metadata">

**Author:** ![ronak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/ronak/32/221_2.png) [@ronak](https://forum.liquibase.org/u/ronak)\
**Post date:** [March 17, 2021, 5:46pm UTC](https://forum.liquibase.org/t/maven-liquibase-plugin-diff-does-not-recognize-changes/5205/2 "2021-03-17T17:46:57Z")

</div>

@fpezzati ,

Could you please provide reproducible steps? Sorry, I am not able to readily determine how to take your git repo project to the point of reproducing this error.

Thanks,

Ronak

---

<div class="post-metadata">

**Author:** ![fpezzati](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@fpezzati](https://forum.liquibase.org/u/fpezzati)\
**Post date:** [March 23, 2021, 8:22am UTC](https://forum.liquibase.org/t/maven-liquibase-plugin-diff-does-not-recognize-changes/5205/3 "2021-03-23T08:22:41Z")

</div>

Hello Ronak,  
I see you found [my SO post](https://stackoverflow.com/questions/66537477/liquibase-maven-plugin-and-hibernate-diff-command-does-not-produce-any-changese) where I ask for help for first. I read your answer, problems were two:

- I was using diff goal but expecting diffChangelog behavior,
- I was using the wrong param to tell diff where to store the output.

So thankyou. Now I am trying to obtain a diffChangelog by comparing a database agains my hibernate/jpa project, I want to use Liquibase as an alternative to hbm2ddl. I see there is no goal to achieve this, I’ll use liquibase without maven. But this is another question, see you my next question 🙂 thankyou again
