Maven 1

Jar override does not work when trying to override to SNAPSHOT

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0, 1.0.1
  • Fix Version/s: 1.0.2
  • Component/s: model
  • Labels:
    None
  • Environment:
    All
  • Number of attachments :
    0

Description

The code in ArtifactListBuilder that checks the type of override being performed (version or path) just checks that the value of the first character of mavenJarProperty is a digit. If you are tyring to override to SNAPSHOT this doesn't work. If the code was changed from

if ( mavenJarOverride && StringUtils.isNotEmpty(mavenJarProperty) )

to

if ( mavenJarOverride && (StringUtils.isNotEmpty(mavenJarProperty) ||
"SNAPSHOT".equals(mavenJarProperty)))

then we'd be able to override to SNAPSHOT for integration builds and not have to change all the dependencies before a relase (and then back to SNAPSHOT after).

Issue Links

Activity

Hide
Jon Strayer added a comment -

Damn, I hosed the code. It should be changes from this:

if ( Character.isDigit( mavenJarProperty.charAt( 0 ) ) )

to this:

if ( Character.isDigit( mavenJarProperty.charAt( 0 ) ) || "SNAPSHOT".equals(mavenJarProperty) )

Show
Jon Strayer added a comment - Damn, I hosed the code. It should be changes from this: if ( Character.isDigit( mavenJarProperty.charAt( 0 ) ) ) to this: if ( Character.isDigit( mavenJarProperty.charAt( 0 ) ) || "SNAPSHOT".equals(mavenJarProperty) )
Hide
Brett Porter added a comment -

applied, though as an indexOf for consistency (even though in this case it is redundant).

Show
Brett Porter added a comment - applied, though as an indexOf for consistency (even though in this case it is redundant).

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
15m
Original Estimate - 15 minutes
Remaining:
15m
Remaining Estimate - 15 minutes
Logged:
Not Specified
Time Spent - Not Specified