You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-dev@incubator.apache.org by Brett Porter <br...@apache.org> on 2010/10/27 01:31:33 UTC

Re: svn commit: r1023237 [1/2] - in /incubator/npanday/trunk: ./ components/dotnet-artifact/src/main/java/npanday/artifact/impl/ components/dotnet-artifact/src/main/resources/META-INF/plexus/ components/dotnet-core/src/main/java/npanday/ components/dotnet-...

On 16/10/2010, at 9:29 PM, apadilla@apache.org wrote:

> Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java?rev=1023237&r1=1023236&r2=1023237&view=diff
> ==============================================================================
> --- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java (original)
> +++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/CompilerContextImpl.java Sat Oct 16 10:29:17 2010
> @@ -385,22 +385,12 @@ public final class CompilerContextImpl
>             for ( Artifact artifact : artifacts )
>             {
>                 String type = artifact.getType();
> +                logger.debug( "NPANDAY-061-006: Artifact Type:" + type);
> +                logger.debug( "NPANDAY-061-007: Artifact Type:" + ArtifactTypeHelper.isDotnetGenericGac( type ));
>                 ArtifactType artifactType = ArtifactType.getArtifactTypeForPackagingName( type );
> -                if ( ArtifactTypeHelper.isDotnetModule( type ))
> -                {
> -                    modules.add( artifact );
> -                }
> -                else if ( (artifactType != null && (
> -                            StringUtils.equals( artifactType.getTargetCompileType(), "library" )
> -                            || artifactType.getExtension().equals( "dll" )
> -                            || artifactType.getExtension().equals( "exe" ))
> -                          )
> -                          || type.equals( "jar" ) )
> -                {
> -                    libraries.add( artifact );
> -                }

I see the latter bit moved down, but did you mean to remove the module support?
> @@ -619,8 +631,21 @@ public final class CompilerContextImpl
>     {
>         // TODO: Refactor to PathUtil.getGlobalAssemblyCacheFileFor
> 
> -        File gacFile = new File( gacRoot, artifact.getArtifactId() + File.separator + artifact.getVersion() + "__" +
> -            artifact.getClassifier() + File.separator + artifact.getArtifactId() + ".dll" );
> +        String type = artifact.getType();
> +        logger.debug( "NPANDAY-061-001: Gac Root:" + gacRoot);
> +        logger.debug( "NPANDAY-061-003: Artifact Type:" + type);
> +        File gacFile;
> +        if ("gac_msil4".equalsIgnoreCase(type)) {
> +            gacFile = new File( gacRoot, artifact.getArtifactId() + File.separator + "v" + compilerRequirement.getFrameworkVersion() + "_" + artifact.getVersion() + "__" +
> +                artifact.getClassifier() + File.separator + artifact.getArtifactId() + ".dll" );
> +        }
> +        else {
> +            gacFile = new File( gacRoot, artifact.getArtifactId() + File.separator + artifact.getVersion() + "__" +
> +                artifact.getClassifier() + File.separator + artifact.getArtifactId() + ".dll" );
> +        }
> +
> +        logger.debug( "NPANDAY-061-001: gacFile to:" + gacFile.getAbsolutePath() );

I think Joe already fixed this, but if not the hardcoding needs to be reviewed.
> 
> Modified: incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java?rev=1023237&r1=1023236&r2=1023237&view=diff
> ==============================================================================
> --- incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java (original)
> +++ incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/impl/DefaultRepositoryNetExecutable.java Sat Oct 16 10:29:17 2010
> @@ -98,7 +98,8 @@ public class DefaultRepositoryNetExecuta
>                 ( ( getExecutionPath() != null ) ? getExecutionPath().getAbsolutePath() : "unknown" ) + ", Command = " +
>                 commands, e );
>         }
> -        if ( commandExecutor.getStandardOut().contains( "error" ) )
> +        if ( commandExecutor.getStandardOut().contains( "error" )
> +          && !commandExecutor.getStandardOut().contains( "exit code = 0" ) )        

I can't remember - but did this already get fixed after we discussed it before?
> Modified: incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRegistryLoader.java
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRegistryLoader.java?rev=1023237&r1=1023236&r2=1023237&view=diff
> ==============================================================================
> --- incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRegistryLoader.java (original)
> +++ incubator/npanday/trunk/components/dotnet-registry/src/main/java/npanday/registry/impl/StandardRegistryLoader.java Sat Oct 16 10:29:17 2010
> @@ -146,7 +147,13 @@ public class StandardRegistryLoader
>                 filePath.append( (char) path[i++] );
>             }
>         }//end for:i
> -        return filePath.toString();
> +        String str = filePath.toString();
> +        if (!str.startsWith("/")) {
> +            str = str.replaceAll("/", "\\\\");
> +            str = str.replaceAll("\\\\:", ":");
> +            str = str.replaceAll("\\\\\\\\", "\\\\");
> +        }
> +        return str;

What's the purpose of this?
> Modified: incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/AbstractCompilerMojo.java
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/AbstractCompilerMojo.java?rev=1023237&r1=1023236&r2=1023237&view=diff
> ==============================================================================
> --- incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/AbstractCompilerMojo.java (original)
> +++ incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/AbstractCompilerMojo.java Sat Oct 16 10:29:17 2010
> @@ -408,6 +408,13 @@ public abstract class AbstractCompilerMo
>      * @parameter expression = "${resource}"
>      */
>     protected String resource;
> +    
> +    /**
> +     * Embed the specified resource
> +     *
> +     * @parameter expression = "${embeddedResources}"
> +     */
> +    protected ArrayList<String> embeddedResources;    

> Modified: incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/CompilerMojo.java
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/CompilerMojo.java?rev=1023237&r1=1023236&r2=1023237&view=diff
> ==============================================================================
> --- incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/CompilerMojo.java (original)
> +++ incubator/npanday/trunk/plugins/maven-compile-plugin/src/main/java/npanday/plugin/compile/CompilerMojo.java Sat Oct 16 10:29:17 2010
> @@ -213,6 +213,15 @@ public final class CompilerMojo
>             params.add("/resource:" + resource);
>         }
> 
> +		if (embeddedResources != null)
> +        {
> +			for ( String arg : embeddedResources )
> +			{
> +				params.add( "/resource:" + arg );
> +			}
> +            //params.add("/resource:" + resource);
> +        }
> +        

These seem unrelated. Did you intend it to be in this changeset? Are there new tests / doc / a ticket for it?
> Modified: incubator/npanday/trunk/plugins/maven-resgen-plugin/src/main/java/npanday/plugin/resgen/ResourceCopierMojo.java
> URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-resgen-plugin/src/main/java/npanday/plugin/resgen/ResourceCopierMojo.java?rev=1023237&r1=1023236&r2=1023237&view=diff
> ==============================================================================
> --- incubator/npanday/trunk/plugins/maven-resgen-plugin/src/main/java/npanday/plugin/resgen/ResourceCopierMojo.java (original)
> +++ incubator/npanday/trunk/plugins/maven-resgen-plugin/src/main/java/npanday/plugin/resgen/ResourceCopierMojo.java Sat Oct 16 10:29:17 2010
> @@ -56,16 +56,39 @@ public class ResourceCopierMojo
>     public void execute()
>         throws MojoExecutionException
>     {
> -        List<Resource> resources = project.getResources();
> +		try 
> +		{
> +		
> +			copyAllResources(project.getResources());
> +			copyAllResources(project.getTestResources());

are the test resources meant to be in the same location? is there a chance they'll get included in the artifact?

Thanks,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/