maven-tomcat-plugin

How to run Tomcat 7 using Maven 2 Tomcat plugin?

北慕城南 提交于 2019-12-17 21:49:37
问题 I am using Maven 2 and I have an external Tomcat 7 . I was wondering how to run Tomcat 7 from using Maven Tomcat plugin. And does Maven Tomcat plugin in Maven 3 runs the Tomcat 7 by default. Thanks. 回答1: This works for me: http://tomcat.apache.org/maven-plugin-2.1/ With this plugin config: <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <path>/</path> </configuration> </plugin> And running with mvn clean

Tomcat 7 Maven Plugin multiple context

泪湿孤枕 提交于 2019-12-13 02:26:22
问题 In my current state of the pom.xml i have <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.0</version> <configuration> <path>/myPath</path> </configuration> </plugin> this is working fine. I now am trying to add an extra context for the images on the server, so that the "old" context /myPath is directing to the webapp and /images can be used to address images. I have tried to add a context file, but when I do this only my /images

How to set agentlib property for mvn tomcat plugin (jpda)

一世执手 提交于 2019-12-12 07:13:13
问题 Related to eclipse debug remote web application => How do I debug a remote application in my eclipse How can I set / archive this in the mvn tomcat plugin? http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/ The only thing that might help is setting systemProperty but that doesn't work for me ;/ Goal: let tomcat run on console via maven but enable remote debugging for different IDEs (YES guys, we can run tomcat in Eclipse WTP! That's not the question ;) 回答1: $ export

Not able to read environment variable in persistence.xml

醉酒当歌 提交于 2019-12-11 11:59:22
问题 I have a Maven3 project where I'm using the tomcat7-maven-plugin. I would like to set the path for the embedded database via an environment variable argument to the jvm. Reading the variable with System.getenv("myDataDir") within a Java-Method returns the correct path. But when I try to set the variable ${myDataDir} in my persistence.xml and then I start tomcat with "mvn tomcat:run" I get FileNotFoundExceptions because the variable is not replaced with the actual value (it says e.g. Cannot

Visibility of buildnumber-maven-plugin property ${buildNumber}

我的梦境 提交于 2019-12-11 03:25:09
问题 I am trying to use buildnumber-maven-plugin to append the SCM build number to the WAR artifact name and then use tomcat7-maven-plugin to deploy it but in a context path that doesn't include the build number. So I am making foo-r1234.war where foo is my project and 1234 is the revision number in Subversion but I want to deploy it in a Tomcat context foo . I got the war generation to reflect the build number but the problem is that the Tomcat plugin doesn't see the ${buildNumber} property

maven tomcat7:run configure datasource

僤鯓⒐⒋嵵緔 提交于 2019-12-10 16:10:40
问题 I have a multimodule maven project, and I want to use it with tomcat7 maven plugin and start it with: mvn tomcat7:run But I can't figure out how to configure a jndi datasource. I've tried to put in my pom.xml : <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.0</version> <configuration> <contextFile>tomcat/context.xml</contextFile> </configuration> </plugin> and in the context.xml : <?xml version="1.0" encoding="UTF-8"?> <Context>

tomcat7-maven-plugin extraDependency seems not being loaded

对着背影说爱祢 提交于 2019-12-10 14:37:50
问题 I've been using tomcat7-maven-plugin. I want to run my webapp which connects to the PostgreSQL database by using the embedded tomcat. This is the related part of my POM file: <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.0-SNAPSHOT</version> <executions> <execution> <id>tomcat-run</id> <goals> <goal>exec-war-only</goal> </goals> <phase>package</phase> <configuration> <path>/</path> <attachArtifactClassifierType>war<

getting a “Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet” when starting springboot project from intellij

僤鯓⒐⒋嵵緔 提交于 2019-12-10 09:58:39
问题 I created a simple springboot project from Spring Initializr. when starting springboot project from intellij, I am getting below exception but when running from terminal using maven I don't get any exception(mvn spring-boot:run).I tried solving this by adding below to my pom.xml, but after I was getting some other exceptions and solve that I get some more exception. Please tell anyone of you were able to solve this. Thank you . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ |

Maven: Where to put generated resources for tomcat-maven-plugin?

假装没事ソ 提交于 2019-12-09 08:20:30
问题 I have CSS and JavaScript files in src/main/webapp directory of my project. I want to join add joined and minified version of these resources to my WAR file and to the place where tomcat-maven-plugin picks it up. I used yuicompressor-maven-plugin to create the files and put it to ${project.build.directory}/${project.build.finalName} . It works great for maven package and those resources make their way to WAR file, but somehow tomcat-maven-plugin does not see those at all. Should I use a

tomcat 7 maven plugin snapshot repository issue?

你说的曾经没有我的故事 提交于 2019-12-09 07:03:18
问题 I would like to have tomcat 7 maven plugin, and followed the instruction from [the plugin site][1]. What happened is that it seems to be able to find the tomcat 6.0.29, but not the version 7. I know that because when i tried tomcat:run, the one that was started is the 6.0.29 version. As far as i know, the plugin for t7 is still in development, thus the snapshot version, and i assumed that i'd need to provide the repo for the snapshot plugin, and i placed <pluginRepository> <id>tomcat snapshot