Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4-incubating
    • Fix Version/s: 1.5.0-incubating
    • Component/s: Maven Plugins
    • Labels:
      None
    • Environment:

      Description

      Microsoft .Net Portable Class Libraries (PCL) allow developers to code against a reduced set of .Net APIs and create a portable library that can be reused at runtime by both .Net 4 and Silverlight 4 applications, without needing to recompile the source code.

      1. NPANDAY-450.diff
        16 kB
        John R. Fallows

        Activity

        Hide
        John R. Fallows added a comment -

        Now supporting all .NETPortable profiles; Profile1, Profile2, Profile3 and Profile4 on both Microsoft and Mono.

        Show
        John R. Fallows added a comment - Now supporting all .NETPortable profiles; Profile1, Profile2, Profile3 and Profile4 on both Microsoft and Mono.
        Hide
        John R. Fallows added a comment -

        Applied feedback.

        <plugin>
            <groupId>org.apache.npanday.plugins</groupId>
            <artifactId>maven-compile-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <profile>.NETPortable,Profile2</profile>
                <frameworkVersion>4.0</frameworkVersion>
            </configuration>
        </plugin>
        
        Show
        John R. Fallows added a comment - Applied feedback. <plugin> <groupId>org.apache.npanday.plugins</groupId> <artifactId>maven-compile-plugin</artifactId> <extensions> true </extensions> <configuration> <profile>.NETPortable,Profile2</profile> <frameworkVersion>4.0</frameworkVersion> </configuration> </plugin>
        Hide
        John R. Fallows added a comment -

        Almost finished moving it. Stay tuned.

        Show
        John R. Fallows added a comment - Almost finished moving it. Stay tuned.
        Hide
        Lars Corneliussen added a comment -

        Good. Then it should be moved. The existing attributes are alteady confusing enough.

        Show
        Lars Corneliussen added a comment - Good. Then it should be moved. The existing attributes are alteady confusing enough.
        Hide
        John R. Fallows added a comment -

        The frameworkName and frameworkDisplayName are used to populate the generated TargetFrameworkAttribute.

        As mentioned in the discussion on the mailing list, this can be moved into compiler-plugins.xml.

        Show
        John R. Fallows added a comment - The frameworkName and frameworkDisplayName are used to populate the generated TargetFrameworkAttribute. As mentioned in the discussion on the mailing list, this can be moved into compiler-plugins.xml.
        Hide
        Lars Corneliussen added a comment -

        Is any logic based on targetFrameworkName?

        It looks like quite "strong" parameter.

        Show
        Lars Corneliussen added a comment - Is any logic based on targetFrameworkName? It looks like quite "strong" parameter.
        Hide
        John R. Fallows added a comment -

        Updated syntax based on mailing list discussion.

        <plugin>
            <groupId>org.apache.npanday.plugins</groupId>
            <artifactId>maven-compile-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <profile>.NETPortable,Profile2</profile>
                <frameworkName>.NETPortable,Version=v4.0,Profile=Profile2</frameworkName>
                <frameworkDisplayName>Portable Library</frameworkDisplayName>
            </configuration>
        </plugin>
        
        Show
        John R. Fallows added a comment - Updated syntax based on mailing list discussion. <plugin> <groupId>org.apache.npanday.plugins</groupId> <artifactId>maven-compile-plugin</artifactId> <extensions> true </extensions> <configuration> <profile>.NETPortable,Profile2</profile> <frameworkName>.NETPortable,Version=v4.0,Profile=Profile2</frameworkName> <frameworkDisplayName>Portable Library</frameworkDisplayName> </configuration> </plugin>
        Hide
        John R. Fallows added a comment -

        Sample usage:

        <plugin>
            <groupId>org.apache.npanday.plugins</groupId>
            <artifactId>maven-compile-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <profile>PORTABLE</profile>
                <frameworkName>.NETPortable,Version=v4.0,Profile=Profile2</frameworkName>
                <frameworkDisplayName>Portable Library</frameworkDisplayName>
            </configuration>
        </plugin>
        
        Show
        John R. Fallows added a comment - Sample usage: <plugin> <groupId>org.apache.npanday.plugins</groupId> <artifactId>maven-compile-plugin</artifactId> <extensions> true </extensions> <configuration> <profile>PORTABLE</profile> <frameworkName>.NETPortable,Version=v4.0,Profile=Profile2</frameworkName> <frameworkDisplayName>Portable Library</frameworkDisplayName> </configuration> </plugin>
        Hide
        John R. Fallows added a comment -

        Fixed in r1142150.

        Changed targetFramework to use frameworkName and frameworkDisplayName as previously suggested.

        Show
        John R. Fallows added a comment - Fixed in r1142150. Changed targetFramework to use frameworkName and frameworkDisplayName as previously suggested.
        Hide
        John R. Fallows added a comment -

        Looking at http://msdn.microsoft.com/en-us/library/system.runtime.versioning.targetframeworkattribute.aspx it might be useful to rename "targetFramework" to "frameworkName", and then optionally also add "frameworkDisplayName".

        The inclusion of "frameworkName" in the configuration would trigger generation of the TargetFrameworkAttribute metadata, with frameworkDisplayName as well, if specified.

        Show
        John R. Fallows added a comment - Looking at http://msdn.microsoft.com/en-us/library/system.runtime.versioning.targetframeworkattribute.aspx it might be useful to rename "targetFramework" to "frameworkName", and then optionally also add "frameworkDisplayName". The inclusion of "frameworkName" in the configuration would trigger generation of the TargetFrameworkAttribute metadata, with frameworkDisplayName as well, if specified.
        Hide
        John R. Fallows added a comment - - edited

        The attached patch adds support for PCL, including the generation of metadata that indicates the target framework attribute, equivalent to that automatically generated by Visual Studio.

        using System;
        using System.Reflection;
        [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETPortable,Version=v4.0,Profile=Profile2", 
                                                                              FrameworkDisplayName = "Portable Library")]
        

        The value of the new generate-assembly-info "targetFramework" plugin parameter is used to specify the runtime versioning target framework attribute above.

        For example:

        <plugin>
            <groupId>org.apache.npanday.plugins</groupId>
            <artifactId>maven-compile-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <profile>PORTABLE</profile>
                <frameworkVersion>v4.0</frameworkVersion>
                <targetFramework>.NETPortable,Version=v4.0,Profile=Profile2</targetFramework>
            </configuration>
        </plugin>
        

        It would be useful to get feedback on the above plugin parameter naming.

        Show
        John R. Fallows added a comment - - edited The attached patch adds support for PCL, including the generation of metadata that indicates the target framework attribute, equivalent to that automatically generated by Visual Studio. using System ; using System .Reflection; [assembly: global:: System . Runtime .Versioning.TargetFrameworkAttribute( ".NETPortable,Version=v4.0,Profile=Profile2" , FrameworkDisplayName = "Portable Library" )] The value of the new generate-assembly-info "targetFramework" plugin parameter is used to specify the runtime versioning target framework attribute above. For example: <plugin> <groupId>org.apache.npanday.plugins</groupId> <artifactId>maven-compile-plugin</artifactId> <extensions> true </extensions> <configuration> <profile>PORTABLE</profile> <frameworkVersion>v4.0</frameworkVersion> <targetFramework>.NETPortable,Version=v4.0,Profile=Profile2</targetFramework> </configuration> </plugin> It would be useful to get feedback on the above plugin parameter naming.

          People

          • Assignee:
            Unassigned
            Reporter:
            John R. Fallows
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development