application.xml Jboss 6
-
24-10-2019 - |
Domanda
Possiamo pacchetto dell'orecchio per jboss 6? Quale sarà 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>
Ho provato a cambiare la versione per la versione = 6 ma si dice file non trovato.
Caused by: java.io.FileNotFoundException: http://www.jboss.org/j2ee/dtd/jboss-app_6_0.dtd
Se uno ha volto tale problema con JBoss 6 durante la distribuzione orecchio ????
Soluzione
ho risolto utilizzando plugin di Maven orecchio e la rimozione application.xml creato manualmente.
Ecco il mio pom orecchio potrebbe essere utile per altri
<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>
Altri suggerimenti
Usare il 5.0 uno - dovrebbe essere disponibile a livello locale in $ JBOSS / docs / dtd / jboss-app_5_0.dtd
L'XML qui sopra è qualcosa di diverso e anche se goverened da alcuni altri documenti dello schema -. Questo non corrisponde l'errore si mostra
È necessario modificare il file jboss-app.xml
di usare un doctype di
DOCTYPE jboss-app
PUBLIC "-//JBoss//DTD Java EE Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_5_0.dtd"