Hi Nick,

I (already) tried to use a profile in the parent pom, but the adapted
finalName is ignored by the jar plugin, e.g. mvn package creates the jar
with the default name.
(I use Maven 2.0.9 with jar plugin version 2.2)

In addition, even if that would work, would the deploy plugin use the
changed finalName to guess the correct artifactId? I doubt that. I think it
would still take the artifactId defined in the pom, which would still be
"artifact1" instead of "artifact1_java15" or am I wrong?

Thanks for your help,
Holger


Nick Stolwijk-4 wrote:
> 
> You could create a profile which configures the build/finalname and
> the compiler plugin. This should create the desired artifact.
> 
> ie:
> 
> <profiles>
>       <profile>
>            <id>1.5build</id>
>            <build>
>                  <finalName>${artifactId}-${version}-jdk1.5</finalName>
>                  <plugins>
>                          <plugin>
>                                <!-- compiler plugin with target set to 1.5
> -->
>                          </plugin>
>                  </plugins>
>              </build>
>          </profile>
> </profiles>
> 
> Activate with mvn -P1.5build clean deploy.
> 
> Hth,
> 
> Nick Stolwijk
> ~Java Developer~
> 
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
> 
> 
> 
> On Thu, Sep 25, 2008 at 2:40 PM, Stephen Connolly
> <[EMAIL PROTECTED]> wrote:
>> I want to say classifiers....
>>
>> but that only works if the dependencies have not changed.
>>
>> Perhaps what you want is a different project that depends on the first
>> one
>> and unpacks it's -source.jar and does a recompile with the different jdk
>>
>> On 25 September 2008 12:00, Holger Brands <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I've a multi-module build that is compiled with target 1.6 and deployed
>>> to
>>> our company repo with artifactIds "artifact1", "artifact2" and so on.
>>>
>>> Now, what I want to achieve is the following:
>>> I want the same multi-module build optionally to be compiled with target
>>> 1.5
>>> and deployed to our company repo with artifactIds "artifact1_java15",
>>> "artifact2_java15" and so on.
>>>
>>> So, ideally
>>> - "mvn deploy" should deploy the default build artifacts compiled with
>>> target 1.6.
>>> - "mvn -Djdk=1.5 deploy" should deploy the derived build artifacts
>>> compiled
>>> with target 1.5.
>>>
>>> I know how to use profiles/properties to set the desired compiler
>>> options.
>>> But how to tweak the artifactIds?
>>>
>>> Is there an easy way to accomplish this?
>>> If not, what's the recommended way to deal with this requirement?
>>>
>>> I'm using Maven 2.0.9 on Windows XP.
>>>
>>> Sorry, if this has been asked before.
>>>
>>> Thanks,
>>> Holger
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/deploy-multi-module-artifacts-with-derived-artifactIds-tp19667309p19667309.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/deploy-multi-module-artifacts-with-derived-artifactIds-tp19667309p19670654.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to