On 01/05/2011 6:14 PM, CassUser CassUser wrote:
I don't think I'm explaining myself clearly. let me try again.
Spring is just a dependency.
We use Spring extensively to build both webapps and batch jobs. No special
plug-in or assembly required for Spring.
Yeah i understand that. I meant the application context spring files used
in a given module being copied to the deployment module.
Did you Google Maven RPM? http://mojo.codehaus.org/rpm-maven-plugin/
Yep. Thats what we're using.
I think the assembly plugin is what i was looking for.
Assume module A is a simple maven project with jar packaging which uses a
couple spring context files to initialize the application (in
src/main/resources ). This module has no dependencies on other modules. It
is self contained with its own unit/integ tests etc.
module B is another simple maven module with jar packaging. In it's pom it
uses a plugin which generates a archive file (assume tar or something) in
the target directory.
Module C, we'll call it a the deployment module has the following
directories:
+ src/main/resources/bin
+ src/main/resources/configuration
When module C is built, i would like the spring files from module A to be
copied to bin, and the archive in module B to configuration.
Does that make sense, or am I going about this wrong..?
I could be wrong but I would think that the Spring configuration files
belong in Project C.
You may need something is Module A to do testing but generally the
dependent modules should be ignorant of application packaging.
Spring configuration files are generally tied to the top level module
since they are generally gluing stuff together.
OTOH, if the configuration files only relate to module A, Spring can
probably find them inside the module A jar.
Not sure why a jar file would appear in a configuration directory but
you could be doing something that is outside my experience.
Try to describe why this is required and someone will likely be able to
relate to this.
In our case, this is pretty common since Spring is used for lots of
dependencies that are not supplied by us and we have never had any need
to pull a Spring XML file out of someone's jar file into the top level
module.
We have a project with over 70 modules that creates many webapps (Tomcat
applications) that are webservices and servlets as well as standalone
Java applications that run on other servers as batch jobs.
They all use Spring.
We are not building any RPMs but I imagine that the RPM part is pretty
minor and all the effects are at the top level. The lower level jars
should have no idea how the top level module will be packaged.
I hope that this moves the discussion forward and lets some of the real
experts give you good advice.
There is always someone here who has done whatever you want to do.
Ron
Thanks for your help
On Sun, May 1, 2011 at 2:57 PM, Ron Wheeler
<[email protected]>wrote:
Spring is just a dependency.
We use Spring extensively to build both webapps and batch jobs. No special
plug-in or assembly required for Spring.
Did you Google Maven RPM? http://mojo.codehaus.org/rpm-maven-plugin/
Unless you are building something that no one else has ever heard of, you
are likely to find that hundreds of people have already done it.
Try not to reinvent a square wheel.
Ron
On 01/05/2011 4:11 PM, CassUser CassUser wrote:
One other question.
Anyone know whats the preferred way to reference spring files? the files
in
src/main/resources in other sibling modules to be packaged for
deployment...
On Sun, May 1, 2011 at 1:07 PM, CassUser CassUser<[email protected]
wrote:
Yeah. the distribution module actually is an RPM module, and we use the
copy dependencies plugin to ref modules within the project. The
dependencies are then mapped to locations in the rpm plugin like:
<mapping>
<directory>${install.location}/libraries</directory>
<sources>
<source>
<location>${project.build.directory}/dependency</location>
</source>
</sources>
</mapping>
From one of those dependent modules I would like to reference a archive
file that it creates (like the jars the dependency plugin grabs). Would
the
assembly plugin work in this use case (example?)
dependency plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
On Sun, May 1, 2011 at 12:43 PM, Benson Margulies<[email protected]
wrote:
Generally people use the assembly plugin in a 'distribution' module to
rearrange things into a distribution hierarchy. Is that what you have
in mind here?
On Sun, May 1, 2011 at 3:40 PM, CassUser CassUser<[email protected]>
wrote:
Hey all,
I have a multimodule maven project. One of the modules creates a
archive
file. It's packaging is jar, but uses another plugin to create a
different
type of archive. I have a deployment modules which needs to move that
archive into a conf folder. How can i achieve this?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]