Package org.apache.maven.dotnet.assembler

Examples of org.apache.maven.dotnet.assembler.AssemblyInfo


        catch ( IOException e )
        {
            throw new MojoExecutionException( e.getMessage() );
        }

        AssemblyInfo assemblyInfo = assemblerContext.getAssemblyInfo();
        assemblyInfo.setClsCompliant( isCLSCompliant );
        //assemblyInfo.setKeyFile( keyfile );
        //assemblyInfo.setKeyName( keycontainer );

        try
        {
View Full Code Here


    /**
     * @see org.apache.maven.dotnet.assembler.AssemblerContext#getAssemblyInfo()
     */
    public AssemblyInfo getAssemblyInfo()
    {
        AssemblyInfo assemblyInfo = new AssemblyInfo();
        String description = mavenProject.getDescription();
        String version = mavenProject.getVersion();
        String name = mavenProject.getName();
        Organization organization = mavenProject.getOrganization();
        String company = ( organization != null ) ? organization.getName() : "";
        String copyright = null;
        String informationalVersion = "";
        String configuration = "";

        String basedir = mavenProject.getBasedir().toString();
        File file = new File( basedir + "/COPYRIGHT.txt" );
        if ( file.exists() )
        {
            logger.log( Level.INFO, "NMAVEN-020-000: Found Copyright: " + file.getAbsolutePath() );
            FileInputStream fis = null;
            try
            {
                fis = new FileInputStream( file );
                copyright = IOUtil.toString( fis ).replace( "\r", " " ).replace( "\n", " " ).replace( "\"", "'" );
            }
            catch ( IOException e )
            {
                logger.warning( "NMAVEN-020-001: Could not get copyright: File = " + file.getAbsolutePath() );
            }
            finally
            {
                if ( fis != null )
                {
                    IOUtil.close( fis );
                }
            }
        }
        informationalVersion = version;
        if ( version.contains( "-" ) )
        {
            version = version.split( "-" )[0];
        }
        assemblyInfo.setCompany( company );
        assemblyInfo.setCopyright( copyright );
        assemblyInfo.setCulture( "" );
        assemblyInfo.setDescription( description );
        assemblyInfo.setProduct( company + "-" + name );
        assemblyInfo.setTitle( name );
        assemblyInfo.setTrademark( "" );
        assemblyInfo.setInformationalVersion( informationalVersion );
        assemblyInfo.setVersion( version );
        assemblyInfo.setConfiguration( configuration );

        return assemblyInfo;
    }
View Full Code Here

     * @see AssemblyInfoMarshaller#unmarshall(java.io.InputStream)
     */
    public AssemblyInfo unmarshall( InputStream inputStream )
        throws IOException
    {
        AssemblyInfo assemblyInfo = new AssemblyInfo();
        BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
        String line;
        while ( ( line = reader.readLine() ) != null )
        {
            String[] tokens = line.split( "[:]" );
View Full Code Here

TOP

Related Classes of org.apache.maven.dotnet.assembler.AssemblyInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.