Closed vibe13 closed 4 years ago
I have checked more the code, actually a Verifier is run only if the Modder associated with the same key is run. So John what you mean is having an additional option in the property file that would be used to run the Verifiers?
It looks like the list of verifiers is already constrained by the list of enabled modifiers. So, the question I have is, under what conditions is the ToolchainVerifier causing problems? Do you have the stack trace? Maybe we can fix that instead of killing this whole component for everyone?
I found this in VersionManager.java (starting at line 482):
final List<String> modderKeys = session.getModderKeys();
Collections.sort( modderKeys, ProjectModder.KEY_COMPARATOR );
boolean changed = false;
if ( modders != null )
{
for ( final String key : modderKeys )
{
final ProjectModder modder = modders.get( key );
if ( modder == null )
{
logger.info( "Skipping missing project modifier: '" + key + "'" );
session.addError( new VManException( "Cannot find modder for key: '%s'. Skipping...", key ) );
continue;
}
logger.info( "Modifying '" + project.getKey() + " using: '" + key + "' with modder "
+ modder.getClass()
.getName() );
changed = modder.inject( project, session ) || changed;
}
}
if ( changed )
{
for ( final String key : modderKeys )
{
final ProjectVerifier verifier = verifiers.get( key );
if ( verifier != null )
{
logger.info( "Verifying '" + project.getKey() + "' (" + key + ")..." );
verifier.verify( project, session );
}
}
I think you may need to specify a narrower list of modifiers in your vman.properties. I suspect you're using the default ones, and since you're not using a toolchain POM it's causing problems when the toolchain-related logic is triggered.
More information about your setup would be helpful. If it contains sensitive info, email it to me directly.
Sorry John, you are correct, I had already noticed that the list of verifiers is already constrained by the list of enabled modifiers, but I misunderstood the "toolchain-realignment" complete meaning, I simply do not need it in my vmn.properties file. Thanks!
We are using a toolchain pom as we want to inject the toolchain into the project (that way everyone uses the same base jboss-parent set of plugin configuration) - but I am not interested in the rest of the modder i.e. the plugin alignment. Its almost an argument for splitting them in two.
Are you reusing the toolchain POM from upstream? If not, it might make sense to remove plugin versions from the toolchain POM, then teach vman to ignore alignment if the versions are missing (which might accidentally be the case now, I'm not sure).
WDYT?
Closing ; tool replaced by https://github.com/release-engineering/pom-manipulation-ext
Since we are not performing plugin alignment anymore, I have commented out the injection of the ToolchainVerifier. I have also encountered a Null Pointer exception, and managed it the same way as in he ToolchainModder class.