Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.5
-
Fix Version/s: None
-
Labels:None
Description
We use some XML entities in our project.xml in order to make the maintenance of the several multiprojects easier.
in our main project directory we have defined an entity file, project-entities.xml containing several xml entities:
<!ENTITY reports "
<reports>
<report>maven-junit-report-plugin</report>
<report>maven-javadoc-plugin</report>
<report>maven-jxr-plugin</report>
<report>maven-checkstyle-plugin</report>
</reports>
">
Each sub project extending the main project's POM defines a DOCTYPE entry pointing to the project-entities.xml file. The reason for defining the reports in a entity instead of in the main projects POM is that the reports for the main project are multiproject reports, and the subproject reports are all equal.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project [
<!ENTITY % project-entities SYSTEM "file:../mainproject/project-entities.xml"> %project-entities;
]>
<project>
<extend>${basedir}/../mainproject/project.xml</extend>
<id>subproject</id>
&reports;
</project>
When I use scm:prepare-release, the &reports; entity is in the new project.xml expanded to the contents in the project-entities.xml file and the entity it self still remains in the subproject's project.xml. Also, the reference to the project-entities in the DOCTYPE definition is gone:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<project>
<extend>${basedir}/../mainproject/project.xml</extend>
<id>subproject</id>
<reports>
<report>maven-junit-report-plugin</report>
<report>maven-javadoc-plugin</report>
<report>maven-jxr-plugin</report>
<report>maven-checkstyle-plugin</report>
</reports>&reports;
</project>