maven-2

Hibernate 3.4 with slf4j and log4j

I'm attempting to upgrade from Hibernate 3.2 to 3.4, which apparently uses slf4j. Our project currently uses log4j. So my assumption is that I should be using the slf4j-log4j12 wrapped implementation. The Maven slf4j dependency is: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1....

Place MySQL connector JAR in WEB-INF/lib of my WAR instead of in $CATALINA_HOME/common/lib?

I'm about to use MySQL with Hibernate on a Tomcat 5.5.x server. Do I have to put mysql-connector-java-[version]-bin.jar in $CATALINA_HOME/common/lib/ or could I place it in WEB-INF/lib inside my WAR file with my other library dependencies? It would be easier to have it in my WAR in WEB-INF/lib, as I could get it using the Maven reposit...

Generating a Maven POM from an existing project?

Do any of the IDEs (or any other tool for that matter) have the ability to generate a POM based on an existing project? ...

Maven Jboss AOP plugin - anybody had success with annotation marked pointcuts?

In my jboss-aop.xml, if I mark pointcuts using normal signature, like this: <bind pointcut="execution(public void org.POJO->noop())"> <Interceptor class="org.SimpleInterceptor"/> </bind> aspects compile without a problem, but if I use annotation, like this <bind pointcut="execution(void *->@org.Trace(..))"> <interceptor class="org....

How do you turn a FileSet into a list of Files in a Mojo

I'm writing my first Maven Mojo, in it I'm wanting to take a file set and process all the files it refers to. In pseudo code what I'd like to do... void myCode(org.apache.maven.model.FileSet fileSet) { List<java.io.File> files = FileSetTransformer.toFileList(fileSet); for (File f : files) { doSomething(f); } } So ...

Maven Embedded Jetty Container fails to load Taglibs: Unable to initialize TldLocationsCache

Hi all, I'm using the Maven Cargo Plugin to startup a Jetty web container for running some integration tests in a separate project module. The problem i'm battling with occurs when i added taglibs into the jsp pages and tried hitting them from the integration tests. When jetty tries to compile the pages it fails with this error: org....

Howto pass Java system properties to maven-cargo container

I'm preparing a maven2 web project for continuous integration. I use the maven cargo plugin to automatically deploy the WAR to Tomcat6x before running integration tests. My code depends on some system properties which are set with MAVEN_OPTS=-Dfoo=bar. Unfortunately these properties are missing when the application is deployed to Tomcat...

Maven 2 Checkstyle configLocation

Hi, i have a project which has as maven dependency a jar file which includes a xml file where i stored my rules for checkstyle. I thought it would be ok to just use this configuration: <configLocation>mycheckstyle.xml</configLocation>. My understanding is that the file should be searched on the classpath and my jar file is a Maven depen...

How to externalize pieces of maven build file?

I was faced to a problem how to version a configuration file in XML format. The easiest way is to write XSLT updates. Every release of the application has its own XSLT update. All these update files are small enough to be managable by the IDE, especially its DIFF tool. Since the project is already been developed as Maven2 Java logical s...

Automatically activate parent plugin in Maven

Is it possible to have a plugin in the parent which is deactivated, and when the child inherits this plugin it gets automatically activated ? Thanks in advance, kuku ...

Why can't I search maven projects in eclipse

I'm using the m2Eclipse plugin (http://m2eclipse.sonatype.org/) to handle maven modules in eclipse. After enabling a project for dependency management and for nested modules, I can no longer do a 'File Search' over the project. The search finishes instantly with the search window display "0 matches in empty scope". Any ideas how I can...

EL in a JSP stopped evaluating

In a JSP page(index.jsp): ${requestContext.requestURL} is the URL just shows the expression itself. It used to be evaluated to something like "http://.../somerset/" I created the Maven project with maven-archetype-webapp archetype in Eclipse. The Jetty version is jetty-6.1.14. My web.xml is simple: <web-app> <display-name>Arche...

Maven FindBugs plugin

You have usage: http://mojo.codehaus.org/findbugs-maven-plugin/usage.html <project> [...] <reporting> [...] <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>1.2.1</version> <configuration> <xmlOutput>true|false</xmlOutput> <xmlOutput...

selenium-maven-plugin

Hi, i'm trying to set up the selenium-maven-plugin and having some difficulties i hope somebody can help me. My configuration looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <executions> <execution> <phase>pre-integration-test</phase> <goals> <goal>...

How to copy from one file to another in Maven?

I have to create test war and production war, which will have a different log4j.properties file in the WEB-INF directory. I have these files log4j.properties (test war) and dev.log4j.properties (for production enivorment). How to copy the dev.log4j.properties file into log4j.properties file for production war? ...

Selenium Grid + Maven 2

Is there a good tutorial or does anyone have experience with setting this up ? I have a Testsuite.html which launches my tests in one browser atm. This is done in the integration-test lifecycle by the maven selenium plugin. I want to run my tests on multiple browsers. I couldn't find any documentation about selenium grid + maven. I hope ...

Trouble getting Hibernate Core and Hibernate Annotations using Apache Ivy (but it's also Maven2 related.)

It's a long one! ;-) There are a lot of copy pasted text in this question which makes it look complicated. And to be honest, it's a lot of information! However to an experienced person a lot of it might be unnecessary and easy to skim over. In its essence I'm only wondering why my basic Hibernate Core + Hibernate Annotations test proje...

What are some additional directory conventions for Maven projects?

Maven 2 uses a standard directory layout for projects, documented here: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html What I'm wondering is: are there recommended conventions for other projects besides the plain-vanilla Java library, JEE and WebApp projects? Specifically, where to place...

Maven plugin executing another plugin

I'm trying to create a new plugin to package my latest project. I'm trying to have this plugin depend on the maven-dependency-plugin to copy all my projects dependencies. I've added this dependency to my plugin's pom, but I can't get it to execute. I have this annotation in my plugins main Mojo: @execute goal="org.apache.maven.plugin...

What is the proper dependency entry in pom.xml to use the Snowball analyzer with Lucene 2.4.0?

I'm trying to swap in the SnowballAnalyzer for StandardAnalyzer on my Maven 2 project. I'm currently using <dependency> <groupId>org.apache.lucene</groupId> <artifactId>lucene-contrib</artifactId> <version>2.4.0</version> <scope>compile</scope> </dependency> but I keep getting the following erro...