Make sure index.html and css files are included in the final ZIP
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 13 May 2013 17:23:13 +0200
changeset 1208ea9ac5eea2d4
parent 1207 8ace83ecf905
child 1209 bf622f485775
Make sure index.html and css files are included in the final ZIP
ko-archetype-test/src/test/java/org/apidesign/html/archetype/test/VerifyArchetypeTest.java
ko-archetype/src/main/resources/archetype-resources/src/main/assembly/bck2brwsr.xml
     1.1 --- a/ko-archetype-test/src/test/java/org/apidesign/html/archetype/test/VerifyArchetypeTest.java	Mon May 13 16:33:01 2013 +0200
     1.2 +++ b/ko-archetype-test/src/test/java/org/apidesign/html/archetype/test/VerifyArchetypeTest.java	Mon May 13 17:23:13 2013 +0200
     1.3 @@ -22,6 +22,7 @@
     1.4  
     1.5  import java.io.File;
     1.6  import java.util.Properties;
     1.7 +import java.util.zip.ZipFile;
     1.8  import org.apache.maven.it.Verifier;
     1.9  import org.testng.annotations.Test;
    1.10  import static org.testng.Assert.*;
    1.11 @@ -81,6 +82,13 @@
    1.12              }
    1.13          }
    1.14  
    1.15 +        File zip = new File(new File(created, "target"), "o-a-test-1.0-SNAPSHOT-bck2brwsr.zip");
    1.16 +        assertTrue(zip.isFile(), "Zip file with website was created");
    1.17 +        
    1.18 +        ZipFile zf = new ZipFile(zip);
    1.19 +        assertNotNull(zf.getEntry("public_html/index.html"), "index.html found");
    1.20 +        assertNotNull(zf.getEntry("public_html/twitterExample.css"), "css file found");
    1.21 +        
    1.22      }
    1.23  
    1.24      private Verifier generateFromArchetype(final File dir, String... params) throws Exception {
     2.1 --- a/ko-archetype/src/main/resources/archetype-resources/src/main/assembly/bck2brwsr.xml	Mon May 13 16:33:01 2013 +0200
     2.2 +++ b/ko-archetype/src/main/resources/archetype-resources/src/main/assembly/bck2brwsr.xml	Mon May 13 17:23:13 2013 +0200
     2.3 @@ -20,7 +20,7 @@
     2.4    </dependencySets> 
     2.5    <fileSets>
     2.6        <fileSet>
     2.7 -          <directory>${project.build.directory}/classes/org/apidesign/html/demo/twitter/</directory>
     2.8 +          <directory>${project.build.directory}/classes/${package.replace('.','/')}/</directory>
     2.9            <includes>
    2.10                <include>**/*</include>
    2.11            </includes>