Hook
Hook

Reputation: 137

Create empty folder on Karaf / ODL / Opendaylight

I need to create an empty folder when installing a feature. Any suggestion? So far I tried something like(without success):

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
        <execution>
            <id>empty-config-folder</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>run</goal>
            </goals>
            <configuration>
                <target>
                    <mkdir dir="${project.build.directory}/assembly/etc/empty-folder" />
                </target>
            </configuration>
        </execution>
    </executions>
</plugin>

Upvotes: 0

Views: 102

Answers (1)

Christian Schneider
Christian Schneider

Reputation: 19606

You can simply create the folder in Java code inside one of the bundles you install. See File.mkdirs()

Upvotes: 3

Related Questions