appplication failed when try to use one module classes in another module?

I have any modules in my spring-application on maven

First module build and I have war

Another Second module needs to import classes from a first.

Using this article this

I added this in first pom.xml

            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <attachClasses>true</attachClasses>
                    <classesClassifier>classes</classesClassifier>
                </configuration>
            </plugin>

And after builing there is jar file in directory

Than I added dependency in second module

<dependency>
    <groupId>ru.myProject</groupId>
    <artifactId>MyProject-webapp</artifactId>
    <version>${project.version}</version>
    <classifier>classes</classifier>
</dependency>

and build all together
So, there are jar files in ear archive in lib folder, but when try to start – there is error message without logs.

Can you help me to fix it or get idea?

May be the root cause in that, second application already contained own spring-application context and initialization?

Leave a Reply

avatar
  Subscribe  
Notify of