2017-11-10 9 views
0

Angular 5アプリを.warにビルドして、JBossからデプロイして実行したいと考えています。Angular WAR build

私は.warの建物のためのmavenと角度5アプリを持っています。 JBossのデプロイメント中にエラーが発生しましたが、WEB-INFでWebContentカタログを作成した後にデプロイできますが、サイトにアクセスすることはできません。 POM/WEB.XMLが正しく設定されているかどうかはわかりません。

私はMVN戦争をコンパイルを使用して構築しています:戦争

あなたは、私は非常に感謝される私を助けることができるので、もし私がMavenの経験がありません。

のpom.xml

<project 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.vdb</groupId> 
<artifactId>vdb</artifactId> 
<version>0.0.1</version> 

<build> 
<plugins> 

    <plugin> 
    <artifactId>maven-clean-plugin</artifactId> 
    <version>2.5</version> 
    <configuration> 
     <filesets> 
     <fileset> 
      <directory>dist</directory> 
      <includes> 
      <include>*</include> 
      </includes> 
     </fileset> 
     </filesets> 
    </configuration> 
    </plugin> 

    <plugin> 
    <groupId>com.github.eirslett</groupId> 
    <artifactId>frontend-maven-plugin</artifactId> 
    <version>1.5</version> 
    <executions> 
     <execution> 
     <id>install node and npm</id> 
     <goals> 
      <goal>install-node-and-npm</goal> 
     </goals> 
     <configuration> 
      <nodeVersion>v8.9.1</nodeVersion> 
      <npmVersion>5.5.1</npmVersion> 
     </configuration> 
     </execution> 

     <execution> 
     <id>npm install</id> 
     <goals> 
      <goal>npm</goal> 
     </goals> 
     <configuration> 
      <arguments>install</arguments> 
     </configuration> 
     </execution> 

     <execution> 
     <id>prod</id> 
     <goals> 
      <goal>npm</goal> 
     </goals> 
     <configuration> 
      <arguments>run-script prod</arguments> 
     </configuration> 
     <phase>generate-resources</phase> 
     </execution> 
    </executions> 
    </plugin> 

    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-war-plugin</artifactId> 
     <version>2.6</version> 
     <configuration> 
      <webXml>.\WEB-INF\web.xml</webXml> 
      <webResources> 
       <resource> 
        <!-- this is relative to the pom.xml directory --> 
        <directory>./dist/</directory> 
       </resource> 
      </webResources> 
     </configuration> 

    </plugin> 

</plugins> 

とWEB.XML

<?xml version="1.0" encoding="ISO-8859-1" ?><web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
version="2.4"> 

<display-name>VDB WebApp</display-name> 
<description> 
</description> 

<servlet> 
    <servlet-name>VDBWeb</servlet-name> 
    <servlet-class>vdb.Servlet</servlet-class> 
</servlet> 

<servlet-mapping> 
    <servlet-name>VDBServlet</servlet-name> 
    <url-pattern>/vdb</url-pattern> 
</servlet-mapping> 

答えて

0

にそのサーブレット名を判明し、一致する必要があります。私は/ vdbに私が/ warnameに行く必要があった場所を開くことを試みた。

+1

適切なサーブレットを実行するには、/ warname/vdbに移動する必要があります。 – Gimby

関連する問題