English 中文(简体)
Perform a maven patch release
原标题:

Is it possible to perform a patch release in maven? I would like to create a jar containing only one class which I have changed since the release.

最佳回答

There is no generic way to do that, as far as I know.

However, the simplest way to do that is to create a simple assembly that will create a JAR or a ZIP containing your classes. The assembly.xml will only need to include the specified class file:

<assembly>
    <formats>
        <format>zip</format>
    </formats>
    <files>
        <file>
            <source>target/classes/foo/bar/FooBar.class</source>
            <outputDirectory>foo/bar</outputDirectory>
        </file>
    </files>
</assembly>

(note that I didn t test this script)

Then, after compiling (mvn clean install) your project, you will just need to run the command mvn assembly:assembly to create your ZIP file.

问题回答

暂无回答




相关问题
Derby gets stuck closing?

I ve got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:...

Execute goal on parent after children complete

I have a multi-module maven project (several levels of nesting). Normally, when I execute a maven build (like mvn install or whatever), maven will run all the goals for the parent project before ...

Including dependencies in a jar with Maven

Is there a way to force maven(2.0.9) to include all the dependencies in a single jar file? I have a project the builds into a single jar file. I want the classes from dependencies to be copied into ...

Java Equivalent of distcc

Distcc makes it easy to distribute a C or C++ compile job across a number of machines, and is a godsend for working with large, frequently-built codebases. An increasing number of our large projects ...

Maven Assembly Problem

I have a maven multiple-module project, which is giving me headaches in the assembly:assembly phase. I have a module which has an assembly defined in it which works fine when I invoke mvn assembly:...

热门标签