Maven


go to main page

(0)What does POM stands for?
(1)How to add resource directory?
(2)How to execute hibernate insturmental build?
(3)How to run java app?
What does POM stands for?

TOP
How to add resource directory?
Example
<project ..
. . .
<build>
       <resources>
      <resource>
        <directory>src/main/resources</directory>

      </resource>
    </resources>
. . . 
</build>

</project>

TOP
How to execute hibernate insturmental build?
Example
<project>
<build>
<plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <tasks>
            <taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
              <classpath>
                <path refid="maven.runtime.classpath" />
                <path refid="maven.plugin.classpath" />
              </classpath>
            </taskdef>
            <instrument verbose="false">
              <fileset dir="${project.build.outputDirectory}">
                <include name="**/domain/**/*.class" />
              </fileset>
            </instrument>
          </tasks>
        </configuration>
      </plugin>

. ...
</build>
</project>

TOP
How to run java app?
Example
<build>
<plugins>  
    <plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>exec-maven-plugin</artifactId>
   <version>1.1.1</version>
   <executions>
    <execution>
     <phase>test</phase>
     <goals>
      <goal>java</goal>
     </goals>
     <configuration>

      <mainClass>com.hbo.app.Main</mainClass>
      <arguments>
       <argument>arg0</argument>
       <argument>arg1</argument>
      </arguments>
     </configuration>
    </execution>
   </executions>
  </plugin>
    </plugins>
</build>

TOP