Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Eclipse not picking up maven Managed Dependencies(Eclipse not picking up maven Managed Dependencies)
Eclipse not picking up maven Managed Dependencies [message #941237] Fri, 12 October 2012 10:20 Go to next message
David Weber is currently offline David WeberFriend
Messages: 1
Registered: October 2012
Location: Zurich
Junior Member
I'm trying to create an application with Scout that is built with maven.
Therefore, I first followed the tutorial to create the minicrm ( and then I followed the Maven Tycho Build tutorial (
At the moment I have the minicrm application that works fine when I start it in eclipse and the maven build is working as well.

I am using:
- Eclipse Juno Service Release 1 (Eclipse for Scout Developers, RCP Version 4.2.1.M20120914-1800, Scout Version
- Maven Integration for Eclipse (Version 1.2.020120903-1050)
- Tycho Project Configurators (Version
- Apache Maven 3.0.4
- Java 1.7.0_04
- Windows 7, Version 6.1, Arch: Amd64

Now I want to add additional maven dependencies to my minicrm.server pom.xml.
E.g. log4j dependency for logging:

Unfortunately, the dependencies that I add are not recognized by eclipse.
I would expect them to appear in a "Maven dependency" project tree node similar to "Plug-in Dependencies" but the project does not contain such a node.
When I try to add for example the log4j Logger in the StandardOutlineService the class is not recognized.

import org.apache.log4j.Logger;
private Logger logger = Logger.getLogger(this.getClass().getName());

I already tried a "Maven - Update Project..." from the context menu. Could there be a problem between the m2eclipse Plugin and the plugin created with Scout or did I forget something? I would at least expect that the maven build still works but when I add the Logger and its import statement and run a "mvn clean install" the build fails as well.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.15.0:co
mpile (default-compile) on project org.eclipse.minicrm.server: Compilation failu
re: Compilation failure:
[ERROR] C:\local\eclipse\workspace_scout2\org.eclipse.minicrm.server\src\org\ecl
[ERROR] import org.apache.log4j.Logger;
[ERROR] ^^^^^^^^^^^^^^^^
[ERROR] The import org.apache.log4j cannot be resolved
[ERROR] C:\local\eclipse\workspace_scout2\org.eclipse.minicrm.server\src\org\ecl
[ERROR] private Logger logger = Logger.getLogger(this.getClass().getName());
[ERROR] ^^^^^^
[ERROR] Logger cannot be resolved to a type
[ERROR] C:\local\eclipse\workspace_scout2\org.eclipse.minicrm.server\src\org\ecl
[ERROR] private Logger logger = Logger.getLogger(this.getClass().getName());
[ERROR] ^^^^^^
[ERROR] Logger cannot be resolved

I just found one similar post in the Newcomers forum ( but there was no answer.

The pom.xml:
<?xml version="1.0" encoding="UTF-8"?>





The .project file:
<?xml version="1.0" encoding="UTF-8"?>

[Updated on: Fri, 12 October 2012 10:22]

Report message to a moderator

Re: Eclipse not picking up maven Managed Dependencies [message #942307 is a reply to message #941237] Sat, 13 October 2012 11:30 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 124
Registered: November 2010
Senior Member
This is a theoretical answer (from what I am reading on the eclipse planet and in other forums). I did not try to build a scout application with maven (yet). So if my answer bring nothing, feel free to ignore it (and to inform others).

From what I understood eclipse plugins project and maven bring different solutions to handle dependency on other library. A typical Eclipse project will use manifest to declare dependency on a library (and product or feature to request the library). A typical maven project will do this in a POM file.

People describe these two options as:
- Manifest first approach
- Pom first approach

Because Scout comes from the Eclipse world, I think it uses the Manifest first approach. I am not sure what "Maven - Update Project..." is doing, but I do not think that it is updating the manifest file.

My first guess would have a look at the manifest file using the "plugin manifest editor" (open META-INF/MANIFEST.MF or plugin.xml in the server plugin). Check the dependencies tab. When we use log4j, we have an entry in "required plug-in".

Independent from Eclipse Scout, I imagine that every Eclipse project is confronted to this problem. Maybe if a good "pom first approach" pattern emerged in the Eclipse world, the SDK should provide an option to create a new Eclipse Scout project that use this pattern.

Previous Topic:Cancellation of parallel queries on server
Next Topic:PageBox
Goto Forum:

Current Time: Sat Jun 23 22:06:12 GMT 2018

Powered by FUDForum. Page generated in 0.01821 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top