Tomcat 7 – Maven Plugin?

It work for me as the following. My setting.xml <server> <id>local_tomcat</id> <username>ray</username> <password>password</password> </server> My plugin configuration <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>tomcat-maven-plugin</artifactId> <configuration> <server>local_tomcat</server> <url>http://localhost:8080/manager/text</url> </configuration> </plugin> My tomcat-users.xml <role rolename=”manager-gui”/> <role rolename=”manager-script”/> <user password=”password” roles=”manager-gui, manager-script” username=”ray”/>

How to change maven logging level to display only warning and errors?

Answering your question I made a small investigation because I am also interested in the solution. Maven command line verbosity options According to http://books.sonatype.com/mvnref-book/reference/running-sect-options.html#running-sect-verbose-option -e for error -X for debug -q for only error Maven logging config file Currently maven 3.1.x uses SLF4J to log to the System.out . You can modify the logging settings … Read more

Maven artifact and groupId naming

Weirdness is highly subjective, I just suggest to follow the official recommendation: Guide to naming conventions on groupId, artifactId and version groupId will identify your project uniquely across all projects, so we need to enforce a naming schema. It has to follow the package name rules, what means that has to be at least as … Read more

Maven – how can I add an arbitrary classpath entry to a jar?

I found that there is an easy solution for this problem. You can add a <Class-Path> element to <manifestEntries> element, and set <addClassPath>true</addClassPath> to <manifest> element. So value of <Class-Path> element is added to class-path automatically. Example: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addDefaultImplementationEntries>true</addDefaultImplementationEntries> <addClasspath>true</addClasspath> <mainClass>your.main.Class</mainClass> </manifest> <manifestEntries> <Class-Path>../conf/</Class-Path> </manifestEntries> </archive> </configuration> </plugin>

Maven classpath order issues

As of version 2.0.9 maven uses pom order for classpath, so you can actually manipulate it now. We mostly supress transitive dependencies to external libraries that we also include directly. From the release notes of maven 2.0.9: MNG-1412 / MNG-3111 introduced deterministic ordering of dependencies on the classpath. In the past, natural set ordering was … Read more