Maven Goals

Trying to understand maven can be tricky (esp. if you are coming from a VS background)

For me, the trick was to uderstand the whole deal with plugins and goals

Tips:

  • To keep things simple, one can just do:
<br />mvn exec:java -Dexec.mainClass="SimpleProducer" -Dexec.args="test"

  • Alternatively, we can use the exec-maven-plugin to add the config in the POM file, then  run the java goal  like so :  mvn exec:java
<br /><build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>SimpleProducer</mainClass>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>

References:

 

 

Advertisements

IntelliJ.

Was playing around with IntelliJ.

Specifically, was investigating how to do the following in IntelliJ:

  • Basic Java development
  • Basic Scala development
  • SBT for Scala
  • Maven for Java
  • Scala Tests

Basic java development:

Maven for Java:

 

Tips: 

One of the things i realized is – its critical to understand the basic. Specifically:

References:

Java, Maven, Scala, SBT Concepts

Am toe dipping into maven. Trying to make sense of how maven fits in with  IDE, command line maven, POM files blah blah etc.

tips:

  • intellij will have default support within the IDE for both Maven and SBT.  So as long as we are not using mvn and sbt  from the command line we should be good.

java fundamental concepts:

maven:

base scala in intellij:

scala with SBT: