Examples of BundleList


Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

        log.info("Getting bundle list {}", paxUrl);
        File tmp = null;
        final Collection<String> testRunModes = getTestRunModes();
        try {
            tmp = dumpMvnUrlToTmpFile(paxUrl);
            final BundleList list = BundleListUtils.readBundleList(tmp);
            int counter = 0;
            for(StartLevel s : list.getStartLevels()) {
               
                // Start level < 0 means bootstrap in our bundle lists
                final int startLevel = s.getStartLevel() < 0 ? 1 : s.getStartLevel();
               
                for(Bundle b : s.getBundles()) {
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

        Element feature = new Element("feature");
        features.addContent(feature);
        feature.setAttribute("name", featureName);
        feature.setAttribute("version", featureVersion);

        BundleList bundleList = getInitializedBundleList();
        for (StartLevel level : bundleList.getStartLevels()) {
            for (Bundle bundle : level.getBundles()) {
                String bundleRef = String.format("mvn:%s/%s/%s", bundle.getGroupId(), bundle.getArtifactId(), bundle
                        .getVersion());
                feature.addContent(new Element("bundle").setText(bundleRef));
            }
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

    private boolean failOnSnapshot;

    @Override
    protected void executeWithArtifacts() throws MojoExecutionException, MojoFailureException {
        List<Bundle> snapshots = new ArrayList<Bundle>();
        BundleList bundleList = getInitializedBundleList();
        for (StartLevel level : bundleList.getStartLevels()) {
            for (Bundle bundle : level.getBundles()) {
                if (isSnapshot(bundle)) {
                    snapshots.add(bundle);
                }
            }
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

    private static final String CLASSIFIER = "bundles";

    public static final String[] DEFAULT_INCLUDES = { "**/**" };

    private void addBundles() throws MojoExecutionException {
        BundleList bundles = getInitializedBundleList();

        for (StartLevel level : bundles.getStartLevels()) {
            for (Bundle bundle : level.getBundles()) {
                Artifact artifact = getArtifact(new ArtifactDefinition(bundle,
                        level.getStartLevel()));
                final String destFileName = getPathForArtifact(level.getStartLevel(), bundle.getRunModes(), artifact.getFile().getName());
                try {
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

    protected void executeWithArtifacts() throws MojoExecutionException, MojoFailureException {
        FileWriter out = null;
        try {
            out = new FileWriter(outputFile);

            BundleList bundleList = getInitializedBundleList();
            for (StartLevel level : bundleList.getStartLevels()) {
                for (Bundle bundle : level.getBundles()) {
                    String line = String.format("mvn:%s/%s/%s@%d\n", bundle.getGroupId(), bundle.getArtifactId(),
                            bundle.getVersion(), level.getStartLevel());
                    out.write(line);
                }
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

    private VersionsHelper helper;

    @SuppressWarnings("unchecked")
    public void execute() throws MojoExecutionException, MojoFailureException {
        try {
            BundleList bundleList = readBundleList(bundleListFile);

            Set<Dependency> bundlesAsDependencies = new HashSet<Dependency>();

            for (StartLevel startLevel : bundleList.getStartLevels()) {
                for (Bundle bundle : startLevel.getBundles()) {
                    bundlesAsDependencies.add(asDependency(bundle));
                }
            }
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

                }
            }
        }

        private void addBundleListDependencies() throws IOException, XmlPullParserException, MojoExecutionException {
            BundleList bundleList;

            if (bundleListFile.exists()) {
                bundleList = readBundleList(bundleListFile);
            } else {
                bundleList = new BundleList();
            }

            if (additionalBundles != null) {
                for (ArtifactDefinition def : additionalBundles) {
                    bundleList.add(def.toBundleList());
                }
            }

            interpolateProperties(bundleList, project, session);

            for (StartLevel startLevel : bundleList.getStartLevels()) {
                for (Bundle bundle : startLevel.getBundles()) {
                    log.debug(String.format("adding bundle (%s) from bundle list to dependencies of project %s", bundle, project));
                    project.getDependencies().addAll(ArtifactDefinition.toDependencyList(bundle, PROVIDED));
                }
            }
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

    private final void initBundleList() throws IOException, XmlPullParserException, MojoExecutionException {
        initArtifactDefinitions();
        if (BundleListUtils.isCurrentArtifact(project, defaultBundleList)) {
            initializedBundleList = readBundleList(bundleListFile);
        } else {
            initializedBundleList = new BundleList();
            if (includeDefaultBundles) {
                Artifact defBndListArtifact = getArtifact(defaultBundleList.getGroupId(),
                        defaultBundleList.getArtifactId(), defaultBundleList.getVersion(), defaultBundleList.getType(),
                        defaultBundleList.getClassifier());
                getLog().info("Using bundle list file from " + defBndListArtifact.getFile().getAbsolutePath());
View Full Code Here

Examples of org.apache.sling.maven.projectsupport.bundlelist.v1_0_0.BundleList

     * @component role="org.codehaus.plexus.archiver.Archiver" roleHint="zip"
     */
    private ZipArchiver zipArchiver;

    public void execute() throws MojoExecutionException, MojoFailureException {
        final BundleList initializedBundleList;
        if (bundleListFile.exists()) {
            try {
                initializedBundleList = readBundleList(bundleListFile);
            } catch (IOException e) {
                throw new MojoExecutionException("Unable to read bundle list file", e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.