public static boolean isDotnetAnyGac(ArtifactType packaging) { return packaging.equals( ArtifactType.DOTNET_GAC ) || packaging.equals( ArtifactType.GAC_GENERIC ) || packaging.equals( ArtifactType.GAC ) || packaging.equals( ArtifactType.GAC_32) || packaging.equals( ArtifactType.GAC_32_4) || packaging.equals( ArtifactType.GAC_64) || packaging.equals( ArtifactType.GAC_64_4) || packaging.equals( ArtifactType.GAC_MSIL ) || packaging.equals( ArtifactType.GAC_MSIL4 ); }
/** * This method will return a File where File.isExist() returns false, if NetCompile.compile has not been * invoked. * * @return * @throws InvalidArtifactException */ public File getArtifact() throws InvalidArtifactException { ArtifactType artifactType = config.getArtifactType(); if ( artifactType == null || artifactType.equals( ArtifactType.NULL ) ) { throw new InvalidArtifactException( "NPANDAY-061-001: Artifact Type cannot be null" ); } //TODO: The test-plugin has a dependency on this fileName/dir. If we change it here, it will break the plugin. Fix this encapsulation issue. String fileName = ( config.isTestCompile() ) ? project.getBuild().getDirectory() + File.separator + project.getArtifactId() + "-test.dll" : project.getBuild().getDirectory() + File.separator + project.getArtifactId() + "." + artifactType.getExtension(); return new File( fileName ); }
private CompilerConfig createCompilerConfig(String source, String destination) throws MojoExecutionException { CompilerConfig compilerConfig = (CompilerConfig) CompilerConfig.Factory.createDefaultExecutableConfig(); compilerConfig.setLocalRepository( localRepository ); compilerConfig.setCommands( getCommands( source, destination ) ); String artifactTypeName = project.getArtifact().getType(); ArtifactType artifactType = ArtifactType.getArtifactTypeForPackagingName( artifactTypeName ); if ( artifactType.equals( ArtifactType.NULL ) ) { throw new MojoExecutionException( "NPANDAY-900-002: Unrecognized artifact type: Language = " + language + ", Vendor = " + vendor + ", ArtifactType = " + artifactTypeName ); } compilerConfig.setArtifactType( artifactType ); return compilerConfig; }
if ( artifactType.equals( ArtifactType.NULL ) )