Yeah, this is kinda nuts, even after running an install, I see things getting rebuilt:
[INFO] Building withdrawalEJB [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ ---- [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] Compiling 3 source files to E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\classes [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] No sources to compile [INFO] [surefire:test] [INFO] No tests to run. [INFO] [jar:jar] [INFO] Building jar: E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\withdrawalEJB- 1.0-SNAPSHOT.jar [INFO] [install:install] [INFO] Installing E:\work\39-FUSED\frontoffice\ltyApp\ejb\withdrawal\target\withdrawalEJB- 1.0-SNAPSHOT.jar to E:\work\m2\Repository\lty\withdrawa Shouldn't this happen just once? Why each time? -----Original Message----- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 9:59 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? So in essence you're suggesting shutting of unittests via a switch (most developers already think it takes too long and use -Dtest=asdf). I personally find this unacceptable. I still think it's silly that mvn tries to build an ear/war/ejbs when all it needs are the underlying classes. There's part of the picture I think I'm not emphasizing enough which is the inherently long drawn out process building an atg app requires (their assembly phase) which we've linked to the package lifecycle goal. Having to do an install of each module takes too much time moving around and doing an install of everything takes too long if all you want to do is compile. To build an ejb, the underlying java source needs to be compiled and stashed somewhere doesn't it? I just still don't understand why there would be this dependency on an ear file to simply compile something in one of the main applications. I have a feeling this will be the straw that breaks the development camels back. -----Original Message----- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 8:05 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? Hopefully they're all using Eclipse and they can run 'mvn eclipse:eclipse' to generate the Eclipse project files they need so that they can compile their Java code as they develop. You don't need to build your EJB, WAR and EAR files just to get your classes to compile UNLESS other modules depend on them. For example, if I have modules A, B and C and module B is dependent on A but C is independent of both of them, I can build C without needing access to artifacts from A and B. If, however, I want to build B, I will need access to A.jar. A.jar would normally come from my local repository since I've run 'mvn clean install' in module A. The whole point is that you've decided when designing your project structure that A, B and C are separately managed modules (with dependencies between them). Therefore, to access A's classes from B you need to package them in some way. In Maven, the way to do this is to package them as a jar file and place them in your local repository (and eventually in your snapshot repository and, finally, in your production repository). As for running tests, developers can turn off running the tests during their development cycle (see the Maven Website for details). The actual package/install steps of creating a jar and copying it to a local repository are very quick so no developer is really going to notice the lost time. -----Original Message----- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 February 2007 10:37 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Yeah, I mentioned cruisecontrol, just not looking forward to telling developers they need to run the install process now even if all they want is a simple compile. I still don't see any good reason why you'd have to build up an ejb file (or war or ear) just to get your classes to compile. These things shouldn't even be attempted until the package stage. This seems like a shortcoming. -----Original Message----- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 6:29 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? You need to run 'mvn install' at least once to ensure your dependencies are in a repository. In fact, if your cruisecontrol build is running on another machine, you will need to run 'mvn deploy' at least once to get a snapshot in your corporate repository. Then, you can run 'mvn compile' at will, as long as your Java sources don't change enough to make your compiles fail. Having said that, I would recommend that you run 'mvn clean deploy' every night so that you are getting a complete build and test-cycle run every night (or use a continuous integration server like Continuum). You can also add the 'findbugs' report to your projects so this is run for you automatically as well. -----Original Message----- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 February 2007 10:18 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? So if (in my case) we do a compile prior to running findbugs each night (a case where we DON'T need an ear file), I'm going to have to start performing a "mvn install" instead? P.S - this is running via cruisecontrol and always from the top directory. We're very used to an ant based build where we can run various stages as we wish. Compile being a very desirable thing. If we can no longer run compile to compile source without having to wait for a much longer process (unit tests, site building, atg assembler, ejb building, war building then finally ear building), I think I may be in a bind (being the soul release engineer forced to support maven 2). Can I forcefully de-couple these two things? -----Original Message----- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 6:05 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? It hasn't tried to build the EAR yet: > [INFO] Building ltyApp_ear > [INFO] task-segment: [compile] You have specified 'mvn compile' in the EAR project and it is simply trying to download dependencies at this stage so it can do the compile. My suggestion would be to not run the compile phase explicitly, particularly in the EAR module, but run 'mvn install' even if you are building virtually empty artifacts for the other components. In other words, get the whole build process working correctly first. Alternatively, the next best thing to do would be to remove the EAR module from your modules list for now until you have everything else to a stage where the repository has all of the artifacts required to build an EAR. -----Original Message----- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 February 2007 9:42 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Wait - even if I'm simply doing a compile? Why should it start trying to build an ear? I tried a "mvn compile" that results in all kinds of failures cause it tries to build up an ear (and there's no war/ejbs to include). The ear file building is linked to the compile lifecycle phase? -----Original Message----- From: Greg Jones [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 4:40 PM To: 'Maven Users List' Subject: RE: compile tries to bundle up the ear - should it? The modules need to be downloaded since they are dependencies at compile time (the default), even in an EAR package. Modules will never be picked up from their target directories (part of the design of Maven). You need to run 'mvn install' on the other modules to ensure they are in your local repository at least before running a build in the EAR module. Hope this helps. -----Original Message----- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 February 2007 8:19 AM To: Maven Users List Subject: RE: compile tries to bundle up the ear - should it? Still haven't seen any response - this has us wedged, can anyone shed any light on this for me? -----Original Message----- From: EJ Ciramella [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 31, 2007 6:23 PM To: Maven Users List Subject: compile tries to bundle up the ear - should it? I'm running just compile but one module that has an ear artifact is trying to bundle up the ear file (which subsequently fails because the war and ejbs don't exist). Is this supposed to happen or is this something I've misconfigured: [INFO] ------------------------------------------------------------------------ ---- [INFO] Building ltyApp_ear [INFO] task-segment: [compile] [INFO] ------------------------------------------------------------------------ ---- Downloading: file:\\build.corp.upromise.com/maven2/lty/upErrorEJB/1.0-SNAPSHOT/upErro rEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/salesscriptEJB/1.0-SNAPSHOT/sa lesscriptEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/transferEJB/1.0-SNAPSHOT/trans ferEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/transactionEJB/1.0-SNAPSHOT/tr ansactionEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/CSREJB/1.0-SNAPSHOT/CSREJB-1.0 -SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/upAdminEJB/1.0-SNAPSHOT/upAdmi nEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/inboundenrollmentEJB/1.0-SNAPS HOT/inboundenrollmentEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/authserverEJB/1.0-SNAPSHOT/aut hserverEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/communityEJB/1.0-SNAPSHOT/comm unityEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/accountGuestEJB/1.0-SNAPSHOT/a ccountGuestEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/testcellEJB/1.0-SNAPSHOT/testc ellEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/enrollmentEJB/1.0-SNAPSHOT/enr ollmentEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/partnerEJB/1.0-SNAPSHOT/partne rEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/groceryEJB/1.0-SNAPSHOT/grocer yEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/messageEJB/1.0-SNAPSHOT/messag eEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/memberProfileEJB/1.0-SNAPSHOT/ memberProfileEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/ltyWebApp/1.0-SNAPSHOT/ltyWebA pp-1.0-SNAPSHOT.war [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) Downloading: file:\\build.corp.upromise.com/maven2/lty/withdrawalEJB/1.0-SNAPSHOT/wit hdrawalEJB-1.0-SNAPSHOT.jar [WARNING] Unable to get resource from repository central (file:\\build.corp.upromise.com/maven2) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>lty</groupId> <artifactId>ltyApp</artifactId> <version>1.0-SNAPSHOT</version> </parent> <artifactId>EAR</artifactId> <packaging>ear</packaging> <name>ltyApp_ear</name> <url>http://www.upromise.com</url> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>lty</groupId> <artifactId>oldSource</artifactId> <version>1.0-SNAPSHOT</version> <type>jar</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>accountGuestEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>authserverEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>communityEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>CSREJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>enrollmentEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>groceryEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>inboundenrollmentEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>memberProfileEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>messageEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>partnerEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>salesscriptEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>testcellEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>transactionEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>transferEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>upAdminEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>upErrorEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>withdrawalEJB</artifactId> <version>1.0-SNAPSHOT</version> <type>ejb</type> </dependency> <dependency> <groupId>lty</groupId> <artifactId>ltyWebApp</artifactId> <version>1.0-SNAPSHOT</version> <type>war</type> <!--scope>system</scope> <systemPath> ${work.dir}/frontoffice/ltyApp/ltyWebApp/target </systemPath--> </dependency> </dependencies> <build> <finalName>UPIntermediate.ear</finalName> <resources> <resource> <directory>../ltyWebApp/target/uprweb.war</directory> <targetPath> /uprweb.war </targetPath> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>2.0</version> </dependency> <!--dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-archiver</artifactId> <version>2.2</version> </dependency--> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> <version>1.0.4</version> </dependency> </dependencies> <configuration> <displayName>ltyApp_UPIntermediate_EAR</displayName> <description>This is Upromsie EAR file</description> <version>1.0-SNAPSHOT</version> <modules> <ejbModule> <groupId>lty</groupId> <artifactId>accountGuestEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>authserverEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>communityEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>CSREJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>enrollmentEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>groceryEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId> inboundenrollmentEJB </artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>memberProfileEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>messageEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>partnerEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>salesscriptEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>testcellEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>transactionEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>transferEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>upAdminEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>upErrorEJB</artifactId> </ejbModule> <ejbModule> <groupId>lty</groupId> <artifactId>withdrawalEJB</artifactId> </ejbModule> <!-- javaModule> <groupId>lty</groupId> <artifactId>oldSource</artifactId> <bundleDir>ltyAppClasses</bundleDir> </javaModule--> <webModule> <groupId>lty</groupId> <artifactId>ltyWebApp</artifactId> <contextRoot>/</contextRoot> </webModule> </modules> </configuration> </plugin> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>assembler</id> <phase>package</phase> <configuration> <tasks> <ant antfile="build.xml" target="create.application.xml"> </ant> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> --------------------------------------------------------------------- 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] --------------------------------------------------------------------- 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] --------------------------------------------------------------------- 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] --------------------------------------------------------------------- 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]