1

I've simple Eclipse Web Project based on Adobe framework. Now I have to upgrade my project to a new version of framework and I wish to use Maven to manage dependencies, packaging, ecc.

The problem is that in the Adobe documentation is write that I MUST use thier own jars that are a lot (69). I see Maven System_Dependencies, but i'm looking for something smarter that add all 69 entries like that.

Usually, I would create an Eclipse UserLibrary and would add to Eclipse BuildPath, but in this case I don't know how to add them to maven classpath to compile and package the project properly

Stefano R.
  • 321
  • 1
  • 5
  • 18

1 Answers1

6

To include external jars you can add the dependency with System scope.

<dependency>
   ..
   <scope>system<scope>
   <systemPath>your jar path</systemPath>
</dependency>

Also you can define your compiler plugin to include the directory in your classpath.

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>directory path/*.jar</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>

NOTE: This will make your build success. But not sure how to make those classes available for access inside IDE.

Rima
  • 545
  • 6
  • 12
  • 1
    As I write, I read the Maven System_Dependencies, but i'm looking for somithing smarter that write 69 (or more) dependency xml block for each jar. If there's not, peace ! – Stefano R. Mar 23 '16 at 11:35
  • Edited the answer. If you want to add huge number of system scope dependency blocks, you can write a simple python script to generate such a file. – Rima Mar 23 '16 at 12:43