0

I'm trying to package a Spring Project with Maven, but the Beans.xml file is missing. A lot of people suggest to put the Bean.xml file in the main/resources, but it does not work for me. I think that only works for Eclipse user and I'm just compiling in the terminal using 'mvn clean install'.

Flying Nimbus
  • 69
  • 1
  • 8
  • Does this answer your question? [Where should beans.xml be placed?](https://stackoverflow.com/questions/8991561/where-should-beans-xml-be-placed) – Nico Van Belle Mar 24 '22 at 11:52

1 Answers1

1

Stupid mistake, inside my pom file the directory was like the following:

  <build>
<resources>
  <resource>
    <directory>src/resources</directory>
     <includes>
         <include>**/*.properties</include>
         <include>**/*.xml</include>
    </includes>
    <excludes>
      <exclude>**/*.jpeg</exclude>
      <exclude>**/*.gif</exclude>
    </excludes>
  </resource>

My resources folder was not inside src/main/resources, but src/resources. And when I open my jar file the Beans.xml file this there and the code runs without error.

Flying Nimbus
  • 69
  • 1
  • 8