Integration testing and WAR dependencies

2011-05-26 Thread Alex Lopez

Hi folks,

using 3.0.3.

I'm in the process of creating a test module for my multi-module web 
project, to perform integration tests.


I have a fairly standard setup, a WAR-type module depending on several 
other modules. I have some classes I want to test residing on the WAR 
and some in other modules.


I thought I could count on transitive dependencies, ie.: add just the 
war as dependency in the test module and other modules will show up as 
result of transitive dependencies.


The thing is, not even the classes in the WAR show up in the test 
module. Are WAR-type modules never supossed to be added as dependencies? 
I read somewhere that transitive dependencies don't work for WARs, does 
it mean the only way to go is have nearly-empty WARs with all classes in 
other modules, on which the WAR depends?


(just to confirm this, I changed temporarily the packaging type of my 
WAR module to JAR, and the test module picked up all transitive 
dependencies...)


What is the recommended aproach to organize integration testing in a 
maven multi-module webapp project?


Thanks and have a good day,
Alex

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Integration testing and WAR dependencies

2011-05-26 Thread Alex Lopez
Thanks Wayne, really useful explanations. I already had googled a bit 
about this but, as always, one cannot expect to find good examples or 
practices out there and I have a high respect for this list opinions, 
specially about the maven way which I see now again and again ends up 
always with less headaches in the long-term.


Em 26-05-2011 16:40, Wayne Fay escreveu:

The thing is, not even the classes in the WAR show up in the test module.
Are WAR-type modules never supossed to be added as dependencies? I read


Try packaging a utility class file in a War, and then run it from
java -cp blah.war YourClass. War files are not understood by the
JVM, only Jar files are valid classfile containers. For this reason,
it is not really valid to have a War module as a dependency except in
an Ear module (or perhaps another War module where you're using
overlays).


somewhere that transitive dependencies don't work for WARs, does it mean the
only way to go is have nearly-empty WARs with all classes in other modules,
on which the WAR depends?


This is the correct way to set things up. Put your class files in
one or more Jar modules and then depend on those modules in your War
project. Localize unit and integration testing within the Jar module
if possible.


What is the recommended aproach to organize integration testing in a maven
multi-module webapp project?


You can still do integration testing with your War file. But this
should mean deploying the War file to a container and running some
integration testing via Cactus, Selenium or perhaps failsafe.

Here's some more info:
http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing
http://andrewmccall.com/2008/09/integration-testing-in-maven-with-maven-cargo-httpunit-and-selenium
and you'll find more links on Google with the terms maven war
integration testing.

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: help - how to reduce the build time using mvn and cargo

2011-05-13 Thread Alex Lopez
You could deploy in place or unpacked or something similar, there is 
more than one way to deploy or test your webapp without it having to be 
packed into the WAR, which is what takes most of the build time for us too.


Em 13-05-2011 01:42, Ron Wheeler escreveu:

On 12/05/2011 12:53 PM, javadaisy wrote:

Hi,

I am using maven 2.2.1 with cargo plugin to deploy into the local and
remote
host. It takes around 7 to 8 minutes to build and deploy the war. I would
like to reduce the time to 3 minutes or less than 3 minutes. can anybody
please tell me how to do that?.

I tried adding set MAVEN_OPTS=-DXms_1024M -DXmx=1024M in mvn.bat. It
didn't
work


How big is the WAR file?
There are physical limits to the speed at which disk drives work.

How long does it take on other machines? Is it only slow on some
workstations?

One of the most effective tricks is to segregate third party libraries
into sharable JARs that you only build once and deploy to the servlet
engine (Tomcat) once.
You set these as provided in the WAR file's POM and suddenly the build
creates a WAR that is 20 Mb smaller and builds 10 times faster.
Things like CXF (Web Services) add 20Mb to each WAR. If you make it
shareable and scope it as provided in the POM, the WAR drops to a few
tens of kilobytes that builds PDQ.

We have done this is 10+ cases to get common third-party and our own
utilities out of our 60+ WAR files that implement services and servlets.
- Spring, Hibernate, MySQL in one shared jar
- CXF
- JasperReports
- Apache Commons - lots of modules that everyone uses.
- our messaging/e-mail utility
- our facades that simplify our internal connections
- API and core functions that define the ORM and business processes

