-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
versions:use-dep-version does not support "import" scoped poms #308
Comments
A similar issue was already created for A similar fix (using the raw model) could be applied: @SuppressWarnings( "unchecked" )
@Override
protected void update( ModifiedPomXMLEventReader pom )
throws MojoExecutionException, MojoFailureException, XMLStreamException, ArtifactMetadataRetrievalException
{
if ( depVersion == null || depVersion.equals( "" ) )
{
throw new IllegalArgumentException( "depVersion must be supplied with use-specific-version, and cannot be blank." );
}
if ( !forceVersion && !hasIncludes() )
{
throw new IllegalArgumentException( "The use-specific-version goal is intended to be used with a single artifact. Please specify a value for the 'includes' parameter, or use -DforceVersion=true to override this check." );
}
try
{
if ( getProject().getDependencyManagement() != null && isProcessingDependencyManagement() )
{
DependencyManagement dependencyManagement = PomHelper.getRawModel( getProject() ).getDependencyManagement();
if ( dependencyManagement != null )
{
useDepVersion( pom, dependencyManagement.getDependencies() );
}
}
if ( getProject().getDependencies() != null && isProcessingDependencies() )
{
useDepVersion( pom, getProject().getDependencies() );
}
}
catch ( ArtifactMetadataRetrievalException e )
{
throw new MojoExecutionException( e.getMessage(), e );
} catch (IOException e)
{
throw new MojoExecutionException( e.getMessage(), e );
}
} |
maybe you have a bit of time for a pull request with an integration test? |
o Use raw model to update versions in dependency management.
Done: |
I was having issues with this bug as well, thanks for the awsome fix @Max-Veron ! |
The same applies to |
@khmarbaise This is the issues I was referring to, should be extended with all applicable places in the codes. @jannic has an initial patch for the |
The first step is to provide the patch ...than I can take a look... |
Apache Maven 3.5.2
versions-maven-plugin 2.7
When using
versions:use-dep-version
the version of import scoped poms in the dependency management is not changed.E.g.:
The text was updated successfully, but these errors were encountered: