English 中文(简体)
Maven plugin for generating ISO file
原标题:

Is there a maven plugin capable of generating ISO images?

I need to take the output of some modules (mostly zip files containing jars) and combine them into a single ISO image.

Thanks

最佳回答

There is now an ISO9660 maven plugin that does the job:

https://github.com/stephenc/java-iso-tools/commits/master/iso9660-maven-plugin

Documentation is sparse but got it working with the following:

<plugin>
    <groupId>com.github.stephenc.java-iso-tools</groupId>
    <artifactId>iso9660-maven-plugin</artifactId>
    <version>1.2.2</version>
    <executions>
        <execution>
            <id>generate-iso</id>
            <goals>
                <goal>iso</goal>
            </goals>
            <phase>package</phase>
            <configuration>
                <finalName>${project.build.finalName}.iso</finalName>
                <inputDirectory>${project.build.directory}/iso</inputDirectory>
            </configuration>
        </execution>
    </executions>
</plugin>
问题回答

I m not aware of any native integration (certainly in the Assembly plugin), but it looks like the following library is available: http://jiic.berlios.de/

This could be wrapped in a Maven plugin, or for simpler integration used with the Maven AntRun plugin and the pre-bundled ant task.

<plugin>
        <groupId>com.github.stephenc.java-iso-tools</groupId>
        <artifactId>iso9660-maven-plugin</artifactId>
        <version>2.0.1</version>
        <executions>
                <execution>
                        <id>generate-iso-windows</id>
                        <goals>
                                <goal>iso</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                                <enableRockRidge>true</enableRockRidge>
                                <enableJoliet>true</enableJoliet>
                                <hideMovedDirectoriesStore>true</hideMovedDirectoriesStore>
                                <finalName>IsoFileName.iso</finalName>
                                <inputDirectory>target/input</inputDirectory>
                        </configuration>
                </execution>
        </executions>
</plugin>

From this mail archive exchange, it seems like the maven assembly plugin could do the trick. But it s only a third-hand info.

     <plugin>
         <!-- ISO generation. -->
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
         <version>1.2.1</version>
         <executions>
             <execution>
                 <goals>
                     <goal>exec</goal>
                 </goals>
                 <phase>verify</phase>
             </execution>
         </executions>
         <configuration>
             <executable>genisoimage</executable>
             <arguments>
                 <argument>-V</argument>
                 <argument>${iso.name}</argument>
                 <argument>-m</argument>
                 <argument>*.iso</argument>
                 <argument>-dir-mode</argument>
                 <argument>0555</argument>
                 <argument>-file-mode</argument>
                 <argument>0555</argument>
                 <argument>-gid</argument>
                 <argument>0</argument>
                 <argument>-uid</argument>
                 <argument>0</argument>
                 <argument>-iso-level</argument>
                 <argument>2</argument>
                 <argument>-J</argument>
                 <argument>-joliet-long</argument>
                 <argument>-r</argument>
                 <argument>-o</argument>
                 <argument>${project.build.directory}/${ iso.name }</argument>
                 <argument>${iso.preparation.dir}</argument>
             </arguments>
         </configuration>
     </plugin>                                             




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签