Using Java Advanced Imaging with Maven

后端 未结 9 2249
执笔经年
执笔经年 2020-12-08 09:30

The JAI setup is quite tedious, involving multiple jars and environment variables. It would aid the project\'s portability quite a lot if I could add it as a regular Maven d

相关标签:
9条回答
  • 2020-12-08 09:56
    <dependency>
        <groupId>javax.media.jai</groupId>
        <artifactId>com.springsource.javax.media.jai.core</artifactId>
        <version>1.1.3</version>
    </dependency>
    

    and add a repository declaration:

    <repository>
        <id>com.springsource.repository.bundles.external</id>
        <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
        <url>http://repository.springsource.com/maven/bundles/external</url>
    </repository>
    

    This worked for me. I guess it relies on Spring Jar.

    0 讨论(0)
  • 2020-12-08 09:56

    I add this dependencies in my pom file:

    <dependency>
            <groupId>com.github.jai-imageio</groupId>
            <artifactId>jai-imageio-core</artifactId>
            <version>1.4.0</version>
    </dependency>   
    

    from https://openmeetings.apache.org/openmeetings-web/dependencies.html

    0 讨论(0)
  • 2020-12-08 10:00

    To avoid donwloading the jars and installing them you can add a dependency on the spring repo. So change the normal dependency slightly:

        <dependency>
            <groupId>javax.media.jai</groupId>
            <artifactId>com.springsource.javax.media.jai.core</artifactId>
            <version>1.1.3</version>
        </dependency>
    

    and add a repository declaration:

        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
            <url>http://repository.springsource.com/maven/bundles/external</url>
        </repository>
    

    And it should now work (it makes all the sun classes available javax.media.jai.*). See here:

    http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.javax.media.jai.core&version=1.1.3

    You can also add the codec dependency if necessary...

    http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.javax.media.jai.codec&version=1.1.3

    0 讨论(0)
提交回复
热议问题