mvn goals fail, unless project compiled from Eclipse [message #10983] |
Tue, 15 July 2008 00:05 |
Eclipse User |
|
|
|
Originally posted by: rsabiq.vml.com
I'm trying to figure out why compile-and-beyond mvn goals fail, unless
project is compiled from Eclipse. All the dependencies in the eclipse
project are managed by Q for Eclipse. Q for Eclipse is probably not the
culprit here, i just don't understand why Eclipse-based compilation
succeeds, while mvn-based compilation fails, even when running goals from
Q for Eclipse.
The first error is:
package org.apache.log4j does not exist
and there is a bunch more for other dependencies.
P.S. mvn goals also fail to download dependencies like log4j and junit jar
(only poms get downloaded). The jars only appear to get downloaded into
repo when Eclipse-based build is performed (again project dependencies are
configured by Q for Eclipse).
P.P.S. Also noticed that when Eclipse-based project build is executed,
target.classes folder is present in target/classes.
P.P.P.S. My file-system mvn version is 2.0.9, whereas Q appears to be
using 2.1, but not sure if this matters because goals fail to compile from
Q as well.
Thanks.
|
|
|
Re: mvn goals fail, unless project compiled from Eclipse [message #10997 is a reply to message #10983] |
Tue, 15 July 2008 00:12 |
Eclipse User |
|
|
|
Originally posted by: rsabiq.vml.com
Even after the dependency jars are downloaded after Eclipse builds the
project, if i run
mvn clean
mvn package
compilation fails sayign log4j, etc. doesn't exist: even though i see them
in the repo.
P.S. This is happening for both 2.0.8, and 2.0.9.
P.P.S. What kind Alice's wonderland is going on here?
Thanks.
|
|
|
|
Re: mvn goals fail, unless project compiled from Eclipse [message #11020 is a reply to message #11009] |
Wed, 16 July 2008 23:23 |
Eclipse User |
|
|
|
Originally posted by: rsabiq.vml.com
I thought that maybe iam is using maven 2.1, and went ahead and installed
it from source (there were exceptions, like remote file not found, during
build, but all unit tests passed, and it installed successfully). However,
compilation fails even w/ 2.1-SNAPSHOT.
-X output screaming at me (no dependencieeeeeees!):
2.0.9:
[DEBUG] Classpath: [<project-path/>\target\classes]
2.1-SNAPSHOT:
[DEBUG] Classpath: [<project-path/>\target/classes]
The same for a successfully building project:
[DEBUG] Classpath: [<project2-path/>\target\target\classes
%USERPROFILE%\.m2\repository\commons-logging\commons-logging \1.1.1\commons-logging-1.1.1.jar
<many-more-repo-jars/>]
Anyway, i have no more ideas at the moment. If anybody is interested,
here's the list of dependencies in the mysteriously
non-maven-command-line-compilable w/o building from iam project:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.2.1.ga</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>javax.transaction</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jta</artifactId>
<version>1.0.1B-rc4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>0.7.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.5.5</version>
<scope>runtime</scope>
</dependency>
</dependencies>
P.S. Could be a bug having to do w/ transitive dependency resolution.
Maybe i'll try listing every dependency that iam shows in Eclipse's
project classpath explicitly and see if it builds then.
Thanks.
|
|
|
|
Re: mvn goals fail, unless project compiled from Eclipse [message #11044 is a reply to message #11032] |
Thu, 17 July 2008 16:20 |
Eclipse User |
|
|
|
Originally posted by: rsabiq.vml.com
Abel Muiño wrote:
> Could you attach the full POM for testing?
Here's the part before dependencies (obfuscated):
<modelVersion>4.0.0</modelVersion>
<groupId>the.group</groupId>
<artifactId>the.artifact</artifactId>
<name>the.name</name>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<configuration>
<repositoryLayout>flat</repositoryLayout>
<repositoryName>lib</repositoryName>
<programs>
<program>
<mainClass>my.main.Klass</mainClass>
<name>theName</name>
</program>
</programs>
</configuration>
</plugin>
</plugins>
</build>
|
|
|
|
|
|
|
|
Re: mvn goals fail, unless project compiled from Eclipse [message #566477 is a reply to message #10983] |
Tue, 15 July 2008 00:12 |
Eclipse User |
|
|
|
Originally posted by: rsabiq.vml.com
Even after the dependency jars are downloaded after Eclipse builds the
project, if i run
mvn clean
mvn package
compilation fails sayign log4j, etc. doesn't exist: even though i see them
in the repo.
P.S. This is happening for both 2.0.8, and 2.0.9.
P.P.S. What kind Alice's wonderland is going on here?
Thanks.
|
|
|
|
Re: mvn goals fail, unless project compiled from Eclipse [message #566536 is a reply to message #11009] |
Wed, 16 July 2008 23:23 |
Eclipse User |
|
|
|
Originally posted by: rsabiq.vml.com
I thought that maybe iam is using maven 2.1, and went ahead and installed
it from source (there were exceptions, like remote file not found, during
build, but all unit tests passed, and it installed successfully). However,
compilation fails even w/ 2.1-SNAPSHOT.
-X output screaming at me (no dependencieeeeeees!):
2.0.9:
[DEBUG] Classpath: [<project-path/>\target\classes]
2.1-SNAPSHOT:
[DEBUG] Classpath: [<project-path/>\target/classes]
The same for a successfully building project:
[DEBUG] Classpath: [<project2-path/>\target\target\classes
%USERPROFILE%\.m2\repository\commons-logging\commons-logging \1.1.1\commons-logging-1.1.1.jar
<many-more-repo-jars/>]
Anyway, i have no more ideas at the moment. If anybody is interested,
here's the list of dependencies in the mysteriously
non-maven-command-line-compilable w/o building from iam project:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.2.1.ga</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>javax.transaction</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-jta</artifactId>
<version>1.0.1B-rc4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.7</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>0.7.3</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.5.5</version>
<scope>runtime</scope>
</dependency>
</dependencies>
P.S. Could be a bug having to do w/ transitive dependency resolution.
Maybe i'll try listing every dependency that iam shows in Eclipse's
project classpath explicitly and see if it builds then.
Thanks.
|
|
|
|
Re: mvn goals fail, unless project compiled from Eclipse [message #566594 is a reply to message #11032] |
Thu, 17 July 2008 16:20 |
Eclipse User |
|
|
|
Originally posted by: rsabiq.vml.com
Abel Muiño wrote:
> Could you attach the full POM for testing?
Here's the part before dependencies (obfuscated):
<modelVersion>4.0.0</modelVersion>
<groupId>the.group</groupId>
<artifactId>the.artifact</artifactId>
<name>the.name</name>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<configuration>
<repositoryLayout>flat</repositoryLayout>
<repositoryName>lib</repositoryName>
<programs>
<program>
<mainClass>my.main.Klass</mainClass>
<name>theName</name>
</program>
</programs>
</configuration>
</plugin>
</plugins>
</build>
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07671 seconds