We don't run the build twice; instead, deploy is configured to be skipped when
run at the top level project.

The uima-wide parent-pom has a conditional section (i.e., a profile) that runs
for building binary distributions.  It's triggered like this:

    <!-- ************************************ -->
    <!-- * Build Custom Binary Distribution * -->
    <!-- ************************************ -->
    <profile>
      <id>build distribution</id>
      <activation>
        <file><exists>src/main/assembly/bin.xml</exists></file>
      </activation>

Inside that profile is this section which disables deploy of *all* artifacts for
this project:

          <!-- https://issues.apache.org/jira/browse/UIMA-2008 -->
          <!-- no maven deployment of this project's artifacts -->
          <!-- binary build artifact deployed from apache mirror system after
release -->
          <plugin>
            <artifactId>maven-deploy-plugin</artifactId>     
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>

So, if you arrange things so the source-release zip and the binary distr are
built at the top level, which is the convention, and nothing else is built at
the top level, then these are not deployed to the Maven staging repo (because
all of these artifacts are to be distributed instead by the Apache mirror 
system).

-Marshall

On 8/9/2013 9:03 AM, Richard Eckart de Castilho wrote:
> I didn't quite understand after all how you avoid deploying the "uimaj" 
> artifact to Maven repositories.
>
> My theory is that you run the release twice, once on "uimaj-parent" and then 
> on "uimaj-aggregate". That way, the top-level aggregator artifact may never 
> be part of a release, but would need to be updated manually after a release.
>
> Or is there some other trick to prevent Maven from deploying artifacts of 
> certain modules during a release?
>
> Cheers,
>
> -- Richard
>
> Am 08.08.2013 um 22:51 schrieb Richard Eckart de Castilho 
> <[email protected]>:
>
>> Nevermind… I disabled all assembly attachments ;)
>>
>> I also better understand the odd build structure of uimaj now. Having the 
>> uimaj-parent separate from the aggregator allows you *not* deploy any traces 
>> of the distribution building process to central. Interesting.
>>
>> Cheers,
>>
>> -- Richard
>>
>> Am 08.08.2013 um 22:39 schrieb Richard Eckart de Castilho 
>> <[email protected]>:
>>
>>> Hi,
>>>
>>> in UIMA 2.3.1, there was a "uimaj" artifact uploaded to Maven Central to 
>>> which a "source-release.zip" was attached. This is missing from recent 
>>> releases.
>>>
>>> Nice ;)
>>>
>>> My problem is, that the uimaFIT build currently appears to think that it 
>>> has to attach this zip. How did you avoid it being attached? In this case, 
>>> I only don't want the source-release.zip being attached, I still want to 
>>> keep the rest (the pom).
>>>
>>> Cheers,
>>>
>>> -- Richard
>

Reply via email to