Results 1 to 4 of 4
  1. #1
    roxy1987 is offline Member
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    Default Parent Project Not getting maven dependencies

    Hi,

    I have a parent project with many modules. I am using maven and i am new to it. Below are my queries :

    1) I add the dependencies in the parent pom and the modules get the dependencies correctly. And the module classes are copied in the parent project also. But the dependent jars are only present in the modules and not in the parent project because of which i get the error markers in the parent project because of library not found.
    The build is successful though.
    2) I see the artifact not found markers in all the modules although the jars are listed in the modules.
    3) One of the modules is EJB, and it has dependency on some of the modules. But it is somehow getting all the other modules in its ear.

    COuld anyone please answer the queries. Any help would be highly appreciated. Thanks.

  2. #2
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,986
    Rep Power
    5

    Default Re: Parent Project Not getting maven dependencies

    Yeah I know plenty about Maven, but there is nothing here I can really answer. Its just too vague and smells of "I need to read a good Maven book first".

    1) are you talking about an IDE project here? Which IDE? Which plugin?
    2) Which error -exactly-
    3) then the dependency scopes are probably not correct. Hard to say with nothing to look at.

    I wrote an article for starting out with Maven, perhaps that can help you:

    Java Enterprise Stuff: maven2 - a copy pastable template
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    roxy1987 is offline Member
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    Default Re: Parent Project Not getting maven dependencies

    Gimbal,

    Thanks for your response. I have been able to resolve quite some things. Now the only problem left is the first one.
    I am using RSA.The project explorer for parent project is like this Attachment 5394
    SO.. what i mean is that the child project itself is clear and compiled well but since the classes are copied from child to parent, the parent project is throwing me compile time errors since it is providing the dependent jars to its children but it is not keeping jars for itself. the POM is like following :

    Java Code:
    <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/xsd/maven-4.0.0.xsd">
    	<modelVersion>4.0.0</modelVersion>
    	<groupId>com.bcp.acma</groupId>
    	<artifactId>acma</artifactId>
    	<version>1.0</version>
    	<packaging>pom</packaging>
    	<name>acma application</name>
    	<modules>
    		<module>acma-util</module>
    		<module>acma-core-entity</module>
    		<module>acma-bpm-flow</module>
    		<module>acma-integracion</module>
    		<module>modelo-integracion</module>
    		<module>acma-ejb</module>
    		<module>acma-ejb-ear</module>
    		<module>acma-bpm-web</module>
    		<module>acma-bpm-web-ear</module>
    		<module>administrador-web</module>
    		<module>administrador-web-ear</module>
    		<module>modelo-web</module>
    		<module>modelo-web-ear</module>
    		<module>bandeja-web</module>
    		<module>bandeja-web-ear</module>
    	</modules>
    	<build>
    		<pluginManagement>
    			<plugins>
    				<plugin>
    					<groupId>org.apache.maven.plugins</groupId>
    					<artifactId>maven-clean-plugin</artifactId>
    					<version>2.4.1</version>
    				</plugin>
    			</plugins>
    		</pluginManagement>
    	</build>
    	<dependencies>
    		<dependency>
    			<groupId>org.drools</groupId>
    			<artifactId>drools-compiler</artifactId>
    			<version>5.5.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.drools</groupId>
    			<artifactId>drools-core</artifactId>
    			<version>5.5.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.drools</groupId>
    			<artifactId>drools-persistence-jpa</artifactId>
    			<version>5.5.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-bam</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-bpmn2</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-flow</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-flow-builder</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-human-task-core</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-human-task-hornetq</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-persistence-jpa</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.jbpm</groupId>
    			<artifactId>jbpm-workitems</artifactId>
    			<version>5.4.0.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>com.sun.faces</groupId>
    			<artifactId>jsf-api</artifactId>
    			<version>2.1.2</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>log4j</groupId>
    			<artifactId>log4j</artifactId>
    			<version>1.2.16</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>net.sf.jxls</groupId>
    			<artifactId>jxls-core</artifactId>
    			<version>1.0.1</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>commons-codec</groupId>
    			<artifactId>commons-codec</artifactId>
    			<version>1.7</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>junit</groupId>
    			<artifactId>junit</artifactId>
    			<version>4.10</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>richfaces-components-api</groupId>
    			<artifactId>richfaces-components-api</artifactId>
    			<version>4.3.1.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>richfaces-components-ui</groupId>
    			<artifactId>richfaces-components-ui</artifactId>
    			<version>4.3.1.Final</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>j2ee</groupId>
    			<artifactId>j2ee</artifactId>
    			<version>6.0</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>spring-context-support</groupId>
    			<artifactId>spring-context-support</artifactId>
    			<version>3.0.0.RELEASE</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>AZGatewayClientWS</groupId>
    			<artifactId>AZGatewayClientWS</artifactId>
    			<version>1.0</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>AuthorizationService</groupId>
    			<artifactId>AuthorizationService</artifactId>
    			<version>1.0</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>AzWebClient</groupId>
    			<artifactId>AzWebClient</artifactId>
    			<version>1.0</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>jxl</groupId>
    			<artifactId>jxl</artifactId>
    			<version>1.0</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>velocity</groupId>
    			<artifactId>velocity</artifactId>
    			<version>1.6.4</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>axis</groupId>
    			<artifactId>axis</artifactId>
    			<version>1.0</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>javax.persistence</groupId>
    			<artifactId>javax.persistence</artifactId>
    			<version>2.1.0</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.dbunit</groupId>
    			<artifactId>dbunit</artifactId>
    			<version>2.4.9</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.slf4j</groupId>
    			<artifactId>slf4j-api</artifactId>
    			<version>1.6.4</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.apache.commons</groupId>
    			<artifactId>commons-lang3</artifactId>
    			<version>3.0.1</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>gson</groupId>
    			<artifactId>gson</artifactId>
    			<version>2.2.3</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>jasperreports</groupId>
    			<artifactId>jasperreports</artifactId>
    			<version>4.1.3</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>jasperreports-applet</groupId>
    			<artifactId>jasperreports-applet</artifactId>
    			<version>4.1.3</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>jasperreports-fonts</groupId>
    			<artifactId>jasperreports-fonts</artifactId>
    			<version>4.1.3</version>
    			<scope>provided</scope>
    		</dependency>
    		<dependency>
    			<groupId>jasperreports-javaflow</groupId>
    			<artifactId>jasperreports-javaflow</artifactId>
    			<version>4.1.3</version>
    			<scope>provided</scope>
    		</dependency>
    	</dependencies>
    	<properties>
    		<java.version>1.6</java.version>
    		<app.version>${project.version}</app.version>
    		<cdi.version>1.0-SP4</cdi.version>
    		<slf4j.version>1.6.4</slf4j.version>
    		<project.build.sourceEncoding>Cp1252</project.build.sourceEncoding>
    	</properties>
    </project>

  4. #4
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,986
    Rep Power
    5

    Default Re: Parent Project Not getting maven dependencies

    Your problem description makes little sense to me, but I guess you do NOT want to make all those dependencies provided scoped if you want them to "pass down" to depending modules.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 1
    Last Post: 04-23-2013, 04:56 PM
  2. Replies: 0
    Last Post: 04-20-2009, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •