The plan upgraded by the tool is following:
- <web-app xmlns
="http://geronimo.apache.org/xml/ns/j2ee/web-1.0" xmlns:naming
="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="
http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="
http://geronimo.apache.org/xml/ns/deployment-1.1">
<sys:groupId>Sample</
sys:groupId>
<sys:artifactId>EMPdemo</
sys:artifactId>
<sys:version>1.1</
sys:version>
<sys:type>car</
sys:type>
</sys:moduleId>
<sys:dependencies />
<sys:hidden-classes />
<sys:non-overridable-classes />
</sys:environment>
<context-root>/EMPdemo</
context-root>
<context-priority-classloader>false
</context-priority-classloader>
<naming:ref-name>jdbc/DataSource
</naming:ref-name>
<naming:resource-link>SystemDatasource
</naming:resource-link>
</naming:resource-ref>
</web-app>
But this upgraded plan will cause following error during deployment:
------------------------------------------------------
Error: Unable to distribute EMPdemo-1.0.war: Unable to resolve
resource reference 'jdbc/DataSource' (Could not find resource
'jdbc/EmployeeDatasource'. Perhaps it has not yet been configured,
or your application does not have a dependency declared for that
resource module?)
------------------------------------------------------
After I add datasource's module reference to the upgraded plan, that application can be deployed successfully.
--------------------------------------------------
<sys:groupId>Sample</
sys:groupId>
<sys:artifactId>EMPdemo</
sys:artifactId>
<sys:version>1.1</
sys:version>
<sys:type>car</
sys:type>
</sys:moduleId>
<sys:groupId>Sample</
sys:groupId>
<sys:artifactId>EmployeeDatasource
</sys:artifactId>
<sys:version>1.1</
sys:version>
<sys:type>car</
sys:type>
</sys:dependency>
</sys:dependencies>
<sys:hidden-classes />
<sys:non-overridable-classes />
</sys:environment>
<context-root>/EMPdemo</
context-root>
<context-priority-classloader>false
</context-priority-classloader>
<naming:ref-name>jdbc/DataSource
</naming:ref-name>
<naming:resource-link>jdbc/EmployeeDatasource
</naming:resource-link>
</naming:resource-ref>
</web-app>
--------------------------------------------------
--------------------------------------------------
Could the upgrade tool add some comments to plan or give a warning to user when processing with datasource?