maven - file aren't copied to WEB-INF/ -
when run clean install goals on maven, spring-servlet.xml not copied in war. it's not true, copy myapp.war/web-inf/classes/spring-servlet.xml, want there : myapp.war/web-inf/
i found problem come bad pom.xml configuration, tried severals things, unsucessfull :(
pom.xml :
<build> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/main/webapp/web-inf</directory> <filtering>true</filtering> </resource> </resources> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-resources-plugin</artifactid> <version>2.4.2</version> <configuration> <delimiters> <delimiter>${*}</delimiter><!-- keep default behavior --> <delimiter>@</delimiter><!-- add ant-like tokens style --> </delimiters> </configuration> </plugin> <!-- définit le répertoire source de la webapp à la racine du projet et avec comme nom le nom de l'artifact --> <plugin> <artifactid>maven-war-plugin</artifactid> <version>2.0.2</version> <configuration> <warsourcedirectory>it-nouveauprojet</warsourcedirectory> <webxml>${basedir}/src/main/webapp/web-inf/web.xml</webxml> <manifest> <adddefaultimplementationentries>true</adddefaultimplementationentries> </manifest> <archive> <manifestentries> <specification-title>${project.name}</specification-title> <specification-version>${project.version}</specification-version> <implementation-environment>${projet.environnement}</implementation-environment> <buildnumber>${buildnumber}</buildnumber> </manifestentries> </archive> </configuration> </plugin> </build>
my web.xml copied right, want same thing spring-servlet.xml , other files in webapp/web-inf/ folder, though maven war plugin copy files in webapp/web-inf/ root folder of war.
did miss ?
Comments
Post a Comment