The WARs now contain only the code and resources that uniquely exist to
support the WAR's functionality.

It also eliminates the jar hell of conflicting versions of common
dependencies. Once you decide which version of commons-logging you want
to use, everyone gets it.

POM files get really small since they only refer to 10 dependencies or
less (typically 5 dependencies) to get all of the 90+ officially
sanctioned libraries.

Big help at run-time as well.

Ron


Thanks in advance.

--
View this message in context:
http://maven.40175.n5.nabble.com/help-how-to-reduce-the-build-time-using-mvn-and-cargo-tp4390836p4390836.html

Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven 3.0.3 hanging / having timeouts often?

2011-05-12 Thread Alex Lopez


Em 12-05-2011 01:22, Andrew Robinson escreveu:

I have been using maven 2.2.1 for a while at my company and we just switched
to maven 3. I have rebuilt my computer (ubuntu maverick 10.04 32-bit ==
ubuntu natty 11.04 64-bit) and installed maven 3.

In maven 3.0.3, (I have not seen it with maven 2.2.1), it stops downloading
after a few to several downloads. If I ^C the build, and keep re-running it,


+1, I've been having this kind of 'hangs', using maven 3.0.2 and 
artifactory 2.3.1 (sometimes when running maven site, sometimes 
performing a build), then ^C seems to get maven to continue doing what 
it was doing and eventually end with success...



it will eventually built. It only dies when maven is trying to download
file. It may happen before any progress is display, partial progress or full
progress.

Example:
Downloading:
http://internalserver.ouritranet.com:8086/archiva/repository/internal/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading: http://
internalserver.ouritranet.com:8086/archiva/repository/snapshots-corporate/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading:
http://repo2.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading:
http://www.ibiblio.org/maven/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
341 B   341 B

If I let it go for a while it then prints:
Downloading:
http://internalserver.ouritranet.com:8086/archiva/repository/internal/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading:
http://internalserver.ouritranet.com:8086/archiva/repository/snapshots-corporate/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading:
http://repo2.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloading:
http://www.ibiblio.org/maven/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
[WARNING] Checksum validation failed, could not read expected checksum:
Error transferring file: Connection timed out for
http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
[WARNING] Checksum validation failed, could not read expected checksum:
Error transferring file: Connection timed out for
http://repo2.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml


My other co-workers have not reported seeing this issue yet. Any ideas on
why maven 3.0.3 is having this problem when maven 2.2.1 does not?

FYI, we have a corporate proxy, not sure if that could be part of the
problem.

-Andrew



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven 3.0.3 hanging / having timeouts often?

2011-05-12 Thread Alex Lopez
Now this got me thinking, my intuition is that this might be a network 
related problem... maybe maven 2 had shorter timeouts, hence not 
appearing to hang, does Maven 3 download more than one dependency at the 
same time? Does this behavior differ from version 2? Why hitting ^C 
under such circumstances wouldn't end mvn process, instead forcing it to 
continue?



Em 12-05-2011 11:50, Alex Lopez escreveu:


Em 12-05-2011 01:22, Andrew Robinson escreveu:

I have been using maven 2.2.1 for a while at my company and we just
switched
to maven 3. I have rebuilt my computer (ubuntu maverick 10.04 32-bit ==
ubuntu natty 11.04 64-bit) and installed maven 3.

In maven 3.0.3, (I have not seen it with maven 2.2.1), it stops
downloading
after a few to several downloads. If I ^C the build, and keep
re-running it,


+1, I've been having this kind of 'hangs', using maven 3.0.2 and
artifactory 2.3.1 (sometimes when running maven site, sometimes
performing a build), then ^C seems to get maven to continue doing what
it was doing and eventually end with success...


it will eventually built. It only dies when maven is trying to download
file. It may happen before any progress is display, partial progress
or full
progress.

Example:
Downloading:
http://internalserver.ouritranet.com:8086/archiva/repository/internal/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading: http://
internalserver.ouritranet.com:8086/archiva/repository/snapshots-corporate/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading:
http://repo2.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading:
http://www.ibiblio.org/maven/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

341 B 341 B

