Project

General

Profile

« Previous | Next » 

Revision 5864d558

Added by Andreas Müller almost 2 years ago

ref #6696 write model cache to target and use compile phase

View differences:

cdmlib-cache/pom.xml
56 56
                    <groupId>org.codehaus.mojo</groupId>
57 57
                    <artifactId>exec-maven-plugin</artifactId>
58 58
                    <versionRange>[3.0.0,)</versionRange>
59
                    <phase>process-resources</phase>
59
                    <phase>compile</phase>
60 60
                    <goals>
61 61
                      <goal>exec</goal>
62 62
                    </goals>
cdmlib-cache/src/main/java/eu/etaxonomy/cdm/cache/CdmModelCacher.java
180 180
        try{
181 181
            System.out.println("Model created.");
182 182
        	if (!modelClassMap.isEmpty()){
183
        	    File outFile = new File("src/main/resources/" + CDM_MAP_SER_FILE_PATH);
184
        	    System.out.println("writing to " + outFile.getAbsolutePath());
183
        	    String strPath = CdmModelCacher.class.getProtectionDomain().getCodeSource().getLocation().getFile();
184
//        	    File outFile = new File("src/main/resources/" + CDM_MAP_SER_FILE_PATH);
185
                File outFile = new File(strPath + CDM_MAP_SER_FILE_PATH);
186

  
187
                System.out.println("writing to " + outFile.getAbsolutePath());
185 188
        		FileOutputStream fout = new FileOutputStream(outFile);
186 189
        		ObjectOutputStream oos = new ObjectOutputStream(fout);
187 190
        		oos.writeObject(modelClassMap);

Also available in: Unified diff