I am new to Maven.  I am trying to compile commons-discovery with JDK
1.5, but the dependent jars don't seem to be in my classpath.  Here is
my pom.xml:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-discovery</artifactId> 
  <version>0.2</version>
  <build>
 
<sourceDirectory>C:\maven\commons-discovery-0.2-src\discovery\src\java</
sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <fork>true</fork>
          <executable>C:\Java\1.5\jdk\bin\javac</executable>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.0.3</version>
            <type>jar</type>
            <scope>compiler</scope>
          </dependency>
          <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <type>jar</type>
            <scope>compiler</scope>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
    <resources>
    </resources>
  </build>
</project>

The error I get is:
[INFO] Compilation failure
C:\maven\commons-discovery-0.2-src\discovery\src\java\org\apache\commons
\discovery\tools\ClassUtils.java:[72,34] package
org.apache.commons.logging does not exist

This package is in commons-logging.1.0.3.jar.  I can see that the jar is
succesfully retrieved from
http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.3/ but
it is not in my classpath.  What else do I need to do to get this into
my compile classpath?

Thank you,
Jim

Reply via email to