Mike,

Ah that’s what happens when we make assumptions. I assumed the build file 
instructions were safe to follow. I originally did mvn install when I installed 
Maven and did the build the other day, that’s why my build worked. Why you ran 
into the error seems to be clear now. It isn’t platform dependent, I was able 
to replicate your error on OS X and Ubuntu. It has to do with the Maven 
lifecycle.

Here is the default Maven lifecycle:

validate - validate the project is correct and all necessary information is 
available
compile - compile the source code of the project
test - test the compiled source code using a suitable unit testing framework. 
These tests should not require the code be packaged or deployed
package - take the compiled code and package it in its distributable format, 
such as a JAR.
integration-test - process and deploy the package if necessary into an 
environment where integration tests can be run
verify - run any checks to verify the package is valid and meets quality 
criteria
install - install the package into the local repository, for use as a 
dependency in other projects locally
deploy - done in an integration or release environment, copies the final 
package to the remote repository for sharing with other developers and projects.
Maven runs each phase of the lifecycle up to the phase you specify, so if you 
say package, it stops at package. If you say install, it stops at install. In a 
multi-module project build like James, it runs through the lifecycle for each 
module, building as it goes.

Based on the missing folders error in your original build, I think the 
james-server module was expecting to see the other modules installed in the 
Maven .m2 repository, but they were not installed, and the build failed.

The proper thing to do, then, is run mvn clean install, which will build and 
install all the modules before building the server. 

Thanks for your feedback. I will make new videos today with the updated 
instructions.I will also note the updated svn repository location based on the 
re-direct. Looks like the viewvc folder is meant only for browsing.

Robert


On Oct 20, 2014, at 10:13 AM, Mike lepore <michael.lepore.w...@gmail.com> wrote:

> I googled the error, and it looks Eric Charles suggested a while back to 
> replace package with install.  That seemed to work for me as well, and after 
> that, I am now able use the maven package goal as well.  I still have to come 
> up to speed on Maven
> 
> mvn clean install -DskipTests=true
> 
> thanks,
> Mike Lepore
> 
> On 10/20/2014 12:24 PM, Mike lepore wrote:
>> Robert,
>> 
>> thanks for help.  Admittedly, I don't have too much experience with Maven.  
>> I've always just used Apache Ant by itself to make builds like this.  So, 
>> this is helping me get more familiar with Maven
>> 
>> I gave the build procedure a try, but had a couple of problems.  I tried it 
>> on IBM linux, which is a dist of Red Hat RHEL, and also tried it on Ubuntu 
>> 14.04.  Both builds failed, but IBM Linux also forced me to use a different 
>> repository for the svn checkout:
>> 
>> IBM:
>> [mike@oc0742025407 james]$ svn checkout 
>> http://svn.apache.org/viewvc/james/server/trunk/
>> svn: Repository moved permanently to 
>> 'http://svn.apache.org/repos/asf//james/server/trunk'; please relocate
>> [mike@oc0742025407 james]$ uname -a
>> Linux oc0742025407.ibm.com 2.6.32-431.30.1.el6.x86_64 #1 SMP Wed Jul 30 
>> 14:44:26 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
>> 
>> So I used the other repository as the command suggested which appears t be a 
>> slightly different version.  However, when running maven I got this:
>> 
>> [ERROR] Failed to execute goal 
>> org.apache.karaf.tooling:features-maven-plugin:2.3.0:add-features-to-repo 
>> (add-features-to-repo) on project james-karaf-distribution: Error populating 
>> repository: 
>> /home/mike/.m2/repository/org/apache/james/karaf/james-karaf-features/3.0.0-beta5-SNAPSHOT/james-karaf-features-3.0.0-beta5-SNAPSHOT-features.xml
>>  (No such file or directory) -> [Help 1]
>> 
>> Ubuntu:
>> the svn command you provided went ok, but still got the same mvn error
>> [ERROR] Failed to execute goal 
>> org.apache.karaf.tooling:features-maven-plugin:2.3.0:add-features-to-repo 
>> (add-features-to-repo) on project james-karaf-distribution: Error populating 
>> repository: 
>> /home/mike/.m2/repository/org/apache/james/karaf/james-karaf-features/3.0.0-beta5-SNAPSHOT/james-karaf-features-3.0.0-beta5-SNAPSHOT-features.xml
>>  (No such file or directory) -> [Help 1]
>> 
>> 
>> looks like there's probably a little more setup I need to do?  Or maybe just 
>> a difference between mac and linux?
>> 
>> 
> 

Reply via email to