Error: Directory '/' does not look like a Maven

Also web jar exclusions are most likely obsolete, they are not there anymore with latest Vaadin versions, so nothing to exclude.

1 Like

This might help you @OnDemand.

The same thing (only with another directory name - that is, the actual project dir, instead of ‘/’) happens to us on regular basis. Though only with the project, which uses Wildfly as the application server. Another project, which uses Jetty, never has this problem.

As far as we were able to determine, it doesn’t have anything whatsoever to do with the directory as such, nor with the POM file or something in this direction. Actually it never happens on a newly built project (e.g. if you delete all project files, check out all sources from SVN and compile them).

AFAIK, we already tried to find out what is going on via online chat with Vaadin devs, but never got to the bottom of it.

Still, we’ve been able to determine that some files don’t get recompiled - probably because Eclipse thinks they haven’t changed and this somehow clashes with something Vaadin does during compilation. Not sure which files though, because the thing happens rather randomly - though when it happens it won’t go away, until we clear the entire project.

The work-around that usually helps is to use Project → Clean… in Eclipse (or mvn clean in console as it was already suggested above) plus the Servers → Clean option (to make sure the whole shebang is properly republished in Wildfly). Although sometimes that doesn’t work for some reason. In that case, deleting the frontend files sometimes help.

When even that doesn’t work, deleting the whole project and check-out from SVN always does the trick though.

Yes, it’s annoying as hell (and whole project recompile really takes a long time), but we somehow got used to live with it.
(@Matti: Which of course doesn’t mean we wouldn’t very much appreciate a better solution… :woozy_face:)

I faced this issue several times. For what I was able to see the problem usually is that the IDE (eclipse in my case) is recreating the target/classes directory (recompiling). That file usually resides inside the target/classes/META-INF/VAADIN/config directory. For some reason eclipse recompiles de .class files, but it is not generating the flow-build-info.json file.

That file (IIRC) is created by the vaadin-maven-plugin:prepare-frontend goal. So this problem is solved by running mvn package command, that (depending on the pom.xml structure and configuration) usually invokes the prepare-frontend goal (in development mode, of course).

Give it a try and let me know!

This issue hasn’t happened for me until today, so I couldn’t try your suggestion before.
When it finally happened, I tried running mvn package as you said, but at first it made no difference.
So I deleted both target\classes\META-INF\VAADIN\config\flow-build-info.json and target\<project>\WEB-INF\classes\META-INF\VAADIN\config\flow-build-info.json files, ran mvn package again and redeployed the war file.
Then it worked.
Thanks.

1 Like