Ignore non-JAR dependencies
Include transitive dependencies of non-JAR artifacts

This fixes a case where dependencies are grouped in another POM.