Generated an app as ...
mvn archetype:generate -DgroupId=test -DartifactId=test
-DarchetypeGroupId=org.wildfly.archetype
-DarchetypeArtifactId=wildfly-javaee7-webapp-blank-archetype
-DarchetypeVersion=8.1.0.Final
The app has the following files:
./src/main/webapp/WEB-INF/beans.xml
./src/main/webapp/WEB-INF/faces-config.xml
./src/main/webapp/WEB-INF/test-ds.xml
- beans.xml and faces-config.xml are using java.sun.com-style
namespaces instead of xmlns.jcp.org-style namespaces.
Filed as
https://issues.jboss.org/browse/WFLY-4030
- What is the purpose of test-ds.xml ? It contains:
<datasources
xmlns="http://www.jboss.org/ironjacamar/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema
http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
<!-- The datasource is bound into JNDI at this location. We reference
this in META-INF/persistence.xml -->
<datasource jndi-name="java:jboss/datasources/testDS"
pool-name="test" enabled="true"
use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
</datasources>
This is anyway the default Java EE 7 data source in WildFly.
- src/main/META-INF/persistence.xml refers to this datasource. That
can be removed as well because of the default Java EE 7 data source.
Seems like these are left overs from previous time ?
Can this be cleaned up ? Xavier and I are planning to use this
archetype for our talk at Devoxx in the next few days and would like a
cleaner generated app.
Arun
--
http://blog.arungupta.me
http://twitter.com/arungupta