English 中文(简体)
摘除从杰尔档案中产生的资源
原标题:Removing generated resources from a jar file

Hello 我正在使用maven2-xdoclet2-plugin来制作秘密地图。

Xdoclet的组合与此类似:

<plugin>
    <groupId>org.codehaus.xdoclet</groupId>
    <artifactId>maven2-xdoclet2-plugin</artifactId>
    <version>2.0.7</version>
    <executions>
        <execution>
           <id>xdoclet</id>
           <phase>generate-sources</phase>
           <goals>
             <goal>xdoclet</goal>
           </goals>
        </execution>
    </executions>
    (... dependencies ...)
    <configuration>
        <configs>
          <config>
            <components>
              <component>
                <classname>org.xdoclet.plugin.hibernate.HibernateMappingPlugin</classname>
                <params>
                  <version>3.0</version>
                </params>
              </component>
            </components>
            <params>
              <destdir>${project.build.directory}/classes</destdir>
            </params>
           </config>
          </configs>
       </configuration>

一. 导言

mvn clean generate-resources

具体如下:

tree -L 2 target/classes/
target/classes/
|-- com
|   `-- company
|       `-- (the mappings generated)
`-- generated-resources
    `-- xdoclet
        `-- com
            `-- company
                `-- (the mappings generated)

因此,我想避免的是,在杰尔档案中要有“生成的资源”。

我如何能够这样做? I Did a several googlesearch without hedom luck.

最佳回答

最后,我从maven2-xdoclet2-plugin移至Xdoclet-maven-plugin,并按预期开展工作(我还提出一些与秘密绘制地图有关的问题)。

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>xdoclet-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>xdoclet</id>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>xdoclet</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <tasks>
                    <hibernatedoclet
                        destdir="${project.build.outputDirectory}"
                        mergeDir="${project.basedir}/src/main/resources/hibernate">
                        <fileset dir="${project.basedir}/src/main/java"
                            includes="**/domain/**/*.java" />
                        <hibernate version="3.0" />
                    </hibernatedoclet>
                </tasks>
            </configuration>
        </plugin>
问题回答

你们把绘图档案整理到联合调查组的档案中,因为绘图档案是向错误的产出目录生成的。 页: 1

<destdir>${project.build.directory}/classes</destdir>

因此,将在<代码>、目标/类别/的夹中生成地图文档,用于建立产出JAR档案。 ry ::

<destdir>${project.build.directory}/generated</destdir>




相关问题
Eclipse CDT static resources under build folder

I m building a C++ project under Eclipse and my release folder should include a static sub-folder with some files inside it, those are required by executable during runtime. The problem is that this ...

Multiple Output paths for a C# Project file

Can I use multiple output paths. like when i build my project, the exe should generate in two different paths. If so, How can I specify in Project Properties-> Build -> output path? I tried using , ...

Running multiple TeamCity Agents on the same computer?

We have several build machines, each running a single TeamCity build agent. Each machine is very strong, and we d like to run several build agents on the same machine. Is this possible, without using ...

couldnt recognise pom.xml file

i am build forge as build tool. it is executing maven mvn commands fine ,but it couldnt recognizing the maven project pom.xml to run the build.so i tried to execute the same pom.xml through the ...

Cobertura ant script is missing Log4J classes

I tried to get Cobertura running inside my ant script, but I m stuck right at the beginning. When I try to insert the cobertura taskdef I m missing the Log4J libraries. Ant properties & ...

Why not use TFS as a build / CI solution?

Currently our build solution is set up using TFS + MS Build scripts. TFS is also being used as a CI server. I ve seen several posts on this site telling people about other CI solutions. Are there ...

Multiple websites running on same codebase?

We are developing an application that would be offered as a hosted solution. I am struck with understanding how can i use multiple sites with same code without duplicating base code. eg: website 1: ...

热门标签