If I let it go for a while it then prints:
Downloading:
http://internalserver.ouritranet.com:8086/archiva/repository/internal/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading:
http://internalserver.ouritranet.com:8086/archiva/repository/snapshots-corporate/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading:
http://repo2.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading:
http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

Downloading:
http://www.ibiblio.org/maven/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

[WARNING] Checksum validation failed, could not read expected checksum:
Error transferring file: Connection timed out for
http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml

[WARNING] Checksum validation failed, could not read expected checksum:
Error transferring file: Connection timed out for
http://repo2.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml



My other co-workers have not reported seeing this issue yet. Any ideas on
why maven 3.0.3 is having this problem when maven 2.2.1 does not?

FYI, we have a corporate proxy, not sure if that could be part of the
problem.

-Andrew



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven 3.0.3 hanging / having timeouts often?

2011-05-12 Thread Alex Lopez



Em 12-05-2011 12:02, Tim Pizey escreveu:

On 12 May 2011 11:50, Alex Lopez  wrote:


Em 12-05-2011 01:22, Andrew Robinson escreveu:


I have been using maven 2.2.1 for a while at my company and we just
switched
to maven 3. I have rebuilt my computer (ubuntu maverick 10.04 32-bit ==
ubuntu natty 11.04 64-bit) and installed maven 3.

In maven 3.0.3, (I have not seen it with maven 2.2.1), it stops
downloading
after a few to several downloads. If I ^C the build, and keep re-running
it,


+1, I've been having this kind of 'hangs', using maven 3.0.2 and artifactory
2.3.1 (sometimes when running maven site, sometimes performing a build),
then ^C seems to get maven to continue doing what it was doing and
eventually end with success...


Me too, on win7/cygwin. I thought it was a cygwin problem.


+1 now that I think about that it seems definitely like a cygwin 
problem, since I'm never getting this through m2eclipse...


could it be related with the warning cygwin gives me complaining about 
bad ms-dos style paths?


$ mvn site site:stage
cygwin warning:
  MS-DOS style path detected: C:\Program Files\Apache Software 
Foundation\apache-maven-3.0.2/boot/
  Preferred POSIX equivalent is: /cygdrive/c/Program Files/Apache 
Software Foundation/apache-maven-3.0.2/boot/

...




cheers


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven, Subversion and Eclipse issue

2011-05-09 Thread Alex Lopez

never a good idea to commit the target dir IMO...

Em 09-05-2011 15:42, Refr Bruhl escreveu:


Team

I've an issue with the m2 plugin using maven in conjunction with subversion.
Since this crosses three platforms I thought I would try both the subversion and
maven list to see if anyone has run across a similar issue and what the solution
was.

When maven dependency is enabled for an eclipse project the maven plugin will
ensure the target subdirectory exists. This is usally a good thing.


When the project is committed to subversion is when issues arise

When a mvn clean is issued either thru the plugin or at the command shell the
target directory is deleted. The eclipse maven 2 plugin will recreate the target
subdirectory

However subversion now complains the directory is out of sync. Most times the
subversion plugin will not allow a force update.


My current workaround is not to commit the entire project -- just subfolder
components when I make updates. I'm thinking there is a cleaner solution to
this.

Using this method I am forced to use svn shell commands to create tags. The tag
feature of the subversion plugin will not work unless all sub directories are
commitable.


has anyone else ran into this? If so what solutions or workarounds were found?


Platform details below

Eclipse:

Eclipse Java EE IDE for Web Developers.

Version: Helios Release
Build id: 20100617-1415

(c) Copyright Eclipse contributors and others 2005, 2010.  All rights reserved.
Visit http://www.eclipse.org/webtools

Maven for Eclipse:

M2 plugin by Sonatype 0.12.1.2011

Subversion for Eclipse
Subversive byu Polarion 2.2.2


OS: Windows XP


--Refr inn gra


Wars are to be won with swords and spears,
not with rice and salt. -- Uesugi Kenshin


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: multiple project builds

2011-05-04 Thread Alex Lopez
You could check out the books freely available in sonatype website 
(books section), maven reference and maven by example, these really 
helped me a lot to understand whan a multi-module/reactor project is and 
how to arrange a good structure for it (ie separate inheritance from 
modularity etc)


Em 03-05-2011 23:02, Tommy Chheng escreveu:

