Search code examples
javaintellij-ideawebsphere

NoModuleFileException: File does not exist for module having uri


I am deploying a J2ee project on websphere and I have set up artifacts,ear etc. with intelliJ. It is a multi module maven project and was working fine till I have accidentally modified some set up in intelliJ.

What can be the reason? What intelliJ setting can influence this?I have tried to investigate pom but they looks fine and I haven not modified them before the issue.

The error is:

A file does not exist for module element having uri: namefile.war

Solution

  • If your war has snapshot change your ear plugin to skip versioning in the file name like this:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <version>6</version>
                    <fileNameMapping>no-version</fileNameMapping>
                </configuration>
            </plugin>