mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
fix: shorten virtual path to use artifact folder
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
parent
b1fc651002
commit
f4c5945a63
2 changed files with 2 additions and 8 deletions
|
@ -31,13 +31,6 @@ var (
|
|||
"Bundle-Activator",
|
||||
}
|
||||
|
||||
/*
|
||||
Long answer
|
||||
stability is better than instability
|
||||
correctness is better than incorrectness
|
||||
Source of manifest truth
|
||||
https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html
|
||||
*/
|
||||
secondaryJavaManifestGroupIDFields = []string{
|
||||
"Automatic-Module-Name",
|
||||
"Main-Class",
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
intFile "github.com/anchore/syft/internal/file"
|
||||
|
@ -375,7 +376,7 @@ func pomProjectByParentPath(archivePath string, location file.Location, extractP
|
|||
// associating each discovered package to the given parent package. Note the pom.xml is optional, the pom.properties is not.
|
||||
func newPackageFromMavenData(pomProperties pkg.PomProperties, pomProject *pkg.PomProject, parentPkg *pkg.Package, location file.Location) *pkg.Package {
|
||||
// keep the artifact name within the virtual path if this package does not match the parent package
|
||||
vPathSuffix := pomProperties.Path
|
||||
vPathSuffix := filepath.Clean(strings.TrimSuffix(pomProperties.Path, filepath.Base(pomProperties.Path)))
|
||||
accessPath := location.AccessPath()
|
||||
virtualPath := accessPath + ":" + vPathSuffix
|
||||
|
||||
|
|
Loading…
Reference in a new issue