Question

I want to install oracle plugin--ojdbc6.jar. when i run these command:

cd D:\sakai3\nakamura\contrib\oracle-jdbc-6
mvn install:install-file -DgroupId=com.oracle-jdbc-6 -DartifactId=ojdbc6 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=org.sakaiproject.nakamura.ojdbc.jar
mvn -P 10.2.0.1.0 clean install
cd D:\sakai3\nakamura
mvn clean install
cd D:\sakai3\nakamura\contrib\csu
mvn clean package

when i run the last one command i got this error:

[ERROR] Failed to execute goal on project edu.nyu.launchpad: Could not resolve d
ependencies for project edu.nyu:edu.nyu.launchpad:jar:1.4.2: The following artif
acts could not be resolved: org.apache.sling:maven-launchpad-plugin:jar:app:2.1.
0, org.sakaiproject.nakamura:org.sakaiproject.nakamura.ojdbc:jar:app:1.4.0, edu.
nyu:edu.nyu.launchpad:jar:app:1.4.2: Could not find artifact org.apache.sling:ma
ven-launchpad-plugin:jar:app:2.1.0 in maven repo (http://repo1.maven.org/maven2/
) -> [Help 1]

this is my pom:

<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.sakaiproject.nakamura</groupId>
        <artifactId>base</artifactId>
        <version>1.4.2</version>
    </parent>

    <groupId>edu.nyu</groupId>
    <artifactId>edu.nyu.launchpad</artifactId>
    <name>NYU Launchpad</name>

    <properties>
        <nakamura.version>1.4.0</nakamura.version>
        <ux.version>1.4.0</ux.version>
    </properties>

    <packaging>jar</packaging>

    <build>
        <resources>
            <resource>
                <directory>../../app/src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.sling</groupId>
                <artifactId>maven-launchpad-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-package</id>
                        <goals>
                            <goal>prepare-package</goal>
                        </goals>
                        <configuration>
                            <defaultBundleList>
                                <groupId>org.sakaiproject.nakamura</groupId>
                                <artifactId>org.sakaiproject.nakamura.app</artifactId>
                                <version>${nakamura.version}</version>
                            </defaultBundleList>
                            <jarWebSupport>
                                <groupId>org.sakaiproject.nakamura</groupId>
                                <artifactId>org.sakaiproject.nakamura.jetty-config</artifactId>
                                <version>${nakamura.version}</version>
                                <startLevel>5</startLevel>
                            </jarWebSupport>
                            <additionalBundles>
                                <bundle>
                                    <groupId>org.sakaiproject.nakamura</groupId>
                                    <artifactId>org.sakaiproject.nakamura.ojdbc6</artifactId>
                                    <version>${nakamura.version}</version>
                                    <startLevel>1</startLevel>
                                </bundle>
                                <bundle>
                                    <groupId>org.sakaiproject.nakamura</groupId>
                                    <artifactId>org.sakaiproject.nakamura.uxloader</artifactId>
                                    <version>${ux.version}</version>
                                    <startLevel>30</startLevel> </bundle>
                            </additionalBundles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.launchpad.base</artifactId>
            <version>2.3.0</version>
            <classifier>webapp</classifier>
            <type>war</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>maven-launchpad-plugin</artifactId>
            <version>2.1.0</version>
            <classifier>app</classifier>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>

i am very sorry about my English. I am a Chinese.Please forgive my broken English and my unclear Expression.Sorry!And Thank you!

Was it helpful?

Solution

First of all you can remove the dependency on the maven-launchpad-plugin. I cannot see any rational reason for it to be bundled at all. Or am I missing something? The error you get is quite clear about this:

Could not find artifact org.apache.sling:maven-launchpad-plugin:jar:app:2.1.0

The plugin is used during your build and not needed as a dependency. Remove the following:

<dependency>
    <groupId>org.apache.sling</groupId>
    <artifactId>maven-launchpad-plugin</artifactId>
    <version>2.1.0</version>
    <classifier>app</classifier>
    <scope>provided</scope>
</dependency>

As a side-mark you should not pick up resources outside of the project like you do with this:

<resources>
    <resource>
        <directory>../../app/src/main/resources</directory>
    </resource>
</resources>

The resources should be contained withing the project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top