English 中文(简体)
客户JAR, 包括客户
原标题:Client JAR containing maven dependencies

I m 建造一个包含一个使用春天的客户模块的服务。 执行客户的服务并不包含春天,而是依赖于春天依赖客户。 理想的情况是,我希望客户在联合调查报告中包含必要的春季受扶养人,但我似乎无法说明如何做到这一点。 我看到了使用maven-assembly-plugin的几种不同例子,但我宁愿不使用“mvn Clean Pack”以外的东西来做到这一点。

感谢任何帮助。

问题回答

maven-shade-plugin 允许你建造一条含有某些(或全部)属地的青春期。 它应当允许你做你们需要的事情。

By binding the assembly plugin s single goal to the project s build lifecycle, you can accomplish what you want by running mvn clean package.

Cut/pasting the pom Format to do this from the usage page of the plugin,

<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.2</version>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id> <!-- this is used for inheritance merges -->
            <phase>package</phase> <!-- bind to the packaging phase -->
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      [...]
</project>

当然,你要么使用不同的事先界定的描述,要么使用单独的描述文件。





相关问题
Run EXE from client side

I need run an exe file from client side. The Exe file exist in my C: Directory. I need run this exe file from my WEB site. How can I co this?

Security in PHP

I ve written some PHP scripts to do some server-side work on a headless linux server machine on a LAN. For example, I have http://ipadress/php/operations.php?operation=registerUser&uName=X&...

EMAIL server FSP model

For my assignment I need to develop FSP model for email server and client. I manage to write simple model which describes one user, server and his mailbox, but I am having problems changing this ...

Calling a service from a callback method in Client

I have a scenario where, upon receiving a command on one of the callback methods in client, the client needs to call another service. For example: In OnNewCommand() callback method client receives a ...

ServiceContractGenerator vs ServiceDescriptionImporter

I m trying to build a light-weight SOAP client without using Add Service Reference. Ideally, this client should work for as many services as possible. Currently, it uses ServiceDescriptionImporter to ...

Simple server and client request/response in C#

OK. I just want to know if this can be done. I m using C# asp.net language. I want to send a structure to a webserver from a webpage (much like you you can pass a structure to a function). The ...

热门标签