org.apache.maven.model.Model.getProjectDirectory()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中org.apache.maven.model.Model.getProjectDirectory()方法的一些代码示例,展示了Model.getProjectDirectory()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getProjectDirectory()方法的具体详情如下:
包路径:org.apache.maven.model.Model
类名称:Model
方法名:getProjectDirectory

Model.getProjectDirectory介绍

[英]Gets the base directory for the corresponding project (if any).
[中]获取相应项目(如果有)的基目录。

代码示例

代码示例来源:origin: apache/maven

private String findProfilesXml( ModelBuildingResult result, Map<File, Boolean> profilesXmls )
{
  for ( String modelId : result.getModelIds() )
  {
    Model model = result.getRawModel( modelId );
    File basedir = model.getProjectDirectory();
    if ( basedir == null )
    {
      break;
    }
    Boolean profilesXml = profilesXmls.get( basedir );
    if ( profilesXml == null )
    {
      profilesXml = new File( basedir, "profiles.xml" ).exists();
      profilesXmls.put( basedir, profilesXml );
    }
    if ( profilesXml )
    {
      return modelId;
    }
  }
  return null;
}

代码示例来源:origin: apache/maven

if ( child.getProjectDirectory() != null )
  childName = child.getProjectDirectory().getName();

代码示例来源:origin: apache/maven

if ( childModel.getProjectDirectory() != null )

代码示例来源:origin: apache/maven

modelPathTranslator.alignToBaseDirectory( resultModel, resultModel.getProjectDirectory(), request );

代码示例来源:origin: apache/maven

modelInterpolator.interpolateModel( model, model.getProjectDirectory(), request, problems );
if ( interpolatedModel.getParent() != null )

代码示例来源:origin: org.jboss.shrinkwrap.resolver/shrinkwrap-resolver-impl-maven

@Override
public File getBaseDirectory() {
  return model.getProjectDirectory();
}

代码示例来源:origin: shrinkwrap/resolver

@Override
public File getBaseDirectory() {
  return model.getProjectDirectory();
}

代码示例来源:origin: com.buschmais.jqassistant.plugin/jqassistant.plugin.m2repo

@Override
public File getProjectDirectory() {
  return delegate.getProjectDirectory();
}

代码示例来源:origin: shrinkwrap/resolver

public List<BuiltProject> getModules() {
  List<String> modules = getModel().getModules();
  File projectDirectory = getModel().getProjectDirectory();
  List<BuiltProject> projects = new ArrayList<>(modules.size());
  for (String module : modules) {
    projects.add(getSubmodule(projectDirectory + File.separator + module + File.separator + "pom.xml"));
  }
  return projects;
}

代码示例来源:origin: org.apache.maven/maven-model-builder

if ( child.getProjectDirectory() != null )
  childName = child.getProjectDirectory().getName();

代码示例来源:origin: shrinkwrap/resolver

public BuiltProject getModule(String moduleName) {
  List<String> modules = getModel().getModules();
  File projectDirectory = getModel().getProjectDirectory();
  for (String module : modules) {
    if (moduleName.equals(module)) {
      return getSubmodule(projectDirectory + File.separator + module + File.separator + "pom.xml");
    }
  }
  return null;
}

代码示例来源:origin: mojohaus/flatten-maven-plugin

private Model createResolvedPom( ModelBuildingRequest buildingRequest )
{
  LoggingModelProblemCollector problems = new LoggingModelProblemCollector( getLog() );
  Model originalModel = this.project.getOriginalModel().clone();
  if (this.flattenMode == FlattenMode.resolveCiFriendliesOnly) {
    return this.modelCiFriendlyInterpolator.interpolateModel( originalModel, this.project.getModel().getProjectDirectory(),
                            buildingRequest, problems );
  }
  return this.modelInterpolator.interpolateModel( originalModel, this.project.getModel().getProjectDirectory(),
                          buildingRequest, problems );
}

代码示例来源:origin: arquillian/arquillian-container-chameleon

final File projectDirectory = build.getModel().getProjectDirectory();
final Path normalize = projectDirectory.toPath().normalize();

代码示例来源:origin: org.apache.maven/maven-model-builder

if ( childModel.getProjectDirectory() != null )

代码示例来源:origin: org.apache.maven/maven-model-builder

modelPathTranslator.alignToBaseDirectory( resultModel, resultModel.getProjectDirectory(), request );

代码示例来源:origin: org.apache.maven/maven-model-builder

modelInterpolator.interpolateModel( model, model.getProjectDirectory(), request, problems );
if ( interpolatedModel.getParent() != null )

相关文章

Model类方法