Balint
Balint

Reputation: 292

EAR maven plugin does not see project dependency

I am having a problem with maven-ear-plugin that keep failing because of "not dependency defined" this is my POM

<groupId>org.jolie</groupId>
<artifactId>ear-test1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>ear</packaging>

<name>ear-test1</name>
<url>http://maven.apache.org</url>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
                <source>1.5</source>
                <target>1.5</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <version>5</version>
                <defaultLibBundleDir>lib</defaultLibBundleDir>
                <modules>
                    <ejbModule>
                        <groupId>org.jolie</groupId>
                        <artifactId>Test1</artifactId>
                    </ejbModule>
                    <jarModule>
                        <groupId>org.jolie-lang</groupId>
                        <artifactId>jolie</artifactId>
                    </jarModule>
                </modules>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jolie</groupId>
            <artifactId>Test1</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>
        <dependency>
            <groupId>org.jolie-lang</groupId>
            <artifactId>jolie</artifactId>
            <version>1.9.0-git</version>
            <type>jar</type>
        </dependency>
    </dependencies>

</dependencyManagement>

` I tried every single combination possible yet eclipse seems to not change its error status on the pom file without specifying what is wrong

Thanks

Upvotes: 0

Views: 175

Answers (1)

Balint
Balint

Reputation: 292

Ok the problem was and I suppose I should have thought about it the order of things my new pom looks like

<modelVersion>4.0.0</modelVersion>

    <groupId>org.jolie</groupId>
    <artifactId>ear-test1</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>ear</packaging>

    <name>ear-test1</name>
    <url>http://maven.apache.org</url>

    <dependencies>
        <dependency>
            <groupId>org.jolie</groupId>
            <artifactId>Test1</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>
        <dependency>
            <groupId>org.jolie-lang</groupId>
            <artifactId>jolie</artifactId>
            <version>1.9.0-git</version>
            <type>jar</type>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <version>5</version>
                    <defaultLibBundleDir>lib</defaultLibBundleDir>
                    <modules>
                        <ejbModule>
                            <groupId>org.jolie</groupId>
                            <artifactId>Test1</artifactId>
                        </ejbModule>
                        <jarModule>
                            <groupId>org.jolie-lang</groupId>
                            <artifactId>jolie</artifactId>
                        </jarModule>
                    </modules>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Upvotes: 0

Related Questions