Customize maven assembly plugin -
i maven quite lot makes things easy, hard me deal parts of it... although searched web, don't work want.
here's current assembly configuration:
<build> <plugins> <plugin> <artifactid>maven-assembly-plugin</artifactid> <configuration> <finalname>${project.name}_${project.version}</finalname> <outputdirectory>c:\temp\fundsteward\</outputdirectory> <appendassemblyid>false</appendassemblyid> <archive> <manifest> <mainclass>lu.aspecta.fundsteward.main</mainclass> </manifest> </archive> <descriptorrefs> <descriptorref>jar-with-dependencies</descriptorref> </descriptorrefs> </configuration> </plugin> </plugins> </build> it creates runnable jar in specified destination folder; that's wanted far. now, have log4j.properties file saved next jar file in destination folder can adapt without packing jar again. furthermore, should not packed jar keep in in /src/main/resources (as usual).
i have tried different ways (with different assembly files (would preferred way), other configurations, ...) don't manage working want.
every or little hint highly appreciated.
best regards, j.r.
just in case someone's interested, here's did resolve issue. parts scrapped multiple sources. :)
<build> <resources> <resource> <directory>src/main/resources</directory> <targetpath>${project.build.directory}/${project.build.finalname}</targetpath> <includes> <include>log4j.properties</include> </includes> </resource> </resources> ... <plugin> <artifactid>maven-assembly-plugin</artifactid> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> <configuration> <finalname>${project.name}</finalname> <outputdirectory>${project.build.directory}/${project.build.finalname}</outputdirectory> <appendassemblyid>false</appendassemblyid> <archive> <manifest> <mainclass>com.my.app.mymain</mainclass> </manifest> <manifestentries> <class-path>.</class-path> </manifestentries> </archive> <descriptorrefs> <descriptorref>jar-with-dependencies</descriptorref> </descriptorrefs> </configuration> </plugin> </build>
Comments
Post a Comment