Check out
https://github.com/apache/mahout

by etc, i meant any other sub-project.


On Tue, May 3, 2011 at 2:53 PM, offbyoner...@iridiumsuite.com  wrote:


I am curious about the use of etc in  your example.  What is that all
about?

Do you perchance know the location of any examples like this that I could
look at?

--
View this message in context:
http://maven.40175.n5.nabble.com/multiple-project-builds-tp4368244p4368529.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: mvn compile works mvn site-deploy causes complation error

2011-04-27 Thread Alex Lopez

Have you tried with maven-site-plugin 3.0-beta-3 ?

Also I don't remember why exaclty, I've got
executions
execution
idattach-descriptor/id
goals

goalattach-descriptor/goal
/goals
/execution
/executions

inside site plugin, maybe it is needed for something to work OK?

Em 27-04-2011 15:20, Leandro escreveu:

Hi,

I have a multi-project module with maven 3.0.2

I am trying to setup the site generation after all compile dependencies are
now resolved and no compile error is caused during mvn compile or mvn
install or mvn deploy.

When I do a mvn site or mvn site:stage I get a compile error, anyone has a
clue what is going on ? Also a mvn clean install before site does not fix
this problem

Besides I think is taking too much time, and I see the message Forking
 more than three times per project.

In my root pom I added the following code inside tag:

plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-site-plugin/artifactId
 version3.0-beta-2/version
 configuration
   siteDirectory${basedir}/site//siteDirectory

 reportPlugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-javadoc-plugin/artifactId
 version2.7/version
   /plugin
   plugin
   groupIdorg.apache.maven.plugins/groupId

artifactIdmaven-project-info-reports-plugin/artifactId
   version2.2/version
   reportSets
 reportSet
 reports
   reportdependencies/report
   reportlicense/report
   reportscm/report
   reportproject-team/report
 /reports
 /reportSet
 /reportSets
  /plugin
   /reportPlugins
 /configuration
   /plugin

I have a few doubts:

1) Why am I getting a compilation error only when I use mvn site?

2) Do I need to add the code below or similar to the subprojects as well?
(or is enough in the root pom?)

3) Do I need to add the true or the appropriate goal (aggregate) ?

4) Would I get an error if I do not write the site descriptor in each
subproject?

5) Is it normal that I am getting more than three Forking  messages?

Finally, the last error was:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.0-beta-2:stage (default-cli) on
project xstreamline3-viewers: Error during page generation: Error rendering
Maven report:
[ERROR] Exit code: 1 -
com/fuseim/process/action/PollMessages.class(com/fuseim/process/action:PollMessages.class):
warning: Cannot find annotation method 'value()' in type
'javax.ejb.TransactionAttribute': class file for
javax.ejb.TransactionAttribute not found
[ERROR]
com/fuseim/process/action/PollMessages.class(com/fuseim/process/action:PollMessages.class):
warning: Cannot find annotation method 'value()' in type
'javax.ejb.TransactionAttribute'
[ERROR] error: in class file
com/fuseim/process/action/PollMessages.class(com/fuseim/process/action:PollMessages.class):
unknown enum constant javax.ejb.TransactionAttributeType.REQUIRES_NEW
[ERROR]
com/fuseim/process/action/CreateProcessListener.class(com/fuseim/process/action:CreateProcessListener.class):
warning: Cannot find annotation method 'value()' in type
'javax.ejb.TransactionManagement': class file for
javax.ejb.TransactionManagement not found

Please help me with this issue.


--
View this message in context: 
http://maven.40175.n5.nabble.com/mvn-compile-works-mvn-site-deploy-causes-complation-error-tp4343797p4343797.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: same proyects running under java 1.4 and java 1.5

2011-04-13 Thread Alex Lopez
Make the classes into different jars (java 1.4 and 1.6) and add one ore 
the other as dependencies under different profiles.


Em 13-04-2011 15:01, Fernando Wermus escreveu:

Hi all,
 We have a proyect which we need to compile under java 1.4 for some
companies and 1.6 for other companies. The problem is that in java 1.6 we
have a class that implements an interface named ResulSet. Result changes its
methods from 1.4 to 1.6 because jdbc changes. Then we need to have an
implementation of Resulset for java 1.4 and another impl for java 1.6. What
we need is to add to our currents profiles a way to include or exclude some
class in the proyect with the same package and class name.

