private void processPom(Context context, File pom, String moduleOffset) throws Exception { log.debug("Processing pom " + pom); processTemplate(pom, context, Constants.ARCHETYPE_RESOURCES + getOffsetSeparator(moduleOffset) + Constants.ARCHETYPE_POM, getEncoding(null), true); }
private void processPom( Context context, File pom, String moduleOffset ) throws OutputFileExists, ArchetypeGenerationFailure { getLogger().debug( "Processing pom " + pom ); processTemplate( pom, context, Constants.ARCHETYPE_RESOURCES + getOffsetSeparator( moduleOffset ) + Constants.ARCHETYPE_POM, getEncoding( null ), true ); }
private void processPomWithMerge(Context context, File pom, String moduleOffset) throws Exception { log.debug("Processing pom " + pom + " with merge"); File temporaryPom=getTemporaryFile(pom); processTemplate(temporaryPom, context, Constants.ARCHETYPE_RESOURCES + getOffsetSeparator(moduleOffset) + Constants.ARCHETYPE_POM, getEncoding(null), true); pomManager.mergePoms(pom, temporaryPom); // getTemporaryFile sets deleteOnExit. Lets try to delete and then make sure deleteOnExit is // still set. Windows has issues deleting files with certain JDKs. try { FileUtils.forceDelete(temporaryPom); } catch (IOException e) { temporaryPom.deleteOnExit(); } }
private void processPomWithParent(Context context, File pom, String moduleOffset, File basedirPom, String moduleId) throws Exception, IOException, InvalidPackaging, ArchetypeGenerationFailure { log.debug("Processing pom " + pom + " with parent " + basedirPom); processTemplate(pom, context, Constants.ARCHETYPE_RESOURCES + getOffsetSeparator(moduleOffset) + Constants.ARCHETYPE_POM, getEncoding(null), true); log.debug("Adding module " + moduleId); pomManager.addModule(basedirPom, moduleId); pomManager.addParent(pom, basedirPom); }
private void processPomWithMerge( Context context, File pom, String moduleOffset ) throws OutputFileExists, IOException, XmlPullParserException, ArchetypeGenerationFailure { getLogger().debug( "Processing pom " + pom + " with merge" ); File temporaryPom = getTemporaryFile( pom ); processTemplate( temporaryPom, context, Constants.ARCHETYPE_RESOURCES + getOffsetSeparator( moduleOffset ) + Constants.ARCHETYPE_POM, getEncoding( null ), true ); pomManager.mergePoms( pom, temporaryPom ); // getTemporaryFile sets deleteOnExit. Lets try to delete and then make sure deleteOnExit is // still set. Windows has issues deleting files with certain JDKs. try { FileUtils.forceDelete( temporaryPom ); } catch ( IOException e ) { temporaryPom.deleteOnExit(); } }
private void processPomWithParent( Context context, File pom, String moduleOffset, File basedirPom, String moduleId ) throws OutputFileExists, XmlPullParserException, DocumentException, IOException, InvalidPackaging, ArchetypeGenerationFailure { getLogger().debug( "Processing pom " + pom + " with parent " + basedirPom ); processTemplate( pom, context, Constants.ARCHETYPE_RESOURCES + getOffsetSeparator( moduleOffset ) + Constants.ARCHETYPE_POM, getEncoding( null ), true ); getLogger().debug( "Adding module " + moduleId ); pomManager.addModule( basedirPom, moduleId ); pomManager.addParent( pom, basedirPom ); }