0

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!

maba
  • 47,113
  • 10
  • 108
  • 118
liu jing
  • 3
  • 5
  • Your first command `mvn install:install-file` is installing the `ojdbc6.jar` in your local repo. The error you show must be from your last command and does not seem to relate to the first. Can you tell us exactly your problem instead of listing several commands and just **one** error message. – maba Oct 30 '12 at 07:45
  • when i run the last command i got this error. – liu jing Oct 30 '12 at 08:42
  • So show us your `pom.xml` for that last project (`D:\sakai3\nakamura\contrib\csu`). That is where your problem is. It looks like version mismatch to me. – maba Oct 30 '12 at 08:45
  • I'm **NOT** going to try to read that! **You** will have to reformat that to something readable, it is not anyone else's job. After that I will take a look at it... – maba Oct 30 '12 at 08:54
  • I am very sorry about that.what about this time? – liu jing Oct 30 '12 at 09:24

1 Answers1

1

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.

maba
  • 47,113
  • 10
  • 108
  • 118
  • I have deleted it.I got an new error. Failed to execute goal org.apache.sling:maven-launchpad-plugin:2.1.0:pre pare-package (prepare-package) on project edu.nyu.launchpad: Unable to find artifact. Could not find artifact org.sakaiproject.nakamura:org.sakaiproject.nakamur a.ojdbc6:jar:1.4.0 in maven repo (http://repo1.maven.org/maven2/) Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.sakaiproject.nakamura -DartifactId=org.sakaiproject.nakamura.ojdbc6 -Dversion=1.4.0 -Dpackaging=jar -Dfile=/path/to/file – liu jing Oct 30 '12 at 10:17
  • Well that is because you gave your own `ojdbc6` jar the version `10.2.0.1.0`. Look at your first line of command, the `mvn install:install-file`. It has `-Dversion=10.2.0.1.0`so how is it supposed to find a `1.4.0` version of it? – maba Oct 30 '12 at 10:20
  • Thank you!A new error is: Failed to execute goal org.apache.sling:maven-launchpad-plugin:2.1.0:prepare-package (prepare-package) on project edu.nyu.launchpad: Unable to find artifact. Could not find artifact org.sakaiproject.nakamura:org.sakaiproject.nakamura.ojdbc6:jar:1.4.0 in maven repo (http://repo1.maven.org/maven2/) Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.sakaiproject.nakamura -DartifactId=org.sakaiproject.nakamura.ojdbc6 -Dversion=1.4.0 -Dpackaging=jar -Dfile=/path/to/file – liu jing Oct 31 '12 at 01:34
  • i have runed the command:mvn install:install-file -DgroupId=com.oracle-jdbc-6 -DartifactId=ojdbc6 -Dversion=1.4.2 -Dpackaging=jar -Dfile=org.sakaiproject.nakamura.ojdbc.jar – liu jing Oct 31 '12 at 01:35
  • I try to install ojdbc14.jar.It build success!But my project counldn'trunning. – liu jing Oct 31 '12 at 08:18