“webxml attribute is required” error in Maven

It would be helpful if you can provide a code snippet of your maven-war-plugin. Looks like the web.xml is at right place, still you can try and give the location explicitly <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webXml>src\main\webapp\WEB-INF\web.xml</webXml> </configuration> </plugin>

spring boot war without tomcat embedded

Following the Hint from M. Deinum I excluded the tomcat-depedency. With the following pom.xml (relevant snippet) a maven clean package has the result I want to get. … <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.1.6.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <!– Add tomcat only if I want … Read more

what is the right path to refer a jar file in jpa persistence.xml in a web app?

Taking a look at jsr always works! 8.2.1.6.3 Jar Files One or more JAR files may be specified using the jar-file elements instead of, or in addition to the mapping files specified in the mapping-file elements. If specified, these JAR files will >be searched for managed persistence classes, and any mapping metadata annotations found on … Read more

IntelliJ and Tomcat….changed files are not automatically recognized by Tomcat

This cannot be done if you deploy a war with IntelliJ IDEA. However, it can be if you deploy an exploded war. In IDEA: open your Tomcat Run/Debug configuration (Run > Edit Configurations) Go to the “Deployment” tab In the “Deploy at Server Startup” section, remove (if present) the artifact my-webapp-name:war Click the add icon, … Read more

Maven WAR dependency

There’s another option since maven-war-plugin 2.1-alpha-2. In your WAR project: <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <attachClasses>true</attachClasses> </configuration> </plugin> This creates a classes artifact which you can use in the acceptance tests project with: <dependency> <groupId>your-group-id</groupId> <artifactId>your-artifact-id</artifactId> <version>your-version</version> <classifier>classes</classifier> </dependency>

How do I run a class in a WAR from the command line?

Similar to what Richard Detsch but with a bit easier to follow (works with packages as well) Step 1: Unwrap the War file. jar -xvf MyWar.war Step 2: move into the directory cd WEB-INF Step 3: Run your main with all dependendecies java -classpath “lib/*:classes/.” my.packages.destination.FileToRun

Oracle JDBC ojdbc6 Jar as a Maven Dependency

It is better to add new Maven repository (preferably using your own artifactory) to your project instead of installing it to your local repository. Maven syntax: <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.3</version> </dependency> … <repositories> <repository> <id>codelds</id> <url>https://code.lds.org/nexus/content/groups/main-repo</url> </repository> </repositories> Grails example: mavenRepo “https://code.lds.org/nexus/content/groups/main-repo” build ‘com.oracle:ojdbc6:11.2.0.3’

How to create war files

You can use Ant to set up, compile, WAR, and deploy your solution. <target name=”default” depends=”setup,compile,buildwar,deploy”></target> You can then execute one click in Eclipse to run that Ant target. Here are examples of each of the steps: Preconditions We’ll assume that you have your code organized like: ${basedir}/src: Java files, properties, XML config files ${basedir}/web: … Read more