Index: src/main/java/org/appfuse/mojo/exporter/AppFuseGeneratorMojo.java =================================================================== --- src/main/java/org/appfuse/mojo/exporter/AppFuseGeneratorMojo.java (revision 3080) +++ src/main/java/org/appfuse/mojo/exporter/AppFuseGeneratorMojo.java (working copy) @@ -286,7 +286,7 @@ private void addEntityToHibernateCfgXml(String hibernateCfgXml) throws MojoFailureException { String className = getProject().getGroupId() + ".model." + pojoName; - if (!hibernateCfgXml.contains(pojoName)) { + if (!hibernateCfgXml.matches(".*class\\s=\\s\"" + className + "\".*")) { // check that class exists and has an @Entity annotation checkEntityExists(); @@ -329,7 +329,7 @@ String[] entities = modelPackage.list(); for (String entity : entities) { log("Found '" + entity + "' in model package..."); - if (entity.contains(pojoName)) { + if (entity.contains(pojoName + ".java")) { entityExists = true; break; }