maven-2

How can I configure Maven to commit to a Mercurial repository when I install:install

Maven's SCM plug-in doesn't appear to provide a "commit" goal. scm:checkin performs a commit AND push. I need to avoid the push. I'm simply interested in doing an hg commit during install:install. I'm not using the release plugin and don't need it yet. I'm simply working locally in a multi-module environment and want to ensure that my s...

Jalopy to format return/throw statements

Hi all, I would like Jalopy to format my return and throw statements such that they look like a method call since they are: return(true); throw(new IllegalArgumentException("You can't do that, what we you thinking?")); I have the rest of the code formatted exactly the way I want so this is the icing on the cake. Also as an aside, I...

Cruise Control - Parent / Child projects

Hi all, I am using cruise control to constantly check my projects and so far it appears to be working better than continuum except for some minor issues. If I have a project that depends on several other projects and I update one of those dependencies without updating its version number thus requiring no change in the parent pom, the p...

GlassFish v3 and glassfish-maven-plugin (Mac)

I'm trying to use the glassfish-maven-plugin (https://maven-glassfish-plugin.dev.java.net/) with GlassFish v3 (I'm on a Mac and using Eclipse) and I can't seem to get my web app to deploy. I keep running into: The Master Password is required to start the domain. No console, no prompting possible. You should either create the domain...

How should I lay out my repository?

I'm moving an application out of an svn repository it shares with a bunch of other stuff into its own, brand new one. So, I have a chance to make a fresh start with layout. The app itself has two components - a reasonably standard Java webapp, that talks to a database, and a backend component, also Java, that polls the db, and kicks off...

spring - hibernate load *.hbm.xml from classpath resource

I have some hbm.xml files in classpath resource located in src/main/resources maven's folder. I used spring's LocalSessionFactoryBean to load these files with the following bean config: <bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSourceOracl...

How to generate JPA mapping file from the JPA annotated entity classes?

I am using openjpa runtime of JPA specification. At development time I am using annotations to configure jpa entities. At Integration, Pre-Production and and Production environment, I am using orm mapping files to configure entities. Please suggest a tool which can generate mapping files from jpa annotations, so that these mapping files ...

Spring 3 on GlassFish 2.1 java.lang.NoSuchFieldError: APPLICATION_CONTEXT_ID_PREFIX

I am trying to deploy a spring 3 application on GlassFish v2.1 and am getting the following error: APPLICATION_CONTEXT_ID_PREFIX at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:431) I found advice on the spring forum http://forum.springsource.org/showthread.php?t=79929 which says t...

Best Practices for Code Formatting on Large Projects

I maintain the build for a large J2EE/Maven/Hudson/Perforce project with about 20 developers spread across the world. The solution in-place for code formatting is to format the codebase using jalopy when the developer runs the build, thereby ensuring any code which has not been formatted gets formatted prior to check-in. There main pro...

Maven Eclipse Plugin - " ... cannot be resolved"

I am using Eclipse 3.5, Maven 2.0.9 for my multi module Java project in one single workspace. My plugin declaration is below: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.7</version> <configuration> <ajdtVersion>2.0</ajdtVersio...

Maven Assembly plugin - Include repo jars

I have a multi module project and I am using assembly plugin to build a tar file. I have included all of my modules in assembly plugin using moduleSets tag. <moduleSets> <moduleSet> <includes> <include>module1</include> <include>module2</include> All of my module jars are assembled into a lib fo...

NetBeans Platform Application: How to create test environment for first automated end-to-end test through GUI?

How to write first end-to-end automated test for NetBeans Platform Application on Java (not just capture & replay) which suppose run the application and test if click on the Main Menu -> File -> Exit menu item will close it? Given: installed jdk1.6.0_17 and apache-maven-2.2.1 Then: mvn archetype:generate -DarchetypeGroupId=org.codehau...

Using Maven to download drools sources

I'm new to maven and drools, so this could be obvious... I'm trying to work off of the drools snapshot repository using maven/eclipse. I'd like to be able to link the sources/javadoc when updating using maven but I keep getting messages similar to: Can't download java-source for artifact org.drools:drools-process-task:5.1.0.20091223.19...

Maven and the JOGL library?

I've been studying Maven in my free time over the last several days but can't seem to figure out how to organize a project so that the JOGL libraries are used. I would preferably like the following: Automatically download, if necessary, the OS-specific JOGL zip file from here (contains 4 jar files and some native library files (.so/.dl...

Sample Ant project with all the 'features' of Maven?

The past week or two I've been studying Maven, and I like it, but there are just a few things that I require Ant tasks for, rather than Maven's complicated and scarcely-documented POM file. However, I believe Maven has a great folder structure going for it, and I like that it natively supports tests, packages the project into a jar by de...

How to compile a single file with maven?

I set up a working maven project with mvn archetype:create ... I can compile all the sources with mvn compile but I want to be able to compile also a single file at time. There is a way to ask maven to compile an arbitrary single .java file? Thanks Updates 1: I would specify the single file on the command line. I would choose the fil...

Cannot migrate from spring 2.5 to spring 3.0

Problem is a bit stupid but I can't find any spring3.0-with-dependencies.jar. Is it assumed that I should find all necessary dependencies by myself? May I use dependencies from spring 2.5 in this case? UPD: answer is no, I can't. So, where are the dependencies?? ...

send a mail from java5 and java6

I know similar questions have been asked many times befor, but I think this one slitly different :) I'm writing a maven report plugin which will send emails to a list of users. I now have the problem, that the code seems to be working fine when I run it with java5, but failes with java6. Actualy the plugin is writen in Groovy and uses t...

Retrieve property from classpath inside POM

For my current project I want to integrate a maven plug-in for database migrations. For this plug-in to work, however, I have to obtain the database settings inside my POM. My database settings are currently placed inside a hibernate.properties file, positioned in a directory that is marked as maven resource. For a variety of reasons I d...

Maven Eclipse plugin and classpath issues in Eclipse

I am using Eclipse 3.51, Maven 2.0.9, Java 1.4, with the Maven Eclipse plugin 2.7 with WTP 2.0 (not m2Eclipse). I have a flat multi module project that is set up as follows (module Parent with the parent pom, module A and B is dependent on C). Importing the four modules in for the first time will show compile errors as expected since I...