Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.apache.maven.plugin.nar;
  
  /*
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you under the Apache License, Version 2.0 (the
   * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
 
 import java.io.File;
 import java.util.List;
 
 
Java specifications for NAR

Author(s):
Mark Donszelmann
 
 public class Java
 {

    
Add Java includes to includepath

Parameter:
expression="" default-value="false"
Required:
 
     private boolean include = false;

    
Java Include Paths, relative to a derived ${java.home}. Defaults to: "${java.home}/include" and "${java.home}/include/os-specific".

Parameter:
expression=""
 
     private List includePaths;

    
Add Java Runtime to linker

Parameter:
expression="" default-value="false"
Required:
 
     private boolean link = false;

    
Relative path from derived ${java.home} to the java runtime to link with Defaults to Architecture-OS-Linker specific value. FIXME table missing

Parameter:
expression=""
 
     private String runtimeDirectory;

    
Name of the runtime

Parameter:
expression="" default-value="jvm"
 
     private String runtime = "jvm";
 
     private AbstractCompileMojo mojo;
 
     public Java()
     {
     }
 
     public final void setAbstractCompileMojoAbstractCompileMojo mojo )
     {
         this. = mojo;
     }
 
     public final void addIncludePathsCCTask taskString outType )
     {
         if (  || .getJavah().getJniDirectory().exists() )
         {
             if (  != null )
             {
                for ( Iterator i = .iterator(); i.hasNext(); )
                {
                    String path = (Stringi.next();
                    task.createIncludePath().setPathnew File.getJavaHome.getAOL() ), path ).getPath() );
                }
            }
            else
            {
                String prefix = .getAOL().getKey() + ".java.";
                String includes = NarProperties.getInstance(.getMavenProject()).getPropertyprefix + "include" );
                if ( includes != null )
                {
                    String[] path = includes.split";" );
                    for ( int i = 0; i < path.lengthi++ )
                    {
                        task.createIncludePath().setPath(
                                                          new File.getJavaHome.getAOL() ), path[i] ).getPath() );
                    }
                }
            }
        }
    }
    public final void addRuntimeCCTask taskFile javaHomeString osString prefix )
        throws MojoFailureException
    {
        if (  )
        {
            if ( os.equals. ) )
            {
                CommandLineArgument.LocationEnum end = new CommandLineArgument.LocationEnum();
                end.setValue"end" );
                // add as argument rather than library to avoid argument quoting
                LinkerArgument framework = new LinkerArgument();
                framework.setValue"-framework" );
                framework.setLocationend );
                task.addConfiguredLinkerArgframework );
                LinkerArgument javavm = new LinkerArgument();
                javavm.setValue"JavaVM" );
                javavm.setLocationend );
                task.addConfiguredLinkerArgjavavm );
            }
            else
            {
                if (  == null )
                {
                     = NarProperties.getInstance(.getMavenProject()).getPropertyprefix + "runtimeDirectory" );
                    if (  == null )
                    {
                        throw new MojoFailureException"NAR: Please specify a <RuntimeDirectory> as part of <Java>" );
                    }
                }
                .getLog().debug"Using Java Runtime Directory: " +  );
                LibrarySet libset = new LibrarySet();
                libset.setProject.getAntProject() );
                libset.setLibsnew CUtil.StringArrayBuilder ) );
                libset.setDirnew FilejavaHome ) );
                task.addLibsetlibset );
            }
        }
    }
New to GrepCode? Check out our FAQ X