Hi Joe,

I am going through my list of things to catch up on, and had a couple of 
previous commits that hadn't been addressed. I wanted to bring them up again 
because they point to either possible regressions, or path issues which are on 
our minds at the moment.

About r1050256:

> Just (re-)confirmed - this test passes with 1.2.1 and fails with trunk. Isn't 
> that a regression
> for old frameworks?
> 
> Test machine is Windows 7, .NET framework 3.5 SDK.
> 
> On 10/01/2011, at 11:07 PM, Brett Porter wrote:
> 
>> 
> 
>> On 10/01/2011, at 1:33 PM, Josimpson Ocaba wrote:
>> 
>>> 
>>> The Sample webservice already fails to build so I added in a new 
>>> webservice. 
>> 
> 
>> What do you mean "already"? I'm sure these were passing on 1.2.1.


^^^

About r1049400:

> On 10/01/2011, at 1:37 PM, Josimpson Ocaba wrote:
> 
>> The configuration used while testing for the fixes in this IT was the older 
>> 2.0 .NET
> 
>> which is the cause for the nee d of the change, but it still works on the 
>> 4.0 .NET framework
> 
>> as well. 
> 
> 
> This sounds back to front. We still support the 2.0 framework, right? Does 
> the test not work
> on 4.0 with the original configuration?
> 
>> ----- Original Message ----- 
>> From: "Brett Porter" <[email protected]> 
>> To: [email protected] 
>> Sent: Friday, January 7, 2011 2:56:33 PM 
>> Subject: Re: svn commit: r1049400 - 
>> /incubator/npanday/npanday-its/trunk/src/test/resources/NPandayIT12549/NPandayIT12549.csproj
>> 
>> 
>> This test used to work - is there a backwards compat. issue here? 
>> 
>> (also r1049369) 


^^^

About r1045023:

> On 10/01/2011, at 1:46 PM, Josimpson Ocaba wrote:
> 
>> This was added for the other remote repositories, because they were just 
>> skipping the
>> other remote repositories and were not actually trying to resolve from their 
>> locations. 
> 
> This was breaking several integration tests, or is there a specific one to 
> illustrate the
> case?
> 
> My point is that these tests worked in 1.2.1. Repeating this check doesn't 
> look like the best
> way to accommodate the removal of the UAC because it will mean repeated 
> resolution, which
> was a performance problem in the past.
> 
> Am I missing something?

^^^

About r1025815:

On 19/11/2010, at 11:05 AM, Josimpson Ocaba wrote:

