Reputation: 365
I am migrating an Ant project to Maven. There are a lot of Java projects in "Ant solution" which are only compiled to a specific directory (compiled to *.class files and copied to build folder). I.e. some project A uses dependencies from project B, which are preceded by copying *.class files from output folder B to resource folder project A.
Are there any possibilities to create a Maven jar-Module which uses another jar-Module only for compilation? Without using <dependency>
?
Upvotes: 0
Views: 139
Reputation: 5343
Are there any possibilities to create a Maven jar-Module which uses another jar-Module only for compilation?
Yes, see below
Without using <dependency>?
If you are using another module in your project, then you have a dependency on that project and should be declared as such. If you have a scope of provided, then the project which you depend on will only be used when compiling your project but will not be included in the final jar as it expects the classes it depends on to be provided at runtime.
Not entirely sure if I understood your question correctly as I do not see why you would want to not use the <dependency> section when you state in your question that you actually have dependencies.
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
Upvotes: 2