Is any solution from maven for this problem?

thanks in advance and I hope you have understood our problem.



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: same proyects running under java 1.4 and java 1.5

2011-04-13 Thread Alex Lopez

Yes, the thing is create 2 projects (in fact 3).

So you can include same classes/packages in different jars (different 
projects). And have the 3rd project depend on each of the others 
depending on the active profile.


I don't know how to do it with only one project... Of course there might 
be plenty of ways ;)


Em 13-04-2011 15:44, Fernando Wermus escreveu:

Alex,
 I understand your proposal. Do I need to create two proyects for this
situation or could I avoid this?

2011/4/13 Alex Lopezalo...@flordeutopia.pt


Make the classes into different jars (java 1.4 and 1.6) and add one ore the
other as dependencies under different profiles.

Em 13-04-2011 15:01, Fernando Wermus escreveu:

  Hi all,

 We have a proyect which we need to compile under java 1.4 for some
companies and 1.6 for other companies. The problem is that in java 1.6 we
have a class that implements an interface named ResulSet. Result changes
its
methods from 1.4 to 1.6 because jdbc changes. Then we need to have an
implementation of Resulset for java 1.4 and another impl for java 1.6.
What
we need is to add to our currents profiles a way to include or exclude
some
class in the proyect with the same package and class name.

Is any solution from maven for this problem?

thanks in advance and I hope you have understood our problem.



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: The maven-assembly-plugin and a large complex project.

2011-04-07 Thread Alex Lopez
Here we have a similar setup, we manage to build everything into a WAR 
including dependent jars using reactor/assembly project:


BTW, we use separate poms for parent (inheritance) and reactor 
(multi-module), which I think makes sense as all sub-modules have the 
parent as parent but not one sub-module even knows about the reactor one 
(which serves just to build everything).


So the reactor project lists ALL other modules (besides parent, only 
used to inherit properties). Not a module depends or inherits from 
reactor module. The war module depends on some jars, which in turn 
depend on other jars etc.


So when we issue mvn install or mvn deploy in the reactor project, 
it will first see the dependency graph going from the war to everything 
else, and first install/deploy the needed things (jars) so, when it 
reaches the war for packaging, all the necesary jars have already been 
installed/deployed, and are available as dependencies to the war, which 
gets packaged and installed/deployed as expected.


So I thing the tricky part for us to see about reactor and parent and 
modules and all this stuff was separating concerns: our parent only used 
to inherit, the reactor only used to lists all other modules, and the 
build order is determined by a correctly specified dependency graph (the 
war depends on jars, etc).


With multiple wars I believe it should behave the same way, if 
dependencies spring from the wars to the jars they depend on (and thus 
when building separate graphs are calculated each culminating in a war 
with other dependencies included inside as jars).


Em 06-04-2011 15:46, Wendy Smoak escreveu:

On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com  wrote:

Also I refer you to:
http://maven.apache.org/plugins/maven-assembly-plugin/which states
that it can create distributions in the war format.


It *can* but you generally only need it if the war plugin is not doing
what you need.

When building a war, the war plugin is the logical choice _until_ you
run into some complication that the war plugin can't solve.



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: The maven-assembly-plugin and a large complex project.

2011-04-07 Thread Alex Lopez
I don't think I can post the full thing, but I'll post some cut down 
version so you can make an idea.


BTW, I got the idea from the documentation on sonatype site, look into 
maven reference and maven by example books, available for free. They 
include links to sample projects configured more or less this way.


http://www.sonatype.com/books/mvnref-book/reference/public-book.html

Em 07-04-2011 10:30, Adam Gibbons escreveu:

Alex, that's perfect! Exactly the kind of thing I'm trying to do myself.
Would you mind posting your reactor, war, jar and parent poms please? I'd
really like to see a working example of this in action.

Cheers,
Adam

On 7 April 2011 09:51, Alex Lopezalo...@flordeutopia.pt  wrote:


Here we have a similar setup, we manage to build everything into a WAR
including dependent jars using reactor/assembly project:

