Hi,

yesterday I have tried to start with Maven2 - but I run into some problems I could not fix... I am an experienced java developer but I don't know much about maven - so I think it is a stupid error.

I have created several projects with the line recommended in the getting started guide. But when I have added some external dependencies (javax.mail) I cannot compile from command line. But I have created an idea projects successfully (containing all neede dependencies and compiling). Can anybody help me?

Thanks,

Johannes Schneider


-------------
mvn clean compile
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building XoreUtils - Mail
[INFO]    task-segment: [clean, compile]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/johannes/projects/XoreUtils/mail/target
[INFO] Deleting directory /home/johannes/projects/XoreUtils/mail/target/classes [INFO] Deleting directory /home/johannes/projects/XoreUtils/mail/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 1 source file to /home/johannes/projects/XoreUtils/mail/target/classes [INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

/home/johannes/projects/XoreUtils/mail/src/main/java/de/xore/util/XoreMailManager.java:[3,24] package org.apache.log4j does not exist
[...]
------------------

my pom.xml:

---------------------------------
<project xmlns="http://maven.apache.org/POM/4.0.0";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>de.xore.utils</groupId>
  <artifactId>mail</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>XoreUtils - Mail</name>
  <url>http://mail.utils.xore.de</url>

  <dependencies>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.9</version>
      <scope>runtime</scope>
    </dependency>


    <!-- test -->

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
---------------------------------------------------------------------





Environment:
-------------------------------------------
java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

mvn -v
Maven version: 2.0.4


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to