> 
> ----- "Brett Porter" <[email protected]> wrote:
> 
>> On 17/11/2010, at 11:57 AM, Josimpson Ocaba wrote:
>> 
>>>>> +        
>>>>> +        
>>>>> +        try
>>>>> +        {    
>>>>> +              FileUtils.copyFile(new File( source ),
>> targetFile);
>>>>> +        }   
>>>>> +        catch (IOException ioe) 
>>>>> +        {
>>>>> +            logger.warning("\nNPANDAY-1005-0001: Error copying
>>>> dependency " + artifact +" "+ioe.getMessage());
>>>>> +        }
>>>> 
>>>> Should this only be a warning? Won't it cause problems later? I'd
>>>> think it should be thrown...
>>> 
>>> Ok Noted. But wouldn't it have to be caught somewhere else? I caught
>> it here thinking that way. So that the build will not break.
>> 
>> Right - but my question was *should* the build actually break if this
>> happens? Is it recoverable?
> 
> Ahh I see, I guess it would provide a better alert to the developer that one 
> of his dependencies are missing, rather than just having it lost in the logs 
> that "there was a dependency missing". Yup, the build should break.

Are you going to alter this?

> 
>>>> 
>>>> You shouldn't construct the path yourself. I'm not sure where this
>> is
>>>> used, but it should be passed from the result of artifact
>> resolution.
>>>> Is artifact.getFile() already set?
>>> 
>>> Sometimes artifact.getFile() returns a null that is why there is the
>> need for the generation.
>> 
>> Under what situations? I would think that's a faulty lifecycle /
>> plugin that should be fixed in that case rather than hard coding
>> here.


What are your thoughts on this? (referring to PathUtil's getDotNetArtifact)

>>> 
>>> 
>>>>> 
>>>>> Modified:
>>>> 
>> incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java
>>>>> URL:
>>>> 
>> http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java?rev=1025815&r1=1025814&r2=1025815&view=diff
>>>>> 
>>>> 
>> ==============================================================================
>>>>> ---
>>>> 
>> incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java
>>>> (original)
>>>>> +++
>>>> 
>> incubator/npanday/trunk/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java
>>>> Thu Oct 21 03:02:36 2010
>>>>> @@ -294,12 +294,16 @@ public final class ProjectDaoImpl
>>>>> 
>>>>>           if ( !result.hasNext() )
>>>>>           {
>>>>> -                if ( artifactType != null &&
>>>> ArtifactTypeHelper.isDotnetAnyGac( artifactType ) )
>>>>> +                
>>>>> +                //if ( artifactType != null &&
>>>> ArtifactTypeHelper.isDotnetAnyGac( artifactType ) )
>>>>> +                if ( artifactType != null )
>>>> 
>>>> why was this changed?
>> 
>> Not sure if you answered this in another question?

^^^

>> 
>>>> 
>>>>> Modified:
>>>> 
>> incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java
>>>>> URL:
>>>> 
>> http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java?rev=1025815&r1=1025814&r2=1025815&view=diff
>>>>> 
>>>> 
>> ==============================================================================
>>>>> ---
>>>> 
>> incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java
>>>> (original)
>>>>> +++
>>>> 
>> incubator/npanday/trunk/components/dotnet-executable/src/main/java/npanday/executable/compiler/impl/DefaultCompiler.java
>>>> Thu Oct 21 03:02:36 2010
>>>>> @@ -108,7 +108,11 @@ public final class DefaultCompiler
>>>>>           for ( Artifact artifact : references )
>>>>>           {
>>>>>               String path =
>> artifact.getFile().getAbsolutePath();
>>>>> -                commands.add( "/reference:" + path );
>>>>> +          
>>>>> +                if( !path.contains( ".jar" ) )
>>>>> +                {
>>>>> +                    commands.add( "/reference:" + path );
>>>>> +                }
>>>> 
>>>> This hardcoding doesn't seem good - it seems linked to the other
>>>> change above about unknown extensions. Shouldn't it be checking
>> the
>>>> artifact types against suitable references?
>>> 
>>> It was including the jars and it was causing problems during
>> compilation since csc/vbc aren't using them.
>> 
>> Which JARs would be included? I was suggesting you should have a list
>> of suitable references and check the actual type against that. At the
>> moment, foo.war would be included, and cookie.jar-1.0.dll would be
>> excluded.

^^^

>> 
>>> 
>>>>> 
>>>>> 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=1025815&r1=1025814&r2=1025815&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
>>>> Thu Oct 21 03:02:36 2010
>>>>> @@ -28,6 +28,7 @@ import npanday.executable.compiler.*;
>>>>> import npanday.artifact.ArtifactContext;
>>>>> import npanday.artifact.ArtifactException;
>>>>> import npanday.ArtifactType;
>>>>> +import npanday.PathUtil;
>>>>> 
>>>>> import org.apache.maven.project.MavenProject;
>>>>> import org.apache.maven.artifact.Artifact;
>>>>> @@ -388,7 +389,19 @@ public final class CompilerContextImpl
>>>>>               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 != ArtifactType.NULL &&
>> (
>>>>> +                            StringUtils.equals(
>>>> artifactType.getTargetCompileType(), "library" )
>>>>> +                            ||
>> artifactType.getExtension().equals(
>>>> "dll" )
>>>>> +                            ||
>> artifactType.getExtension().equals(
>>>> "exe" ))
>>>>> +                          )
>>>>> +                          || type.equals( "jar" ) )
>>>>> +                {
>>>>> +                    libraries.add( artifact );
>>>>> +                }
>>>> 
>>>> Is there an isDotnet* method that better represents this? Why
>> .jar?
>> 
>> Maybe related to above?


^^^

>>>> 
>>>> 
>>>>> Modified:
>>>> 
>> incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java
>>>>> URL:
>>>> 
>> http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java?rev=1025815&r1=1025814&r2=1025815&view=diff
>>>>> 
>>>> 
>> ==============================================================================
>>>>> ---
>>>> 
>> incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java
>>>> (original)
>>>>> +++
>>>> 
>> incubator/npanday/trunk/components/dotnet-repository/src/test/java/npanday/repository/impl/RepositoryConverterImplTest.java
>>>> Thu Oct 21 03:02:36 2010
>>>>> @@ -30,64 +30,7 @@ public class RepositoryConverterImplTest
>>>>> 
>>>>>   private static File basedir = new File( System.getProperty(
>>>> "basedir" ) );
>>>>> 
>>>>> -
>>>>> -    public void testConvertArtifact()
>>>>> -    {
>>>>> -        File testRepo = new File( System.getProperty( "basedir"
>> ),
>>>> "target/test-repo/repository-1" );
>>>>> -        testRepo.mkdir();
>>>>> -
>>>>> -        Repository repository = this.createRepository();
>>>>> -        ProjectDao dao = this.createProjectDao( repository );
>>>>> -
>>>>> -        Project project = new Project();
>>>>> -        project.setGroupId( "npanday.model" );
>>>>> -        project.setArtifactId( "NPanday.Model.Pom" );
>>>>> -        project.setVersion( "1.0" );
>>>>> -        project.setArtifactType( "library" );
>>>>> -        project.setPublicKeyTokenId( "abc" );
>>>>> -
>>>>> -        ProjectDependency test2 = createProjectDependency(
>>>> "npanday", "NPanday.Test", "1.0" );
>>>>> -        test2.setArtifactType( "library" );
>>>>> -        project.addProjectDependency( test2 );
>>>>> -
>>>>> -        try
>>>>> -        {
>>>>> -            dao.storeProjectAndResolveDependencies( project,
>>>> testRepo, new ArrayList<ArtifactRepository>() );
>>>>> -        }
>>>>> -        catch ( java.io.IOException e )
>>>>> -        {
>>>>> -            e.printStackTrace();
>>>>> -            fail( "Could not store the project: " +
>> e.getMessage()
>>>> );
>>>>> -        }
>>>>> -
>>>>> -        RepositoryConverterImpl repositoryConverter = new
>>>> RepositoryConverterImpl();
>>>>> -        repositoryConverter.initTest( new
>>>> DataAccessObjectRegistryStub(), new ArtifactFactoryTestStub(),
>>>>> -                                      null, new
>>>> ArtifactResolverTestStub() );
>>>>> -
>>>>> -        ArtifactFactory artifactFactory = new
>>>> ArtifactFactoryTestStub();
>>>>> -        Artifact artifact =
>>>> artifactFactory.createArtifactWithClassifier(
>> project.getGroupId(),
>>>> project.getArtifactId(),
>>>>> -                                                                 
>> 
>>>>     project.getVersion(),
>>>>> -                                                                 
>> 
>>>>     project.getArtifactType(), "abc" );
>>>>> -        File artifactFile = new File( testRepo.getParentFile(),
>>>>> -                                     
>>>> 
>> "/uac/gac_msil/NPanday.Model.Pom/1.0__npanday.model/NPanday.Model.Pom.dll"
>>>> );
>>>>> -
>>>>> -        artifact.setFile( artifactFile );
>>>>> -        try
>>>>> -        {
>>>>> -            repositoryConverter.convertRepositoryFormatFor(
>>>> artifact, null, repository, testRepo );
>>>>> -        }
>>>>> -        catch ( IOException e )
>>>>> -        {
>>>>> -            fail( "Could not convert the repository: " +
>>>> e.getMessage() );
>>>>> -        }
>>>>> -        this.exportRepositoryToRdf(
>> "testConvertArtifact-rdf.xml",
>>>> testRepo, repository );
>>>>> -
>>>>> -        assertTrue( new File( testRepo,
>>>> 
>> "/npanday/model/NPanday.Model.Pom/1.0/NPanday.Model.Pom-1.0-abc.dll"
>>>> ).exists() );
>>>>> -        assertTrue( new File( testRepo,
>>>> "/npanday/model/NPanday.Model.Pom/1.0/NPanday.Model.Pom-1.0.pom"
>>>> ).exists() );
>>>>> -        assertFalse( new File( testRepo,
>>>> "/npanday/NPanday.Test/1.0/NPanday.Test-1.0.dll" ).exists() );
>>>>> -        assertFalse( new File( testRepo,
>>>> "/npanday/NPanday.Test/1.0/NPanday.Test-1.0.pom" ).exists() );
>>>>> -    }
>>>> 
>>>> Why was this removed?
>> 
>> Did I miss the answer to this?

^^^

>> 
>>>> 
>>>>> -
>>>>> +    
>>>>>   public void testConvert()
>>>>>   {
>>>>>       File testRepo = new File( System.getProperty( "basedir" ),
>>>> "target/test-repo/repository" );
>>>>> @@ -101,9 +44,8 @@ public class RepositoryConverterImplTest
>>>>>       project.setArtifactId( "NPanday.Model.Pom" );
>>>>>       project.setVersion( "1.0" );
>>>>>       project.setArtifactType( "library" );
>>>>> -        project.setPublicKeyTokenId( "abc" );
>>>>> 
>>>>> -        ProjectDependency test2 = createProjectDependency(
>>>> "npanday", "NPanday.Test", "1.0" );
>>>>> +        ProjectDependency test2 = createProjectDependency(
>>>> "npanday", "ClassLibrary1", "1.0" );
>>>>>       test2.setArtifactType( "library" );
>>>>>       project.addProjectDependency( test2 );
>>>>> 
>>>>> @@ -130,10 +72,10 @@ public class RepositoryConverterImplTest
>>>>>       }
>>>>>       this.exportRepositoryToRdf( "testConvert-rdf.xml",
>> testRepo,
>>>> repository );
>>>>> 
>>>>> -        assertTrue( new File( testRepo,
>>>> 
>> "/npanday/model/NPanday.Model.Pom/1.0/NPanday.Model.Pom-1.0-abc.dll"
>>>> ).exists() );
>>>>> +        assertTrue( new File( testRepo,
>>>> "/npanday/model/NPanday.Model.Pom/1.0/NPanday.Model.Pom-1.0.dll"
>>>> ).exists() );
>>>>>       assertTrue( new File( testRepo,
>>>> "/npanday/model/NPanday.Model.Pom/1.0/NPanday.Model.Pom-1.0.pom"
>>>> ).exists() );
>>>>> -        assertTrue( new File( testRepo,
>>>> "/npanday/NPanday.Test/1.0/NPanday.Test-1.0.dll" ).exists() );
>>>>> -        assertTrue( new File( testRepo,
>>>> "/npanday/NPanday.Test/1.0/NPanday.Test-1.0.pom" ).exists() );
>>>>> +        assertTrue( new File( testRepo,
>>>> "/npanday/ClassLibrary1/1.0/ClassLibrary1-1.0.dll" ).exists() );
>>>>> +
>>>> 
>>>> Are these results correct? I realise you needed to remove the UAC,
>> but
>>>> not sure why the test for the model (particularly the classifier)
>> was
>>>> removed.
>> 
>> Same here...

^^^

>> 
>>>> 
>>>>> Modified:
>>>> 
>> incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/ArtifactRepository.cs
>>>>> URL:
>>>> 
>> http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/ArtifactRepository.cs?rev=1025815&r1=1025814&r2=1025815&view=diff
>>>>> 
>>>> 
>> ==============================================================================
>>>>> ---
>>>> 
>> incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/ArtifactRepository.cs
>>>> (original)
>>>>> +++
>>>> 
>> incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/ArtifactRepository.cs
>>>> Thu Oct 21 03:02:36 2010
>>>>> @@ -26,6 +26,7 @@ using System.Text;
>>>>> using System.Xml;
>>>>> using System.Xml.Serialization;
>>>>> using System.Windows.Forms;
>>>>> +using NPanday.Model.Setting;
>>>>> 
>>>>> namespace NPanday.Artifact
>>>>> {
>>>>> @@ -34,8 +35,14 @@ namespace NPanday.Artifact
>>>>> 
>>>>>       public string GetLocalUacPath(Artifact artifact, string
>>>> ext)
>>>>>       {
>>>>> -            return Path.Combine(localRepository.FullName,
>>>> string.Format(@"uac\gac_msil\{1}\{2}__{0}\{1}{3}",
>> artifact.GroupId,
>>>> artifact.ArtifactId, artifact.Version, ext));
>>>>> +            return
>>>> Path.Combine(SettingsUtil.GetLocalRepositoryPath(),
>>>> string.Format(@"{0}\{1}\{1}{2}-{3}", Tokenize(artifact.GroupId),
>>>> artifact.ArtifactId, artifact.Version, 
>>>> 
>>>> This is duplicated with PathUtil.cs. They should be shared. Also,
>> does
>>>> the Artifact type support classifiers? They don't seem to be
>> included
>>>> here.
>> 
>> Did you get a chance to fix this already?

^^^

>>> 
>>>> 
>>>>> Modified:
>>>> 
>> incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/PathUtil.cs
>>>>> URL:
>>>> 
>> http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/PathUtil.cs?rev=1025815&r1=1025814&r2=1025815&view=diff
>>>>> 
>>>> 
>> ==============================================================================
>>>>> ---
>>>> 
>> incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/PathUtil.cs
>>>> (original)
>>>>> +++
>>>> 
>> incubator/npanday/trunk/dotnet/assemblies/NPanday.Artifact/src/main/csharp/NPanday/Artifact/PathUtil.cs
>>>> Thu Oct 21 03:02:36 2010
>>>>> @@ -23,21 +23,35 @@ using System;
>>>>> using System.Collections.Generic;
>>>>> using System.IO;
>>>>> using System.Text;
>>>>> +using NPanday.Model.Setting;
>>>>> 
>>>>> namespace NPanday.Artifact
>>>>> {
>>>>>   public class PathUtil
>>>>>   {
>>>>> -        public static FileInfo
>>>> GetPrivateApplicationBaseFileFor(Artifact artifact, DirectoryInfo
>>>> localRepository)
>>>>> +        public static FileInfo
>>>> GetPrivateApplicationBaseFileFor(Artifact artifact, DirectoryInfo
>>>> localRepository, string currentDir)
>>>>>       {
>>>>> -            return new FileInfo(localRepository.Parent.FullName
>> +
>>>> @"\pab\gac_msil\" + artifact.ArtifactId + @"\" + artifact.Version
>> +
>>>> "__" +
>>>>> -                artifact.GroupId + @"\" + artifact.ArtifactId +
>> "."
>>>> + artifact.Extension);
>>>>> +            FileInfo target = new FileInfo(currentDir +
>>>> Path.PathSeparator + "target" +
>> Path.PathSeparator+artifact.ArtifactId
>>>> + artifact.Extension);
>>>> 
>>>> This is probably ok, but if there's a way to read it from the POM
>> or
>>>> pass in the target directory rather than just the basedir, that'd
>> be
>>>> more flexible. 
>>> 
>>> Ok, but wouldn't reading from the pom take up more resources? But I
>> agree with making npanday as flexible as possible.
>> 
>> I'd guess the POM is already read somewhere? But otherwise, it'd be
>> good to centralise the code.

^^^

>> 
>>> 
>>>> 
>>>>> +           
>>>>> +            FileInfo source =
>> GetUserAssemblyCacheFileFor(artifact,
>>>> localRepository);
>>>>> +
>>>>> +            if(source.Exists)
>>>>> +            {
>>>>> +                   File.Copy( source.ToString(),
>>>> target.ToString());
>>>>> +            } 
>>>>> +            
>>>>> +           
>>>> 
>>>> Why might these be different?
>> 
>> Not sure if you caught this one in the middle too :)

^^^

>> 
>>> 
>>> 
>>>>> Modified: incubator/npanday/trunk/dotnet/pom.xml
>>>>> URL:
>>>> 
>> http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/pom.xml?rev=1025815&r1=1025814&r2=1025815&view=diff
>>>>> 
>>>> 
>> ==============================================================================
>>>>> --- incubator/npanday/trunk/dotnet/pom.xml (original)
>>>>> +++ incubator/npanday/trunk/dotnet/pom.xml Thu Oct 21 03:02:36
>> 2010
>>>>> @@ -35,7 +35,8 @@ under the License.
>>>>> </modules>  
>>>>> <build> 
>>>>>   <sourceDirectory>src/main/csharp</sourceDirectory>  
>>>>> -    <testSourceDirectory>src/test/csharp</testSourceDirectory>  
>>>>> +    <!-- Disabled because of NUnit-console Issue NPANDAY-332 -->
>>>>> +    <!--
>> <testSourceDirectory>src/test/csharp</testSourceDirectory>
>>>> -->
>>>> 
>>>> Did this work for you before you applied your changes? Or could it
>> be
>>>> related to the VS2010 changes?
>>> 
>>> This was already failing for me before I added in any changes for
>> the pab & uac removal
>> 
>> Do we need to backtrack to the problem?

^^^

Thanks,
Brett

--
Brett Porter
[email protected]
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter




Reply via email to