/** * Returns artifact type for the specified packaging name * * @param packagingName the package name (as given in the package tag within the pom.xml) of the artifact. * @return the artifact type for the specified packaging name */ public static synchronized ArtifactType getArtifactTypeForPackagingName( String packagingName ) { for( ArtifactType t : ArtifactType.values() ) { if(packagingName.equals(t.getPackagingType())) return t; } return ArtifactType.NULL; } }
public static File getGACFile4Artifact(Artifact artifact) { File gacFile; String type = artifact.getType(); if (type.equals(ArtifactType.GAC_MSIL4.getPackagingType())) { String gacRoot = System.getenv( "SystemRoot" ) + "\\Microsoft.NET\\assembly\\GAC_MSIL\\"; gacFile = new File( gacRoot, artifact.getArtifactId() + File.separator + "v4.0" + "_" + artifact.getVersion() + "__" + artifact.getClassifier() + File.separator + artifact.getArtifactId() + ".dll" ); } else if (type.equals(ArtifactType.GAC_32_4.getPackagingType())) { String gacRoot = System.getenv( "SystemRoot" ) + "\\Microsoft.NET\\assembly\\GAC_32\\"; gacFile = new File( gacRoot, artifact.getArtifactId() + File.separator + "v4.0" + "_" + artifact.getVersion() + "__" + artifact.getClassifier() + File.separator + artifact.getArtifactId() + ".dll" ); } else if (type.equals(ArtifactType.GAC_64_4.getPackagingType())) { String gacRoot = System.getenv( "SystemRoot" ) + "\\Microsoft.NET\\assembly\\GAC_64\\"; gacFile = new File( gacRoot, artifact.getArtifactId() + File.separator + "v4.0" + "_" + artifact.getVersion() + "__" + artifact.getClassifier() + File.separator + artifact.getArtifactId() + ".dll" ); } else { gacFile = artifact.getFile(); } return gacFile; }
public boolean match( NetDependency netDependency ) { return ArtifactTypeHelper.isDotnetExecutable(netDependency.getType()) || ArtifactTypeHelper.isDotnetMavenPlugin(netDependency.getType()) || netDependency.getType().equals( ArtifactType.VISUAL_STUDIO_ADDIN.getPackagingType() ) || netDependency.getType().equals( ArtifactType.SHARP_DEVELOP_ADDIN.getPackagingType() ); } }
else if ( artifactType.equals( ArtifactType.GAC.getPackagingType() ) ) else if ( artifactType.equals( ArtifactType.GAC_32.getPackagingType() ) ) else if ( artifactType.equals( ArtifactType.GAC_32_4.getPackagingType() ) ) else if ( artifactType.equals( ArtifactType.GAC_64.getPackagingType() ) ) else if ( artifactType.equals( ArtifactType.GAC_64_4.getPackagingType() ) ) else if ( artifactType.equals( ArtifactType.GAC_MSIL.getPackagingType() ) ) else if ( artifactType.equals( ArtifactType.GAC_MSIL4.getPackagingType() ) )
rootDependency.setVersion( model.getVersion() ); rootDependency.setType( ArtifactType.getArtifactTypeForPackagingName( model.getPackaging() ).getPackagingType() ); rootDependency.setScope( Artifact.SCOPE_COMPILE ); dependencies.add( rootDependency );
dependency.setArtifactId( artifact.getArtifactId() ); dependency.setVersion( artifact.getVersion() ); dependency.setType( ArtifactType.DOTNET_EXECUTABLE_CONFIG.getPackagingType() ); model.addDependency( dependency );
else if (type.equals(ArtifactType.GAC_MSIL4.getPackagingType())) { String gacRoot = System.getenv( "SystemRoot" ) + "\\Microsoft.NET\\assembly\\GAC_MSIL\\"; setArtifactGacFile( gacRoot, artifact ); libraries.add( artifact ); else if ( type.equals( ArtifactType.GAC.getPackagingType() ) ) libraries.add( artifact ); else if ( type.equals( ArtifactType.GAC_32.getPackagingType() ) ) libraries.add( artifact ); else if ( type.equals( ArtifactType.GAC_32_4.getPackagingType() ) ) libraries.add( artifact ); else if ( type.equals( ArtifactType.GAC_64.getPackagingType() ) ) libraries.add( artifact ); else if ( type.equals( ArtifactType.GAC_64_4.getPackagingType() ) ) libraries.add( artifact ); else if ( type.equals( ArtifactType.GAC_MSIL.getPackagingType() ) ) else if ( type.equals( ArtifactType.COM_REFERENCE.getPackagingType() ) )