application.xml for Jboss 6
Can we package ear for jboss 6 ? What will be application.xml uri ??
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee /application_5.xsd">
<display-name>my-ear</display-name>
<module>
<ejb>my-ejb</ejb>
</module>
I have tried changing version for version=6 but it is saying file not found.
Caused by: java.io.FileNo开发者_如何学运维tFoundException: http://www.jboss.org/j2ee/dtd/jboss-app_6_0.dtd
Does any one have face such problem with jboss 6 while deploying ear ????
I have solved it using maven ear plugin and removing manually created application.xml.
Here is my ear pom it might be helpful for other
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.surajchhetry.test</groupId>
<artifactId>test-ear</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>ear</packaging>
<name>test-ear</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<finalName>test-ear</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.4</version>
<configuration>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<ejbModule>
<groupId>${project.groupId}</groupId>
<artifactId>test-ejb</artifactId>
<bundleFileName>test-ejb.jar</bundleFileName>
</ejbModule>
<jarModule>
<groupId>${project.groupId}</groupId>
<artifactId>test-api</artifactId>
<bundleFileName>test-api.jar</bundleFileName>
</jarModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>test-ejb</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>test-api</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
</dependencies>
Use the 5.0 one - it should be available locally in $JBOSS/docs/dtd/jboss-app_5_0.dtd
The xml above is something different though and goverened by some other schema documents - this does not match the error you show.
You need to change the file jboss-app.xml
to use a doctype of
DOCTYPE jboss-app
PUBLIC "-//JBoss//DTD Java EE Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd"
精彩评论