Executing "gradle upload" in my project is producing this stack trace
both with 0.8 and 0.9 (snapshot of Jan 19, yesterday):

Caused by: java.lang.NullPointerException at
org.gradle.api.internal.artifacts.publish.maven.dependencies.DefaultConf2ScopeMappingContainer.findHighestPriorityMappingsForMappedConfigurations(DefaultConf2ScopeMappingContainer.java:68)

The related line seems to be this (in DefaultConf2ScopeMappingContainer):

 private Set<Conf2ScopeMapping>
findHighestPriorityMappingsForMappedConfigurations(Configuration[]
configurations) {
        Integer lastPriority = null;
        Set<Conf2ScopeMapping> result = new HashSet<Conf2ScopeMapping>();
        for (Conf2ScopeMapping conf2ScopeMapping :
getMappingsForConfigurations(configurations)) {
            if (lastPriority != null &&
lastPriority.equals(conf2ScopeMapping.getPriority())) {
                result.add(conf2ScopeMapping);
>>>>>>            } else if (lastPriority == null || lastPriority < 
>>>>>> conf2ScopeMapping.getPriority()) {
                lastPriority = conf2ScopeMapping.getPriority();
                result = WrapUtil.toSet(conf2ScopeMapping);
            }
        }
        return result;
    }

Which I suppose means that conf2ScopeMapping.getPriority() is null. I
am afraid I couldn't trace that back any further.

Changing the line to this and reinstalling gradle:

 } else if (lastPriority == null ||  conf2ScopeMapping.getPriority()
!= null && lastPriority < conf2ScopeMapping.getPriority()) {

Seems to fix the problem.

It had already been reported in december (I am also using Linux,  but
I cannot see how could that make a difference):
http://old.nabble.com/Uploading-to-maven-with-Linux-td26886223.html

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to