James Mitchell wrote:
Currently the project.xml produces commons-resources-1.0-dev.jar

Can you help me with how I need to tell maven to create a 2nd artifact?

Something like commons-resources-tests-1.0-dev.jar

The cleanest way is to split the project into 2 subprojects.

commons-resources/
  core/
    src/
      main/

  tests/
    src/
      main/

Make the 2nd project depend on the 1st. You could do maven multiproject:install
in the commons-resources directory to build them both.


However, a lot of people find this undesirable.  You could do some maven.xml
magic to make this happen instead, and keep everything in one source tree.

Here's an example of how I did this, before I switched to the multiproject format.

<!-- Builds and deploys test jar -->
<postGoal name="jar:jar">
        <ant:jar destfile="${maven.build.dir}/${testjar.name}">
            <fileset dir="${maven.build.dir}/test-classes"/>
        </ant:jar>
</postGoal>

define the property 'testjar.name' as whatever you want.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to