Random EAR Projects

I had a similar experience and ran across https://wiki.eclipse.org/M2E-WTP/New_and_Noteworthy/1.1.0 . m2e-wtp can also be disabled via the m2e.wtp.activation>false in the Maven section of your project pom;xml. I create a new workspace and cloned a fresh copy of my code in a temp directory. I then updated the parent pom.xml with the following: <properties><m2e.wtp.activation>false</m2e.wtp.activation><m2e.jaxrs.activation>false</m2e.jaxrs.activation><m2e.jpa.activation>false</m2e.jpa.activation><m2e.jsf.activation>false</m2e.jsf.activation><m2e.cdi.activation>true</m2e.cdi.activation></properties> I then […]

Maven Surefire runs out of memory

I’m running a complicated integration test, and needed to allocate memory appropriately – MAVEN_OPTS was used to increase memory, and I still ran into an issue with MAVEN out-of-memory.  To fix the issue, I had to use the Surefire argsline:  <plugins>   <plugin>      <groupId>org.apache.maven.plugins</groupId>      <artifactId>maven-surefire-plugin</artifactId>      <configuration>         <argLine>-Xms2G -Xmx2G</argLine>      </configuration>   </plugin></plugins>

License Management via Maven Plugin

Keeping a license current is luckily addressed by the mycila license maven plugin. This plugin scans the project files in src files and updates the files with the license.txt format. To configure the plguin refer to http://code.mycila.com/license-maven-plugin/reports/3.0/format-mojo.html#excludes. To check the current status of the copyrights and see what needs to be updated: mvn com.mycila:license-maven-plugin:check -f […]

Maven Dependency Version Management

To check the version of a dependency (and subsequently all dependencies), and see if there is a need to update the dependency: 1 – Change to cd my-project2 – Run mvn versions:display-dependency-updates3 – Locate the section in the output:[INFO] The following dependencies in Dependency Management have newer versions:[INFO] com.cloudant:cloudant-client ……………………. 2.4.1 -> 2.16.0 4 – […]

Maven Repository – Go Offline with dependencies

Maven Repository My team uses the pom.xml to generate a repository which is handed off to the secondary developers. For instance, I have a custom db2 jar ## Update your localRepository – Start a Shell – cd ~/.m2 – vim settings.xml – add `<localRepository>/Users/userid/git/client-app/documentation/repo/local_repo</localRepository>` Note: the path is relative to the location of my repo […]

Localized Maven Repositories – A Hot Tip

I’ve been building a Maven Project that uses some jar files which are not in Maven Central (or any repository). I ran across this article – Local Maven Dependencies. I found it very helpful. Simply, do the following: create a directory (d:/folder/repo) Run a maven deploy to url (it’ll create the repository details based on […]

My Experience with maven-antrun-plugin

I’ve been spending some time with maven so that files which matched a certain criteria were automatically moved in the project – OpenNTF SocialSDK.  The files only should be moved when the files don’t have -SNAPSHOT at the end of the version. I started modifying some code that used maven-antrun-plugin, which bridges the maven-ant worlds.  […]