JavaSheriff
JavaSheriff

Reputation: 7665

maven to create project installation folder

I am trying to create release installation folder that will get all war's/jar's of my project
Is it possible to run maven on none Jave project directory (the project installation Dir) and instruct it to get some java dependencies and help me package the project, or I need to use ant for this?

pseudo script can be:

clean release folder
make release folder
copy documents to release
get dependent jars from repository to /java project
create release text file

Thank you!

Upvotes: 0

Views: 93

Answers (1)

Raghuram
Raghuram

Reputation: 52635

Assuming that the wars and jars that you referring are maven projects (which are available in local/remote maven repository), you can do this to a large extent using maven assembly plugin.

You would define a project, where you would define all the jars and wars you are interested as dependencies.

As for Readme, you can create this file in this maven project and have it copied to a location of your choice.

In your assembly descriptor, you would specify the folder you want the dependencies to be copied.

<assembly>
    <id></id>
    <formats>
        <format>dir</format>
    </formats>
    <files>
        <file>
            <source>${basedir}/src/docs/README.txt</directory>
            <outputDirectory>/</outputDirectory>
        </file>
    </files>
    <dependencySets>
        <dependencySet>
            <outputDirectory>/myfolder</outputDirectory>            
        </dependencySet>
    </dependencySets>
</assembly>

Upvotes: 1

Related Questions