Setting Java heap space under Maven 2 on Windows

The environment variable to set is MAVEN_OPTS, for example MAVEN_OPTS=-Xmx1024m. The maxmem configuration in the pom only applies when you set the compiler plugin to fork javac into a new JVM. Otherwise the plugin runs inside the same VM as Maven and thus within the memory passed on the command line via the MAVEN_OPTS. To … Read more

How can I tell jaxb / Maven to generate multiple schema packages?

I had to specify different generateDirectory (without this, the plugin was considering that files were up to date and wasn’t generating anything during the second execution). And I recommend to follow the target/generated-sources/<tool> convention for generated sources so that they will be imported in your favorite IDE automatically. I also recommend to declare several execution … Read more

Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

Perhaps a version of maven war plugin is being used, which does not work with Java 7? As per this issue (which describes a similar problem), 2.1.1 version of maven war plugin should work. Include the following in your pom.xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> </plugin>

How to get the Maven local repo location?

If you want just the local repo, try this: mvn help:evaluate -Dexpression=settings.localRepository | grep -v ‘\[INFO\]’ EDIT I’m revisiting this after years because recent versions of the Maven help plugin introduced a useful parameter for the evaluate goal called forceStdout that allows us to remove the need to grep the output: mvn help:evaluate -Dexpression=settings.localRepository -q … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)