You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/01/30 21:36:43 UTC

[GitHub] matthiasblaesing commented on issue #399: [NETBEANS-317] (partial) Generate LICENSE, NOTICE and DISCLAIMER to m?

matthiasblaesing commented on issue #399: [NETBEANS-317] (partial) Generate LICENSE, NOTICE and DISCLAIMER to m?
URL: https://github.com/apache/incubator-netbeans/pull/399#issuecomment-361742467
 
 
   If I'm not mistaken the intention is here to prepare the JARs when they are individually deployed to maven central.
   
   The created jars look good and the license content looks sane and for the individual jars the single file form of the license file look approriate.
   
   One think I noticed while building and thinking about the maven central part, was that I routinely fetch sources for dependencies to understand failure/investigate. This lead me to the sources-zip task. The generated source zips won't survie a review, but based on the work done till this, I suggest this:
   
   ```diff
   # This patch file was generated by NetBeans IDE
   # It uses platform neutral UTF-8 encoding and \n newlines.
   --- a/nbbuild/templates/projectized.xml
   +++ b/nbbuild/templates/projectized.xml
   @@ -372,9 +372,26 @@
        <target name="netbeans" depends="projectized-common.netbeans,check-sigtest"/>
    -->    
        <target name="sources-zip" depends="build-init, check-sources-exist" if="sources.exist" description="Simple sources zip creation intended for use in maven repository.">
   +        
   +        <taskdef name="createlicensesummary" classname="org.netbeans.nbbuild.extlibs.CreateLicenseSummary" classpath="${nbantext.jar}"/>
   +        <property name="module.name.temp" location="." />
   +        <basename property="module.name" file="${module.name.temp}" />
   +        <mkdir dir="${build.classes.dir}/META-INF" />
   +        <createlicensesummary licenseStub="${nb_all}/LICENSE"
   +                              noticeStub="${nb_all}/nbbuild/notice-stub.txt"
   +                              nball="${nb_all}"
   +                              license="${build.dir}/LICENSE"
   +                              notice="${build.dir}/NOTICE"
   +                              binary="false"
   +                              modules="${module.name}"
   +        />
   +        
            <mkdir dir="${netbeans.zipped.sources.dir}"/>
   -        <zip zipfile="${netbeans.zipped.sources.dir}/${code.name.base.dashes}.zip"
   -             basedir="${src.dir}"/>
   +        <zip zipfile="${netbeans.zipped.sources.dir}/${code.name.base.dashes}.zip">
   +            <zipfileset dir="${src.dir}" />
   +            <zipfileset dir="${build.dir}" prefix="META-INF" includes="LICENSE NOTICE" />
   +            <zipfileset dir="${nb_all}" prefix="META-INF" includes="DISCLAIMER" />
   +        </zip>
        </target>
   ```
   
   In effect this would transfer your binary approach to the source files and place the license info in the META-INF directory of the source jar.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists