Package org.apache.ivy.core.module.descriptor

Examples of org.apache.ivy.core.module.descriptor.DefaultArtifact


            resolver.addArtifactPattern(settings.getBaseDir()
                    + "/test/repositories/1/[organisation]/[module]/[branch]/[revision]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("myorg", "mymodule", "mybranch",
                "myrevision");
            Artifact ivyArtifact = new DefaultArtifact(mrid, new Date(), "ivy", "ivy", "xml");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");

            resolver.beginPublishTransaction(mrid, false);
View Full Code Here


                    + "/test/repositories/1/[organisation]/[module]/[revision]/[type]/[artifact].[ext]");
            resolver.addArtifactPattern(settings.getBaseDir()
                    + "/test/repositories/1/[organisation]/[module]/[revision]/[type]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("myorg", "mymodule", "myrevision");
            Artifact ivyArtifact = new DefaultArtifact(mrid, new Date(), "ivy", "ivy", "xml");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");

            resolver.beginPublishTransaction(mrid, false);
View Full Code Here

            resolver.addArtifactPattern(settings.getBaseDir()
                    + "/test/repositories/m2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.apache", "mymodule",
                "myrevision");
            Artifact ivyArtifact = new DefaultArtifact(mrid, new Date(), "ivy", "ivy", "xml");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");

            resolver.beginPublishTransaction(mrid, false);
View Full Code Here

                    + "/test/repositories/1/[organisation]/[module]/[revision]/[artifact].[ext]");
            resolver.addArtifactPattern(settings.getBaseDir()
                    + "/test/repositories/1/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("myorg", "mymodule", "myrevision");
            Artifact ivyArtifact = new DefaultArtifact(mrid, new Date(), "ivy", "ivy", "xml");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");
            resolver.beginPublishTransaction(mrid, false);
            resolver.publish(ivyArtifact, src, false);
            resolver.publish(artifact, src, false);
View Full Code Here

            // this pattern is not supported for transaction publish
            settings.getBaseDir()
                    + "/test/repositories/1/[organisation]/[module]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("myorg", "mymodule", "myrevision");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");
            try {
                resolver.beginPublishTransaction(mrid, false);
View Full Code Here

                    + "/test/repositories/1/[organisation]-[module]/[revision]/[artifact]-[revision].[ext]");
            resolver.addArtifactPattern(settings.getBaseDir()
                    + "/test/repositories/1/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("myorg", "mymodule", "myrevision");
            Artifact ivyArtifact = new DefaultArtifact(mrid, new Date(), "ivy", "ivy", "xml");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");
            try {
                resolver.beginPublishTransaction(mrid, false);
                resolver.publish(ivyArtifact, src, false);
View Full Code Here

            resolver.addArtifactPattern(settings.getBaseDir()
                    + "/test/repositories/1/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("myorg", "mymodule", "myrevision");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");
            try {
                // overwrite transaction not supported
                resolver.beginPublishTransaction(mrid, true);
View Full Code Here

import org.apache.ivy.core.module.id.ArtifactRevisionId;
import org.apache.ivy.core.module.id.ModuleRevisionId;

public class NameSpaceHelperTest extends TestCase {
    public void testTransformArtifactWithExtraAttributes() throws Exception {
        Artifact artifact = new DefaultArtifact(ArtifactRevisionId.newInstance(
            ModuleRevisionId.parse("org.apache#test;1.0"), "test", "jar", "jar",
            Collections.singletonMap("m:qualifier", "sources")), new Date(), null, false);

        MRIDTransformationRule r = new MRIDTransformationRule();
        r.addSrc(new MRIDRule("org.apache", "test", null));
View Full Code Here

                    + "/test/repositories/1/[organisation]/[module]/[revision]/[artifact].[ext]");
            resolver.addArtifactPattern(settings.getBaseDir()
                    + "/test/repositories/1/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]");

            ModuleRevisionId mrid = ModuleRevisionId.newInstance("myorg", "mymodule", "myrevision");
            Artifact ivyArtifact = new DefaultArtifact(mrid, new Date(), "ivy", "ivy", "xml");
            Artifact artifact = new DefaultArtifact(mrid, new Date(), "myartifact", "mytype",
                    "myext");
            File src = new File("test/repositories/ivysettings.xml");
            resolver.beginPublishTransaction(mrid, false);

            // with transactions disabled the file should be available as soon as they are published
View Full Code Here

        assertEquals(mrid, rmr.getId());
        Date pubdate = new GregorianCalendar(2004, 10, 1, 11, 0, 0).getTime();
        assertEquals(pubdate, rmr.getPublicationDate());

        // test to ask to download
        DefaultArtifact artifact = new DefaultArtifact(mrid, pubdate, "mod1.1", "jar", "jar");
        DownloadReport report = resolver.download(new Artifact[] {artifact}, getDownloadOptions());
        assertNotNull(report);

        assertEquals(1, report.getArtifactsReports().length);
View Full Code Here

TOP

Related Classes of org.apache.ivy.core.module.descriptor.DefaultArtifact

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.