war

jar as jboss module: dependencies

a 夏天 提交于 2019-12-24 12:47:23
问题 I have a question about JBoss modules dependencies vs war dependencies. I have an app.war ; its webinf/lib directory contains a myLib.jar only . In this configuration everything works fine. Now I have to move mylib.jar outside the war, so I put it into a JBoss module and added it to module.xml; I also added it to the deployment-structure.xml file in the war. In this new configuration my app.war finds succesfully the external myLib.jar but now myLib.jar cannot find its dependencies anymore .

gradle war: how to build jar, not classes

徘徊边缘 提交于 2019-12-24 11:44:42
问题 Gradle war plugin: how to build a jar and add it to war? projectRoot/ src/main/java src/main/resources src/main/webapp build a jar (foo.jar) from the java source code and resources. add the jar under the WEB-INF/lib of the war. WEB-INF/lib/foo.jar The war task will not build a jar by default, and add all java classes and resources under WEB-INF/classes. UPDATE The War plugin extends the Java plugin to add support for assembling web application WAR files. It disables the default JAR archive

Ignoring web.xml when loading a WAR file with Jetty

。_饼干妹妹 提交于 2019-12-24 08:30:37
问题 I'm trying a self-executable WAR package with Jetty. It configures with web.xml by default. If a run-time option is given, I wanted to override web.xml by Java code-level configuration with ServletContextHandler#addServlet, #addEventListener, and ... Can I ignore web.xml while loading a WAR package? % java -jar foobar.jar # Use web.xml % java -jar foobar.jar --customize=something # Use Java code to configure // Example WebAppContext webapp = new WebAppContext(); webapp.setWar(warLocation

Only generate one war during package

让人想犯罪 __ 提交于 2019-12-24 05:05:18
问题 By default JHipster generate 2 wars during the package phase (your_project_version.war & your_project_version.war.original). The first one is the executable jar and the second is the war you can use in a servlet container. Is there a way to only generate the 'original' war. The executable is not required for my project and I would like to deploy the war to Nexus. 回答1: jhipster generated project will make use of spring-boot, and in particular of the spring-boot-maven-plugin, which by default

Only generate one war during package

ⅰ亾dé卋堺 提交于 2019-12-24 05:05:08
问题 By default JHipster generate 2 wars during the package phase (your_project_version.war & your_project_version.war.original). The first one is the executable jar and the second is the war you can use in a servlet container. Is there a way to only generate the 'original' war. The executable is not required for my project and I would like to deploy the war to Nexus. 回答1: jhipster generated project will make use of spring-boot, and in particular of the spring-boot-maven-plugin, which by default

JAR libraries in WEB-INF/lib not added to classpath during Glassfish deployment

别说谁变了你拦得住时间么 提交于 2019-12-24 03:33:00
问题 I'm new to Glassfish and Java EE although I've been using Java for a few years. I've inherited a project that stalled and now I need to start development on it again. I'm trying to deploy the web application as-is to see what works and what needs attention. While there is a lot of code to implement various functions, it appears that the first point needing attention is deployment of the application. The web application I'm trying to deploy is MyServer and is packaged in a WAR archive. A class

JBoss 7 project libraries as a module

泄露秘密 提交于 2019-12-24 02:23:21
问题 My project's war, after adding some maven dependencies, increased in size to 32MB! I need to reduce that size. Gooogling around I found that using modules could be the way. What's the best practice? Adding each library as a new module? Creating a module with "all libraries" ? I don't even know if that's possible. So, I have, for example: <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>5.0.0</version> </dependency> I want to add " provided "

Angular App deployed on tomcat as war

删除回忆录丶 提交于 2019-12-24 02:14:19
问题 I'd like to deploy a single page application (SPA) written in Angular with a bunch of static files, including *.css, .js, /assets/ within a war file on tomcat. The problem is, every path given by the user which doesn't match one of the existing files should deliver index.html. I started with this web.xml configuration: [...] <servlet> <servlet-name>index</servlet-name> <jsp-file>/index.html</jsp-file> </servlet> <servlet-mapping> <servlet-name>index</servlet-name> <url-pattern>/*</url-pattern

How to open a resource file in a WAR using a string pathname?

≡放荡痞女 提交于 2019-12-24 00:52:14
问题 I am building a WAR/EAR and one of my components reads in many custom configuration files using File IO: Reader reader = new BufferedReader(new FileReader(path)); The path above is a String that is passed as a property to this class through Spring's applicationContext.xml file. What String path do I specify if I want to put all these configuration files inside a WAR? Can this even be done? Or is the component incorrect and should be using getResourceAsStream() instead? I browsed around and

Packaging JAR file in WAR file

℡╲_俬逩灬. 提交于 2019-12-23 21:07:28
问题 I have a series of dependent Java projects. I'd like to package them together into a single JAR file to be used in my WAR file. These projects depend on a large number of external libraries and projects such as log4j, apache-commons etc. I select all the projects in Eclipse and export as a JAR file, then copy the JAR file into my /WEB-INF/lib folder of my WAR, then deploy my application. I have the following problems: ClassNotFoundException. The web application cannot find the libraries