• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java CoordinateBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jboss.forge.addon.dependencies.builder.CoordinateBuilder的典型用法代码示例。如果您正苦于以下问题:Java CoordinateBuilder类的具体用法?Java CoordinateBuilder怎么用?Java CoordinateBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CoordinateBuilder类属于org.jboss.forge.addon.dependencies.builder包,在下文中一共展示了CoordinateBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: installMavenPluginDependencies

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Override
public void installMavenPluginDependencies() {
    Coordinate jbakeMavenCompiler = CoordinateBuilder.create(BR_COM_INGENIEUX_JBAKE_MAVEN_PLUGIN);
    Coordinate mavenWarCompiler = CoordinateBuilder.create(ORG_APACHE_MAVEN_PLUGINS_MAVEN_WAR_PLUGIN).setVersion("2.4");

    MavenPluginBuilder jbakeBuilder = MavenPluginBuilder.create()
            .setCoordinate(jbakeMavenCompiler).addExecution(ExecutionBuilder.create().setId("default-generate").setPhase("generate-resources").addGoal("generate"))
            .setConfiguration(ConfigurationBuilder.create().addConfigurationElement(ConfigurationElementBuilder.create().addChild("listenAddress").setText(listenAddress))
                    .addConfigurationElement(ConfigurationElementBuilder.create().addChild("port").setText(port))).addPluginDependency(JBAKE_CORE_DEPENDENCY).addPluginDependency(JBAKE_FREEMARKER_TEMPLATE_ENGINE_DEPENDENCY)
            .addPluginDependency(JBAKE_PEGDOWN_TEMPLATE_ENGINE_DEPENDENCY);
    MavenPluginBuilder mavenWarBuilder = MavenPluginBuilder.create().setCoordinate(mavenWarCompiler).setConfiguration(ConfigurationBuilder.create()
            .addConfigurationElement(ConfigurationElementBuilder.create()
                    .addChild("failOnMissingWebXml").setText("false")));

    MavenPlugin mavenWarPlugin = new MavenPluginAdapter(mavenWarBuilder);
    MavenPlugin jbakePlugin = new MavenPluginAdapter(jbakeBuilder);

    MavenPluginFacet pluginFacet = getFaceted().getFacet(MavenPluginFacet.class);

    pluginFacet.addPlugin(jbakePlugin);
    pluginFacet.addPlugin(mavenWarPlugin);
}
 
开发者ID:jbake-org,项目名称:jbake-forge-addon,代码行数:23,代码来源:JBakeFacetImpl_2_0.java


示例2: getCoordinate

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Override
public Coordinate getCoordinate(String sha1)
{
    return this.findSingle(DocTo.Fields.SHA1, sha1, new DocTo<Coordinate>()
    {
        public Coordinate convert(Document doc)
        {
            return CoordinateBuilder.create()
                .setGroupId(doc.get(GROUP_ID))
                .setArtifactId(doc.get(ARTIFACT_ID))
                .setVersion(doc.get(VERSION))
                .setClassifier(doc.get(CLASSIFIER))
                .setPackaging(doc.get(PACKAGING));
        }
    });
}
 
开发者ID:windup,项目名称:windup,代码行数:17,代码来源:LuceneArchiveIdentificationService.java


示例3: getLatestReleaseOf

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
/**
 * @return Finds the latest non-SNAPSHOT of given artifact.
 */
public Coordinate getLatestReleaseOf(final CoordinateBuilder coord)
{
    List<Coordinate> availableVersions = depsResolver.resolveVersions(DependencyQueryBuilder.create(coord));

    // Find the latest non-SNAPSHOT and non-CR version.
    for(int i = availableVersions.size()-1; i >= 0; i--)
    {
        Coordinate availableCoord = availableVersions.get(i);
        String versionStr = availableCoord.getVersion();

        if(versionStr != null && !availableCoord.isSnapshot() && !versionStr.matches(".*CR[0-9]$"))
            return availableCoord;
    }
    return null;
}
 
开发者ID:windup,项目名称:windup,代码行数:19,代码来源:RulesetsUpdater.java


