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 […]

Sonarcube – Maven and Docker analysis

SonarLint is one tool I gravitate towards – inline analysis of my code in Eclipse.  I have finally broken down and investigated using Sonarcube with maven – the heavy weight tool for evaluating code.  It’s exciting. You need to pull your sonarqube docker. You can find more details at https://hub.docker.com/_/sonarqube/?tab=description :~/my-repo$ docker pull sonarqube Using […]

EAR Projects Generated for JavaEE Import

Importing my project into Eclipse, I found so many additional EAR projects were being generated. To stop this feature, I went to Eclipse > Preference > Maven > Java EE Integration and unchecked Enable Java EE Configuration. I removed the cached EAR projects (deleting from disk) and removed the regular projects, and imported again.  Voila…. […]

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 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 […]

Maven Animal Sniffer Plugin

For the past few years, most of my personal and professional projects are built using Maven.  The dependency management and corresponding build lifecycle enable me to do some complex builds (for instance HBase 1.2.5 Client Jars). Command mvn dependency:tree -f demo-app/pom.xml Result [INFO] demo.app:demo-app:jar:1.0-SNAPSHOT [INFO] +- junit:junit:jar:4.12:test [INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] \- org.apache.hbase:hbase:pom:1.2.5:compile [INFO] […]