protected Artifact getLatestDependencyModification(Set<Artifact> artifacts) { if (artifacts == null) { return null; } Artifact lastModArtifact = null; for (Artifact artifact : artifacts) { if (lastModArtifact == null && !ArtifactTypeHelper.isDotnetAnyGac( artifact.getType() )) { lastModArtifact = artifact; } else if (!ArtifactTypeHelper.isDotnetAnyGac( artifact.getType() ) && artifact.getFile().lastModified() > lastModArtifact.getFile().lastModified()) { lastModArtifact = artifact; } } return lastModArtifact; }
private void addProjectArtifactForTestCompile( List<Artifact> libraries ) { if ( config.isTestCompile() && ( ArtifactTypeHelper.isDotnetLibrary( config.getArtifactType() ) || ArtifactTypeHelper.isDotnetMavenPlugin( config.getArtifactType() )) && project.getArtifact().getFile() != null && project.getArtifact().getFile().exists() && !libraries.contains( project.getArtifact() ) && !ArtifactTypeHelper.isDotnetModule( project.getArtifact().getType() ) ) { libraries.add( project.getArtifact() ); } }
public static boolean isDotnet4Gac(String packaging) { return isDotnet4Gac( ArtifactType.getArtifactTypeForPackagingName( packaging ) ); }
if (ArtifactTypeHelper.isDotnetAnyGac( artifactType )) if (!ArtifactTypeHelper.isDotnet4Gac(artifactType))
if ( projectDependency.isResolved() && !ArtifactTypeHelper.isDotnetAnyGac( projectDependency.getArtifactType() ) ) if ( ArtifactTypeHelper.isDotnetAnyGac( projectDependency.getArtifactType() ) ) new DefaultArtifactRepository( "local", "file://" + localRepository, new DefaultRepositoryLayout() ); if ( !ArtifactTypeHelper.isDotnetExecutableConfig( type ))// TODO: Generalize to any attached artifact + ", Failed Path Check = " + dotnetFile.getAbsolutePath()); if ( !ArtifactTypeHelper.isDotnetExecutableConfig( type ) || !dotnetFile.exists() )// TODO: Generalize to any attached artifact
/** * Matches artifacts of type module * * @param artifact the artifact to match * @return true if artifact is of type module, otherwise returns false. */ public boolean match( Artifact artifact ) { return ArtifactTypeHelper.isDotnetModule( artifact.getType() ); } }
logger.debug( "NPANDAY-061-007: Artifact Type:" + ArtifactTypeHelper.isDotnetGenericGac( type )); ArtifactType artifactType = ArtifactType.getArtifactTypeForPackagingName( type ); if ( ArtifactTypeHelper.isDotnetModule( type )) if ( ArtifactTypeHelper.isDotnetGenericGac( type ) )
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() ); } }
public static boolean isDotnetMavenPlugin(String packaging) { return isDotnetMavenPlugin( ArtifactType.getArtifactTypeForPackagingName( packaging ) ); }
public static boolean isDotnetGenericGac(ArtifactType packaging) { // the new gac should always be generic. // GAC_MSIL, GAC32 and GAC should be deprecated without // any replacements. return packaging.equals( ArtifactType.DOTNET_GAC ) || packaging.equals( ArtifactType.GAC_GENERIC ); }
public static boolean isDotnetExecutableConfig(String packaging) { return isDotnetExecutableConfig( ArtifactType.getArtifactTypeForPackagingName( packaging ) ); }
public static boolean isDotnetExecutable(String packaging) { return isDotnetExecutable( ArtifactType.getArtifactTypeForPackagingName( packaging ) ); }
public static boolean isDotnetLibrary(String packaging) { return isDotnetLibrary( ArtifactType.getArtifactTypeForPackagingName( packaging ) ); }
public static boolean isDotnetModule(String packaging) { return isDotnetModule( ArtifactType.getArtifactTypeForPackagingName( packaging ) ); }
dependency.getType() ); if ( ArtifactTypeHelper.isDotnetMavenPlugin(sourceArtifact.getType()))
if (ArtifactTypeHelper.isDotnetGenericGac( artifactType ))
public static boolean isDotnetAnyGac(String packaging) { return isDotnetAnyGac( ArtifactType.getArtifactTypeForPackagingName( packaging ) ); }
public List<Artifact> getDirectModuleDependencies() { List<Artifact> artifacts; try { artifacts = artifactContext.getNetModulesFor( project.getArtifact() ); } catch ( ArtifactException e ) { logger.error( "NPANDAY-061-000: Improper Initialization of the Net Modules", e ); return new ArrayList<Artifact>(); //TODO: How to handle this: usually implies improper init of ArtifactContext } if ( config.isTestCompile() && ArtifactTypeHelper.isDotnetModule( config.getArtifactType() ) ) { artifacts.add( project.getArtifact() ); } if ( config.isTestCompile() && ArtifactTypeHelper.isDotnetModule( project.getArtifact().getType() ) && project.getArtifact().getFile() != null && project.getArtifact().getFile().exists() ) { artifacts.add( project.getArtifact() ); } return artifacts; }
if (!ArtifactTypeHelper.isDotnetAnyGac( artifactDependency.getType() ))
if ( ArtifactTypeHelper.isDotnetModule( project.getArtifact().getType() ))