BTW, we use separate poms for parent (inheritance) and reactor
(multi-module), which I think makes sense as all sub-modules have the parent
as parent but not one sub-module even knows about the reactor one (which
serves just to build everything).

So the reactor project lists ALL other modules (besides parent, only used
to inherit properties). Not a module depends or inherits from reactor
module. The war module depends on some jars, which in turn depend on other
jars etc.

So when we issue mvn install or mvn deploy in the reactor project, it
will first see the dependency graph going from the war to everything else,
and first install/deploy the needed things (jars) so, when it reaches the
war for packaging, all the necesary jars have already been
installed/deployed, and are available as dependencies to the war, which gets
packaged and installed/deployed as expected.

So I thing the tricky part for us to see about reactor and parent and
modules and all this stuff was separating concerns: our parent only used to
inherit, the reactor only used to lists all other modules, and the build
order is determined by a correctly specified dependency graph (the war
depends on jars, etc).

With multiple wars I believe it should behave the same way, if dependencies
spring from the wars to the jars they depend on (and thus when building
separate graphs are calculated each culminating in a war with other
dependencies included inside as jars).

Em 06-04-2011 15:46, Wendy Smoak escreveu:

  On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com

  wrote:


Also I refer you to:
http://maven.apache.org/plugins/maven-assembly-plugin/which states
that it can create distributions in the war format.



It *can* but you generally only need it if the war plugin is not doing
what you need.

When building a war, the war plugin is the logical choice _until_ you
run into some complication that the war plugin can't solve.



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: The maven-assembly-plugin and a large complex project.

2011-04-07 Thread Alex Lopez
This is an example multi-module project with separate war, reactor and 
parent poms


Em 07-04-2011 11:16, Alex Lopez escreveu:

I don't think I can post the full thing, but I'll post some cut down
version so you can make an idea.

BTW, I got the idea from the documentation on sonatype site, look into
maven reference and maven by example books, available for free. They
include links to sample projects configured more or less this way.

http://www.sonatype.com/books/mvnref-book/reference/public-book.html

Em 07-04-2011 10:30, Adam Gibbons escreveu:

Alex, that's perfect! Exactly the kind of thing I'm trying to do myself.
Would you mind posting your reactor, war, jar and parent poms please? I'd
really like to see a working example of this in action.

Cheers,
Adam

On 7 April 2011 09:51, Alex Lopezalo...@flordeutopia.pt wrote:


Here we have a similar setup, we manage to build everything into a WAR
including dependent jars using reactor/assembly project:

BTW, we use separate poms for parent (inheritance) and reactor
(multi-module), which I think makes sense as all sub-modules have the
parent
as parent but not one sub-module even knows about the reactor one (which
serves just to build everything).

So the reactor project lists ALL other modules (besides parent, only
used
to inherit properties). Not a module depends or inherits from reactor
module. The war module depends on some jars, which in turn depend on
other
jars etc.

So when we issue mvn install or mvn deploy in the reactor
project, it
will first see the dependency graph going from the war to everything
else,
and first install/deploy the needed things (jars) so, when it reaches
the
war for packaging, all the necesary jars have already been
installed/deployed, and are available as dependencies to the war,
which gets
packaged and installed/deployed as expected.

So I thing the tricky part for us to see about reactor and parent and
modules and all this stuff was separating concerns: our parent only
used to
inherit, the reactor only used to lists all other modules, and the build
order is determined by a correctly specified dependency graph (the war
depends on jars, etc).

With multiple wars I believe it should behave the same way, if
dependencies
spring from the wars to the jars they depend on (and thus when building
separate graphs are calculated each culminating in a war with other
dependencies included inside as jars).

Em 06-04-2011 15:46, Wendy Smoak escreveu:

On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com

wrote:


Also I refer you to:
http://maven.apache.org/plugins/maven-assembly-plugin/which states
that it can create distributions in the war format.



It *can* but you generally only need it if the war plugin is not doing
what you need.

When building a war, the war plugin is the logical choice _until_ you
run into some complication that the war plugin can't solve.



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Re: The maven-assembly-plugin and a large complex project.

2011-04-07 Thread Alex Lopez
BTW the mvn install or mvn deploy is done in our case on the top 
directory, the reactor one, and it gets propagated to the others in 
appropriate order by the reactor module.


