ant
ant

Reputation: 22948

Building non-java project

I'm trying to build non-java project, it basically has some folders and subfolders I want to include in the jar is that possible ?

Upvotes: 1

Views: 1024

Answers (1)

Sean Patrick Floyd
Sean Patrick Floyd

Reputation: 298818

Sure. It's trivial if you use the standard layout (put your stuff inside src/main/resources), otherwise you just have to specify resource directories:

<build>
    <resources>
        <resource>
            <directory>some/directory</directory>
            <targetPath>first</targetPath>
        </resource>
        <resource>
            <directory>some/other/directory</directory>
            <targetPath>second</targetPath>
        </resource>
        <resource>
            <directory>a/third/directory</directory>
            <!-- standard target path -->
        </resource>
    </resources>
</build>

You should probably also set the property <maven.test.skip>true</maven.test.skip>. Nope, just checked, you don't need to.

Basically, some participants of the standard workflow (namely the compiler and the surefire plugin) check for java source folders, and if they don't find any, they just skip processing.

Upvotes: 1

Related Questions