Edgewall Software

Changes between Version 2 and Version 3 of Recipe Book


Ignore:
Timestamp:
May 3, 2007, 4:09:14 PM (17 years ago)
Author:
alec.munro@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Recipe Book

    v2 v3  
    1515</build>
    1616}}}
     17
     18== Complicated Maven Build ==
     19
     20There's probably some ways I could make this simpler.
     21
     22First off, we need to use an in-memory database to run our tests, hence the changes to persistence.xml.
     23
     24Then, we run the tests on their own.
     25
     26Then, we install the modules of the project (I'm not certain how necessary this is, but I wanted to ensure that any module dependencies would resolve to the local copies, not the ones on the remote repository).
     27
     28Then, we run clover:instrument and clover:clover. Technically, we shouldn't need to do this, because it should be handled by the site generation, but there's apparently a bug somewhere, in Maven or Clover, that makes it necessary to run Clover twice to get the results we want. Yes, this does mean we run all the tests twice, or possibly three times (ugh).
     29
     30Then we revert to the proper version of persistence.xml.
     31
     32Then we deploy, skipping the tests.
     33
     34{{{
     35<build xmlns:sh="http://bitten.cmlenz.net/tools/sh">
     36
     37  <step id="configure_1" description="Configure Persistence.xml">
     38    <sh:exec executable="mv" args="UI/src/main/resources/META-INF/persistence.xml UI/src/main/resources/META-INF/PGSQLpersistence.xml" />
     39  </step>
     40
     41  <step id="configure_2" description="Configure Persistence.xml">
     42    <sh:exec executable="cp" args="UI/src/main/resources/META-INF/testPersistence.xml UI/src/main/resources/META-INF/persistence.xml" />
     43  </step>
     44
     45  <step id="test" description="Call Maven Test">
     46    <sh:exec executable="mvn" args="-Pbootstrap test" />
     47  </step>
     48
     49  <step id="install" description="Call Maven Install">
     50    <sh:exec executable="mvn" args="-Pbootstrap install" />
     51  </step>
     52
     53  <step id="clover_prep" description="Prepate clover">
     54    <sh:exec executable="mvn" args="clover:instrument clover:clover" />
     55  </step>
     56
     57  <step id="site" description="Deploy the site">
     58    <sh:exec executable="mvn" args="site-deploy" />
     59  </step>
     60
     61  <step id="configure_3" description="Configure Persistence.xml">
     62    <sh:exec executable="cp" args="UI/src/main/resources/META-INF/PGSQLpersistence.xml UI/src/main/resources/META-INF/persistence.xml" />
     63  </step>
     64
     65  <step id="deploy" description="Call Maven Deploy">
     66    <sh:exec executable="mvn" args="-Pbootstrap -Dmaven.test.skip=true deploy" />
     67  </step>
     68
     69</build>
     70}}}