示例4: createCoordinate

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
protected Coordinate createCoordinate(String groupId, String artifactId, String version, String packaging) {
    CoordinateBuilder builder = CoordinateBuilder.create()
            .setGroupId(groupId)
            .setArtifactId(artifactId);
    if (version != null) {
        builder = builder.setVersion(version);
    }
    if (packaging != null) {
        builder = builder.setPackaging(packaging);
    }

    return builder;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:14,代码来源:AbstractFabricProjectCommand.java


示例5: createCoordinate

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
public static Coordinate createCoordinate(String groupId, String artifactId, String version, String packaging) {
    CoordinateBuilder builder = CoordinateBuilder.create()
            .setGroupId(groupId)
            .setArtifactId(artifactId);
    if (version != null) {
        builder = builder.setVersion(version);
    }
    if (packaging != null) {
        builder = builder.setPackaging(packaging);
    }

    return builder;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:14,代码来源:MavenHelpers.java


示例6: getArchetypeCatalog

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Override
public ArchetypeCatalog getArchetypeCatalog() {
    if (cachedArchetypes == null) {
        String version = VersionHelper.fabric8ArchetypesVersion();

        Coordinate coordinate = CoordinateBuilder.create()
                .setGroupId("io.fabric8.archetypes")
                .setArtifactId("archetypes-catalog")
                .setVersion(version)
                .setPackaging("jar");

        // load the archetype-catalog.xml from inside the JAR
        Dependency dependency = resolver.get().resolveArtifact(DependencyQueryBuilder.create(coordinate));
        if (dependency != null) {
            try {
                String name = dependency.getArtifact().getFullyQualifiedName();
                URL url = new URL("file", null, name);
                URLClassLoader loader = new URLClassLoader(new URL[]{url});
                InputStream is = loader.getResourceAsStream("archetype-catalog.xml");
                if (is != null) {
                    cachedArchetypes = new ArchetypeCatalogXpp3Reader().read(is);
                }
            } catch (Exception e) {
                LOG.log(Level.WARNING, "Error while retrieving archetypes due " + e.getMessage(), e);
            }
        }
    }
    return cachedArchetypes;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:30,代码来源:FabricArchetypeCatalogFactory.java


示例7: createCoordinate

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
protected Coordinate createCoordinate(String groupId, String artifactId, String version) {
    CoordinateBuilder builder = CoordinateBuilder.create()
            .setGroupId(groupId)
            .setArtifactId(artifactId);
    if (version != null) {
        builder = builder.setVersion(version);
    }

    return builder;
}
 
开发者ID:fabric8io,项目名称:fabric8-forge,代码行数:11,代码来源:AbstractCamelProjectCommand.java


示例8: getArchetypeCatalog

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Override
public ArchetypeCatalog getArchetypeCatalog() {
    if (cachedArchetypes == null) {
        String version = new VersionHelper().getVersion();

        Coordinate coordinate = CoordinateBuilder.create()
                .setGroupId("io.fabric8.django")
                .setArtifactId("archetypes-catalog")
                .setVersion(version)
                .setPackaging("jar");

        // load the archetype-catalog.xml from inside the JAR
        Dependency dependency = resolver.get().resolveArtifact(DependencyQueryBuilder.create(coordinate));
        if (dependency != null) {
            try {
                String name = dependency.getArtifact().getFullyQualifiedName();
                URL url = new URL("file", null, name);
                URLClassLoader loader = new URLClassLoader(new URL[]{url});
                InputStream is = loader.getResourceAsStream("archetype-catalog.xml");
                if (is != null) {
                    cachedArchetypes = new ArchetypeCatalogXpp3Reader().read(is);
                }
            } catch (Exception e) {
                LOG.log(Level.WARNING, "Error while retrieving archetypes due " + e.getMessage(), e);
            }
        }
    }
    return cachedArchetypes;
}
 
开发者ID:fabric8io,项目名称:django,代码行数:30,代码来源:DjangoArchetypeCatalogFactory.java


示例9: addPlugin

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
protected void addPlugin(String baseCoordinate, String id, String phase, String goal) {
    Coordinate plugInCoordinate = CoordinateBuilder.create(baseCoordinate);
    MavenPluginFacet facet = getFaceted().getFacet(MavenPluginFacet.class);
    MavenPluginBuilder plugin = MavenPluginBuilder.create()
            .setCoordinate(plugInCoordinate);
    ExecutionBuilder execution = ExecutionBuilder.create()
            .addGoal(goal)
            .setId(id)
            .setPhase(phase);
    plugin.addExecution(execution);
    facet.addPlugin(plugin);
}
 
开发者ID:jughyd,项目名称:griffon-forge-addon,代码行数:13,代码来源:AbstractGriffonFacet.java


示例10: getRequiredDependencyOptions

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Override
public Set<Coordinate> getRequiredDependencyOptions() {
    Set<Coordinate> coordinates = new HashSet<Coordinate>();
    if (buildSystemType == BuildSystemType.maven) {
        coordinates.add(CoordinateBuilder.create(BR_COM_INGENIEUX_JBAKE_MAVEN_PLUGIN));
        coordinates.add(CoordinateBuilder.create(ORG_APACHE_MAVEN_PLUGINS_MAVEN_WAR_PLUGIN).setVersion("2.4"));
    }

    return coordinates;
}
 
开发者ID:jbake-org,项目名称:jbake-forge-addon,代码行数:11,代码来源:JBakeFacetImpl_2_0.java


示例11: getCoordinate

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Override
public Coordinate getCoordinate(String checksum)
{
    if (checksum == null)
        return null;

    String coordinate = map.get(checksum);

    if (coordinate == null)
        return null;

    return CoordinateBuilder.create(coordinate);
}
 
开发者ID:windup,项目名称:windup,代码行数:14,代码来源:InMemoryArchiveIdentificationService.java


示例12: isSkipped

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
public static boolean isSkipped(ArchiveCoordinateModel coordinate)
{
    return isSkipped(CoordinateBuilder.create()
                .setArtifactId(coordinate.getArtifactId())
                .setGroupId(coordinate.getGroupId())
                .setClassifier(coordinate.getClassifier())
                .setVersion(coordinate.getVersion()));
}
 
开发者ID:windup,项目名称:windup,代码行数:9,代码来源:SkippedArchives.java


示例13: testJarsAreIdentified

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
/**
 * Run initial Windup rules against the JEE sample app, add a single identification record, and check if the lib is identified.
 */
@Test
public void testJarsAreIdentified() throws Exception
{
    try (GraphContext graphContext = contextFactory.create())
    {
        FileUtils.deleteDirectory(OUTPUT_PATH.toFile());

        InMemoryArchiveIdentificationService inMemoryIdentifier = new InMemoryArchiveIdentificationService();
        inMemoryIdentifier.addMapping("4bf32b10f459a4ecd4df234ae2ccb32b9d9ba9b7", LOG4J_COORDINATE);
        identifier.addIdentifier(inMemoryIdentifier);

        WindupConfiguration wc = new WindupConfiguration();
        wc.setGraphContext(graphContext);
        wc.addInputPath(INPUT_PATH);
        wc.setOutputDirectory(OUTPUT_PATH);
        wc.setOptionValue(OverwriteOption.NAME, true);
        wc.setRuleProviderFilter(new NotPredicate(
                    new RuleProviderPhasePredicate(ArchiveExtractionPhase.class, DecompilationPhase.class, MigrationRulesPhase.class,
                                ReportGenerationPhase.class, ReportRenderingPhase.class)
                    ));

        processor.execute(wc);

        GraphService<IdentifiedArchiveModel> archiveService = new GraphService<>(graphContext, IdentifiedArchiveModel.class);
        Iterable<IdentifiedArchiveModel> archives = archiveService.findAllByProperty(IdentifiedArchiveModel.FILE_NAME, "log4j-1.2.6.jar");
        for (IdentifiedArchiveModel archive : archives)
        {
            ArchiveCoordinateModel archiveCoordinate = archive.getCoordinate();
            Assert.assertNotNull(archiveCoordinate);

            final Coordinate expected = CoordinateBuilder.create(LOG4J_COORDINATE);
            Assert.assertEquals(expected, CoordinateBuilder.create()
                        .setGroupId(archiveCoordinate.getGroupId())
                        .setArtifactId(archiveCoordinate.getArtifactId())
                        .setClassifier(archiveCoordinate.getClassifier())
                        .setVersion(archiveCoordinate.getVersion()));
        }
    }
}
 
开发者ID:windup,项目名称:windup,代码行数:43,代码来源:IdentifyArchivesRulesetTest.java


示例14: testArtifactIdSuffixWithWildcards

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Test
public void testArtifactIdSuffixWithWildcards() throws IOException
{
    // org.jboss.windup.*:*:*
    Assert.assertTrue(SkippedArchives.isSkipped(CoordinateBuilder.create("org.jboss.windup:windup-foo:1.2.3")));
    // org.apache.commons.*:*:*
    Assert.assertTrue(SkippedArchives.isSkipped(CoordinateBuilder.create("org.apache.commons.foo:commons-foo:1.2.3")));
}
 
开发者ID:windup,项目名称:windup,代码行数:9,代码来源:ArchiveCoordinateIdentificationTest.java


示例15: testGroupIdSuffixWithVersionAndClassifierWildcard

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Test
public void testGroupIdSuffixWithVersionAndClassifierWildcard() throws IOException
{
    // org.jboss.bar:bar-*:*:*
    Assert.assertTrue(SkippedArchives.isSkipped(CoordinateBuilder.create("org.jboss.bar:bar-foo:1.2.3")));
    Assert.assertFalse(SkippedArchives.isSkipped(CoordinateBuilder.create("org.jboss.bar:just-foo:1.2.3")));

}
 
开发者ID:windup,项目名称:windup,代码行数:9,代码来源:ArchiveCoordinateIdentificationTest.java


示例16: testVersionRangeAndArtifactIdSuffixPattern

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Test
public void testVersionRangeAndArtifactIdSuffixPattern() throws IOException
{
    // org.hibernate.*:hibernate-core:[3.0,5.0)
    Assert.assertTrue(SkippedArchives.isSkipped(CoordinateBuilder.create("org.hibernate.foo:hibernate-core:3.2.1")));
    Assert.assertFalse(SkippedArchives.isSkipped(CoordinateBuilder.create("org.hibernate.foo:hibernate-core:1.2.3")));
    Assert.assertTrue(SkippedArchives.isSkipped(CoordinateBuilder.create("org.hibernate.foo:hibernate-core:4.2.1")));
    Assert.assertFalse(SkippedArchives.isSkipped(CoordinateBuilder.create("org.hibernate.foo:hibernate-core:5.0")));
    Assert.assertFalse(SkippedArchives.isSkipped(CoordinateBuilder.create("org.hibernate.foo:hibernate-core:5.2.5-SNAPSHOT")));
}
 
开发者ID:windup,项目名称:windup,代码行数:11,代码来源:ArchiveCoordinateIdentificationTest.java


示例17: testAllButClassifier

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
@Test
public void testAllButClassifier() throws IOException
{
    // org.freemarker:freemarker-core:3.1
    Assert.assertTrue(SkippedArchives.isSkipped(CoordinateBuilder.create("org.freemarker.foo:freemarker-core:3.1")));
    Assert.assertFalse(SkippedArchives.isSkipped(CoordinateBuilder.create("org.freemarker.foo:freemarker-core:3.1.1")));
    Assert.assertFalse(SkippedArchives.isSkipped(CoordinateBuilder.create("org.freemarker:freemarker-core:4.2.1")));
}
 
开发者ID:windup,项目名称:windup,代码行数:9,代码来源:ArchiveCoordinateIdentificationTest.java


示例18: queryLatestWindupRelease

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
/**
 * Connects to a repository and returns the version of the latest windup-distribution.
 */
public Coordinate queryLatestWindupRelease()
{
    final CoordinateBuilder coords = CoordinateBuilder.create()
            .setGroupId("org.jboss.windup")
            .setArtifactId("windup-distribution")
            .setClassifier("offline")
            .setPackaging("zip");
    Coordinate coord = this.getLatestReleaseOf(coords);
    return coord;
}
 
开发者ID:windup,项目名称:windup,代码行数:14,代码来源:RulesetsUpdater.java


示例19: coordinate

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
public static Coordinate coordinate(String group, String artifact) {
  return CoordinateBuilder.create().setGroupId(group).setArtifactId(artifact);
}
 
开发者ID:cescoffier,项目名称:vertx-forge-addon,代码行数:4,代码来源:ForgeUtils.java


示例20: CoordinatePattern

import org.jboss.forge.addon.dependencies.builder.CoordinateBuilder; //导入依赖的package包/类
public CoordinatePattern(CoordinateBuilder coordinate, VersionRange version)
{
    this.coordinate = coordinate;
    this.version = version;
}
 
开发者ID:windup,项目名称:windup,代码行数:6,代码来源:SkippedArchives.java



注:本文中的org.jboss.forge.addon.dependencies.builder.CoordinateBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CommandLinePropertySource类代码示例发布时间:2022-05-22
下一篇:
Java ValidationResult类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap