当前位置: 首页>>代码示例>>Java>>正文


Java Build.getOutputDirectory方法代码示例

本文整理汇总了Java中org.apache.maven.model.Build.getOutputDirectory方法的典型用法代码示例。如果您正苦于以下问题:Java Build.getOutputDirectory方法的具体用法?Java Build.getOutputDirectory怎么用?Java Build.getOutputDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.model.Build的用法示例。


在下文中一共展示了Build.getOutputDirectory方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCoSFile

import org.apache.maven.model.Build; //导入方法依赖的package包/类
private static File getCoSFile(MavenProject mp, boolean test) {
    if (mp == null) {
        return null;
    }
    Build build = mp.getBuild();
    if (build == null) {
        return null;
    }
    String path = test ? build.getTestOutputDirectory() : build.getOutputDirectory();
    if (path == null) {
        return null;
    }
    File fl = new File(path);
    fl = FileUtil.normalizeFile(fl);
    return  new File(fl, NB_COS);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:CosChecker.java

示例2: getTargetDirectory

import org.apache.maven.model.Build; //导入方法依赖的package包/类
private DirectoryResource getTargetDirectory(Project project)
{
   MavenFacet mavenFacet = project.getFacet(MavenFacet.class);
   Build build = mavenFacet.getModel().getBuild();
   String targetFolderName;
   if (build != null && build.getOutputDirectory() != null)
   {
      targetFolderName = mavenFacet.resolveProperties(build.getOutputDirectory());
   }
   else
   {
      targetFolderName = "target" + File.separator + "classes";
   }
   DirectoryResource projectRoot = project.getRoot().reify(DirectoryResource.class);
   return projectRoot.getChildDirectory(targetFolderName);
}
 
开发者ID:forge,项目名称:wildfly-swarm-addon,代码行数:17,代码来源:DetectFractionsCommand.java

示例3: execute

import org.apache.maven.model.Build; //导入方法依赖的package包/类
public void execute() throws MojoExecutionException, MojoFailureException
{
  DomainMojoHelper.setLog(getLog());
  Build build = project.getBuild();
  String outputDir = build.getOutputDirectory();
  System.setProperty("current-project-name", project.getName());
  Properties prop = project.getProperties();
  String domainSerializeType = prop.getProperty("AutoSerializeType");
  if (StringUtils.isEmpty(domainSerializeType))
  {
    domainSerializeType = Type.DS.name();
    DomainMojoHelper.log().info("AutoSerializeType -> default value " + domainSerializeType + "." );
  }
  else{
    DomainMojoHelper.log().info("AutoSerializeType -> " + domainSerializeType +"." );
  }
  
  System.setProperty("current-project-path", project.getBuild().getOutputDirectory());
  DomainMojoHelper.setLoader(Thread.currentThread().getContextClassLoader());
  DomainMojoExecutor executor = new DomainMojoExecutor(domainSerializeType);
  boolean success = executor.execute(outputDir,project.getName());
  if (!success)
  {
    File f = new File(build.getOutputDirectory());
    f.deleteOnExit();
    throw new MojoExecutionException("Domain class instrument failure.");
  }
  project.getProperties();
}
 
开发者ID:iisi-nj,项目名称:GemFireLite,代码行数:30,代码来源:DomainAnnotationMojo.java

示例4: getTargetClassesDirectory

import org.apache.maven.model.Build; //导入方法依赖的package包/类
private File getTargetClassesDirectory() {
  final Build build = project.getBuild();
  if (build != null) {
    final String classesOutputDirectory = build.getOutputDirectory();
    if (StringUtils.isNotEmpty(classesOutputDirectory)) {
      final File targetClasses = new File(classesOutputDirectory);
      if (targetClasses.isDirectory() && (targetClasses.list().length > 0)) {
        logger.debug("Found valid target/classes directory '" + targetClasses.getAbsolutePath() + "'.");
        return targetClasses;
      }
    }
  }
  logger.debug("No target/classes directory found.");
  return null;
}
 
开发者ID:ImmobilienScout24,项目名称:illegal-transitive-dependency-check,代码行数:16,代码来源:IllegalTransitiveDependencyCheck.java

示例5: mergeBuild_OutputDirectory

import org.apache.maven.model.Build; //导入方法依赖的package包/类
protected void mergeBuild_OutputDirectory( Build target, Build source, boolean sourceDominant,
                                           Map<Object, Object> context )
{
    String src = source.getOutputDirectory();
    if ( src != null )
    {
        if ( sourceDominant || target.getOutputDirectory() == null )
        {
            target.setOutputDirectory( src );
            target.setLocation( "outputDirectory", source.getLocation( "outputDirectory" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java

示例6: assembleBuildInheritance

import org.apache.maven.model.Build; //导入方法依赖的package包/类
@SuppressWarnings( "unchecked" )
public void assembleBuildInheritance( Build childBuild, Build parentBuild, boolean handleAsInheritance )
{
    // The build has been set but we want to step in here and fill in
    // values that have not been set by the child.

    if ( childBuild.getSourceDirectory() == null )
    {
        childBuild.setSourceDirectory( parentBuild.getSourceDirectory() );
    }

    if ( childBuild.getScriptSourceDirectory() == null )
    {
        childBuild.setScriptSourceDirectory( parentBuild.getScriptSourceDirectory() );
    }

    if ( childBuild.getTestSourceDirectory() == null )
    {
        childBuild.setTestSourceDirectory( parentBuild.getTestSourceDirectory() );
    }

    if ( childBuild.getOutputDirectory() == null )
    {
        childBuild.setOutputDirectory( parentBuild.getOutputDirectory() );
    }

    if ( childBuild.getTestOutputDirectory() == null )
    {
        childBuild.setTestOutputDirectory( parentBuild.getTestOutputDirectory() );
    }

    // Extensions are accumulated
    mergeExtensionLists( childBuild, parentBuild );

    if ( childBuild.getDirectory() == null )
    {
        childBuild.setDirectory( parentBuild.getDirectory() );
    }

    if ( childBuild.getDefaultGoal() == null )
    {
        childBuild.setDefaultGoal( parentBuild.getDefaultGoal() );
    }

    if ( childBuild.getFinalName() == null )
    {
        childBuild.setFinalName( parentBuild.getFinalName() );
    }

    ModelUtils.mergeFilterLists( childBuild.getFilters(), parentBuild.getFilters() );

    List<Resource> resources = childBuild.getResources();
    if ( ( resources == null ) || resources.isEmpty() )
    {
        childBuild.setResources( parentBuild.getResources() );
    }

    resources = childBuild.getTestResources();
    if ( ( resources == null ) || resources.isEmpty() )
    {
        childBuild.setTestResources( parentBuild.getTestResources() );
    }

    // Plugins are aggregated if Plugin.inherit != false
    ModelUtils.mergePluginLists( childBuild, parentBuild, handleAsInheritance );

    // Plugin management :: aggregate
    PluginManagement dominantPM = childBuild.getPluginManagement();
    PluginManagement recessivePM = parentBuild.getPluginManagement();

    if ( ( dominantPM == null ) && ( recessivePM != null ) )
    {
        // FIXME: Filter out the inherited == false stuff!
        childBuild.setPluginManagement( recessivePM );
    }
    else
    {
        ModelUtils.mergePluginLists( childBuild.getPluginManagement(), parentBuild.getPluginManagement(), false );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:81,代码来源:DefaultModelInheritanceAssembler.java

示例7: initOutputFileMapping

import org.apache.maven.model.Build; //导入方法依赖的package包/类
List<FileMapping> initOutputFileMapping()
{
  if (propertyOutputFileMapping == null)
  {
    propertyOutputFileMapping = new ArrayList<FileMapping>(10);
    final Build build = project.getBuild();
    final String classesDir = build.getOutputDirectory();
    final File jarFile = new File(classesDir, "META-INF/" + fileName);
    final File targetDir = new File(build.getDirectory());
    final String finalName = build.getFinalName();
    final File deploymentUnitFile =
        new File(targetDir, finalName + "/META-INF/" + fileName);

    propertyOutputFileMapping.add(new FileMapping("pom", new File(targetDir,
        fileName))); // NOPMD
    propertyOutputFileMapping.add(new FileMapping("war", deploymentUnitFile));
    propertyOutputFileMapping.add(new FileMapping("ear", deploymentUnitFile));
    propertyOutputFileMapping.add(new FileMapping("sar", deploymentUnitFile));
    propertyOutputFileMapping.add(new FileMapping("rar", deploymentUnitFile));
    propertyOutputFileMapping.add(new FileMapping("par", deploymentUnitFile));
    propertyOutputFileMapping.add(new FileMapping("jar", jarFile));
    propertyOutputFileMapping.add(new FileMapping("bundle", jarFile));
    propertyOutputFileMapping.add(new FileMapping("ejb", jarFile));
    propertyOutputFileMapping.add(new FileMapping("maven-plugin", jarFile));
    propertyOutputFileMapping.add(new FileMapping("atlassian-plugin", jarFile));
    propertyOutputFileMapping
        .add(new FileMapping("maven-archetype", jarFile));
    propertyOutputFileMapping.add(new FileMapping("eclipse-plugin", new File(
        targetDir, fileName)));
    propertyOutputFileMapping.add(new FileMapping("eclipse-feature",
        new File(targetDir, fileName)));
    propertyOutputFileMapping.add(new FileMapping("eclipse-repository",
        new File(targetDir, fileName)));
    propertyOutputFileMapping.add(new FileMapping("eclipse-update-site",
        new File(targetDir, fileName)));
    propertyOutputFileMapping.add(new FileMapping("targetplatform", new File(
        targetDir, fileName)));
    return propertyOutputFileMapping;
  }

  return propertyOutputFileMapping;
}
 
开发者ID:release-engineering,项目名称:buildmetadata-maven-plugin,代码行数:43,代码来源:PropertyOutputFileMapper.java


注:本文中的org.apache.maven.model.Build.getOutputDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。