0

I recently changed my web.xml path from: src/main/webapp/WEB-INF/web.xml to src/main/webapp/WEB-INF/webXml/italia/web.xml the reason is I have to change for each profile the folder name for the country. The problem is java can't find the web.xml. I added to pom.xml this:

 <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
                <!--                    <warSourceDirectory>${project.basedir}/WebContent</warSourceDirectory> -->
                <webXml>${project.basedir}/src/main/webapp/WEB-INF/webXml/italia/web.xml</webXml>
                <failOnMissingWebXml>false</failOnMissingWebXml>
                <!--                    <warSourceExcludes>css/</warSourceExcludes> -->
                <webResources>
                    <resource>
                        <directory>${jbossWeb.folder}/${current.jbossWeb}</directory>
                        <targetPath>WEB-INF</targetPath>
                    </resource>
                </webResources>
            </configuration>
        </plugin>

project

It give me this error when I try to run:

: Failed to parse XML descriptor "/C:/Program Files/wildfly-18.0.0.Final/standalone/deployments/archiconEar.ear/archiconWeb.war/WEB-INF/web.xml" at [1,0]

and I found out it create me a web.xml folder with the folders oof countries inside but doesn't go to look the webXml folder enter image description here enter image description here Did I miss something?

Alex
  • 85
  • 6
  • Do you have any plugin that uses the `current.webXml` property? – f1sh Jan 18 '23 at 14:50
  • @f1sh sorry, update the code and I forgot that, still not working, can't read inside the web.xml but it works it i put in the WEB-INF – Alex Jan 18 '23 at 15:01
  • Maybe I misunderstand it, but you can't have multiple `web.xml`. The [specifications](https://docs.oracle.com/javaee/7/tutorial/packaging003.htm) are clear: it must be archiconWeb.war!/WEB-INF/web.xml – Robert Scholte Jan 18 '23 at 16:00
  • Can you describe why you need multiple `web.xml` files? You mention the name of the country - are there settings within the `web.xml` for the country? – stdunbar Jan 19 '23 at 17:08

0 Answers0