finally understand, how to access META-INF/resources, to allow external access, resources should be in separate jar, not in war itself http://stackoverflow.com/questions/4732965/exposing-resources-from-jar-files-in-web-applications-tomcat7
2016-02-04 17:45 GMT+04:00 Vjacheslav V. Borisov <[email protected]>: > > > 2016-02-04 17:19 GMT+04:00 Francesco Chicchiriccò <[email protected]>: > > >> As a result, we will end up having, in >> >> ${project.build.directory}/classes/META-INF/resources/swagger >> >> all the files in place ready to be packaged again. >> >> The "magic" that allows accessing such resources via HTTP under /swagger >> is simply because it gets treated as Servlet Fragment. >> > > Cannot reproduce you magic, so end up with black magic :) > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-war-plugin</artifactId> > <version>2.1.1</version> > <configuration> > <webResources> > <resource> > > <directory>${project.build.directory}/swagger-ui/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}</directory> > <targetPath>swagger</targetPath> > </resource> > >
