maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Hoffer" <DHof...@xrite.com>
Subject RE: Newbie: how to do a release?
Date Fri, 22 Feb 2008 12:16:58 GMT
Another option is to go one step further and let maven generate the
shell script(s) for you as well.  Check out appassembler-maven-plugin.

-Dave

-----Original Message-----
From: Upul Godage [mailto:upulg.dev@gmail.com] 
Sent: Thursday, February 21, 2008 11:13 PM
To: Maven Users List
Subject: Re: Newbie: how to do a release?

Hi,

Check out the assembly plugin. It does just that. You have to write an
assembly descriptor xml to customize the release the way you want it.
http://maven.apache.org/plugins/maven-assembly-plugin/howto.html

Here is a very simple assembly descriptor file which bundles all jar
files
to the a lib folder and copy a given run script to the root of the
distribution.

<assembly>
    <id>bin</id>
    <includeBaseDirectory>true</includeBaseDirectory>
    <formats>
        <format>zip</format>
    </formats>

    <fileSets>
        <fileSet>
            <directory>src/main/bin</directory>
        <outputDirectory>/</outputDirectory>
            <includes>
                <include>run.sh</include>
            </includes>
            <fileMode>755</fileMode>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
        <outputDirectory>lib</outputDirectory>
        </dependencySet>
    </dependencySets>
</assembly>

Descriptor file can be given in the pom.xml directly like this without
giving it in the command line.
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <descriptors>
 
<descriptor>src/main/assembly/bin.xml</descriptor>
                    </descriptors>
                </configuration>
            </plugin>


Hope this helps.

Upul


On Fri, Feb 22, 2008 at 9:26 AM, Chris <shef31@yahoo.com> wrote:

> I've got a standard Java app. I've got a pom that successfully
generates
> a jar file, and I got it to generate some javadoc as well.
>
> Now how do I generate a standard release?
>
> In a normal app, the jar goes in a /lib folder along with all the
> dependencies, the javadoc in /doc/api, there's /bin folder with a
> startup script, and a license and readme in the root.
>
> The /target directory doesn't look at all like this. There are things
> there that don't belong in a released app at all, like all the
separate
> .class files.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message