Em 07-04-2011 11:16, Alex Lopez escreveu:

I don't think I can post the full thing, but I'll post some cut down
version so you can make an idea.

BTW, I got the idea from the documentation on sonatype site, look into
maven reference and maven by example books, available for free. They
include links to sample projects configured more or less this way.

http://www.sonatype.com/books/mvnref-book/reference/public-book.html

Em 07-04-2011 10:30, Adam Gibbons escreveu:

Alex, that's perfect! Exactly the kind of thing I'm trying to do myself.
Would you mind posting your reactor, war, jar and parent poms please? I'd
really like to see a working example of this in action.

Cheers,
Adam

On 7 April 2011 09:51, Alex Lopezalo...@flordeutopia.pt wrote:


Here we have a similar setup, we manage to build everything into a WAR
including dependent jars using reactor/assembly project:

BTW, we use separate poms for parent (inheritance) and reactor
(multi-module), which I think makes sense as all sub-modules have the
parent
as parent but not one sub-module even knows about the reactor one (which
serves just to build everything).

So the reactor project lists ALL other modules (besides parent, only
used
to inherit properties). Not a module depends or inherits from reactor
module. The war module depends on some jars, which in turn depend on
other
jars etc.

So when we issue mvn install or mvn deploy in the reactor
project, it
will first see the dependency graph going from the war to everything
else,
and first install/deploy the needed things (jars) so, when it reaches
the
war for packaging, all the necesary jars have already been
installed/deployed, and are available as dependencies to the war,
which gets
packaged and installed/deployed as expected.

So I thing the tricky part for us to see about reactor and parent and
modules and all this stuff was separating concerns: our parent only
used to
inherit, the reactor only used to lists all other modules, and the build
order is determined by a correctly specified dependency graph (the war
depends on jars, etc).

With multiple wars I believe it should behave the same way, if
dependencies
spring from the wars to the jars they depend on (and thus when building
separate graphs are calculated each culminating in a war with other
dependencies included inside as jars).

Em 06-04-2011 15:46, Wendy Smoak escreveu:

On Wed, Apr 6, 2011 at 10:44 AM, Adam Gibbonsadam.s.gibb...@gmail.com

wrote:


Also I refer you to:
http://maven.apache.org/plugins/maven-assembly-plugin/which states
that it can create distributions in the war format.



It *can* but you generally only need it if the war plugin is not doing
what you need.

When building a war, the war plugin is the logical choice _until_ you
run into some complication that the war plugin can't solve.



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org






-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Delivery Status Notification (Failure)

2011-04-05 Thread Alex Lopez

Jaina,

if maven works in another machine it might be some configuration either in:

- Your settings.xml file ~/.m2/settings.xml
- Maven's global settings.xml under maven's install dir {$M2_HOME}/conf
- Other files under Maven installation dir
- M2Eclipse configuration (Preferences-Maven)

Alex

Em 05-04-2011 08:57, jy hu escreveu:

HI,

Yes, I re-download the maven (latest version apache-maven-3.0.3), and
re-config the environment variables.
the same problem as below:

C:\Users\hujunyingmvn --version
javac: invalid flag: -Dclassworlds.conf=Q:\my
work\apache-maven-3.0.3\bin\m2.con
f
Usage: javacoptions  source files
use -help for a list of possible options

  But I copy the Maven to another machine, I can get the correct info with
the same way.

C:\Users\administratormvn --version
Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)
Maven home: C:\apache-maven-3.0.3
Java version: 1.6.0_02, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_02\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: windows vista, version: 6.1, arch: x86, family: windows

Best,
Jaina


On Tue, Apr 5, 2011 at 12:06 PM, Wayne Faywayne...@gmail.com  wrote:


   I just set a MAVEN_OPTS: -Xmx1024m -Xms512m, an error was given like

last

  time.Has anyone ever met this?  added that the MAVEN_OPTS was not set

when

  mvn worked before.Please,
  C:\Users\lenovomvn --version
   javac: invalid flag: -Xmx1024m


If you open mvn.bat in Notepad, you will not find the word javac
anywhere in the file. Unless of course you edited this file and broke
it. There is only mention of java.exe in my mvn.bat file.

I suggest re-downloading and re-installing Maven, and then not playing
with the batch files.

Wayne

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org