On 24/05/10 22:20, Mark Combellack wrote: > On 24/05/10 22:09, Mark Combellack wrote: > >> On 24/05/10 12:37, Simon Nash wrote: >> >> >>> Luciano Resende wrote: >>> >>> >>>> On Sun, May 23, 2010 at 1:52 PM, Raymond Feng <[email protected]> >>>> wrote: >>>> >>>> >>>>> I tried to run the build on Windows and everything works. >>>>> For the Mac OS issue, I ran a build from the root first and I don't see >>>>> anything copied into binaries/target. Then I tried to run the build >>>>> again >>>>> from binaries/ and binaries/bundle. None of them helped. >>>>> I saw the message: >>>>> [INFO] Copying files to >>>>> /Users/rfeng/Projects/tuscany/sca-java-1.x/tags/travelsample-1.0-RC1/binaries/target/. >>>>> >>>>> But there is nothing under binaries (not even the target folder). >>>>> I found out that the "binaries/target" folder is not created by >>>>> maven during >>>>> the build on Mac. If I create it manually, then the build successfully >>>>> copies all the files into binaries/target. So a quick workaround is to >>>>> create binaries/target as part of the build. >>>>> Thanks, >>>>> Raymond >>>>> >>>>> >>>> I tried building from the tag, and I'm experiencing the same behavior >>>> (in the same Mac OS environment). I have played with some of the >>>> assembly files trying to fix but didn't seem to find any obvious >>>> solution... >>>> >>>> >>>> >>>> >>> This might a bit tricky for me to debug as I don't have access to Mac >>> OSX. >>> >>> I'd be interested to know if the problem is specific to Mac OSX or also >>> affect other Linux OSs. Could anyone try this? >>> >>> I'm also interested to know which version of maven is producing the >>> failure. I'm using maven 2.0.10. >>> >>> The output directory is set to "../target" in the pom.xml for >>> binaries/bundle >>> using the <outputDirectory> element of the maven-assembly-plugin >>> configuration. >>> There's similar code in the pom.xml files for binaries/jaxws, >>> binaries/ode >>> and binaries/openejb. For some reason on Mac OSX the maven assembly >>> plugin >>> isn't creating this "../target" directory. >>> >>> Some suggestions: >>> >>> 1. In the pom.xml for binaries/bundle, force the creation of the >>> "../target" >>> directory by replacing the current maven-antrun-plugin <plugin> >>> section >>> by the following: >>> >>> <plugin> >>> <artifactId>maven-antrun-plugin</artifactId> >>> <executions> >>> <execution> >>> <id>package-mkdir</id> >>> <phase>package</phase> >>> <configuration> >>> <tasks> >>> <mkdir dir="../target"/> >>> </tasks> >>> </configuration> >>> <goals> >>> <goal>run</goal> >>> </goals> >>> </execution> >>> <execution> >>> <id>install-delete</id> >>> <phase>install</phase> >>> <configuration> >>> <tasks> >>> <delete dir="../target/domainconfig/META-INF" >>> includeemptydirs="true"/> >>> </tasks> >>> </configuration> >>> <goals> >>> <goal>run</goal> >>> </goals> >>> </execution> >>> </executions> >>> </plugin> >>> >>> This works for me on Windows and forces explicit creation of the >>> directory. >>> The build output is as follows: >>> >>> [INFO] Scanning for projects... >>> [INFO] Reactor build order: >>> [INFO] Apache Tuscany SCA Tours Binaries Bundle >>> [INFO] Apache Tuscany SCA Tours Binaries JAX-WS Dependencies for >>> JDK 5 >>> [INFO] Apache Tuscany SCA Tours Binaries ODE Database >>> [INFO] Apache Tuscany SCA Tours Binaries OpenEJB Dependencies >>> [INFO] Apache Tuscany SCA Tours Binaries >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] Building Apache Tuscany SCA Tours Binaries Bundle >>> [INFO] task-segment: [install] >>> [INFO] >>> ------------------------------------------------------------------------ >>> [INFO] [site:attach-descriptor] >>> [INFO] [antrun:run {execution: package-mkdir}] >>> [INFO] Executing tasks >>> [mkdir] Created dir: E:\td\book\rel\travelsample\binaries\target >>> [INFO] Executed tasks >>> [INFO] [assembly:single {execution: distribution-package}] >>> [INFO] Reading assembly descriptor: ../src/main/assembly/bin.xml >>> [INFO] Processing DependencySet (output=util) >>> ...etc. >>> >>> I have placed a version of this file in my >>> people.apache.org/~nash/tuscany/ >>> directory as travelsample-binaries-bundle-pom-patch.xml. Could >>> someone try >>> replacing the binaries/bundle pom.xml from the distribution by this >>> version >>> before running the top-level build of travelsample on Mac OSX to >>> see if this >>> fixes the problem? >>> >>> 2. Instead of using <outputDirectory>../target</outputDirectory> in the >>> maven-assembly-plugin configurations, use >>> <directory>../target</directory> >>> within the <profile> <build> configurations in all of the pom.xml >>> files >>> for the "binaries" subdirectories. I don't like this as much as >>> option 1 >>> because it's a more extensive change and it also has the unfortunate >>> side effect of polluting the binaries/target directory by creating an >>> empty archive-tmp directory there. >>> >>> Simon >>> >>> >>> >> I have just tried this on Ubuntu with a clean checkout of the tag and an >> empty Maven repository. I also do not have any files in the >> binaries/target directories >> >> What I do get is the following: >> >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Building Apache Tuscany SCA Tours Binaries JAX-WS Dependencies >> for JDK 5 >> [INFO] task-segment: [clean, install] >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] [clean:clean {execution: default-clean}] >> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] >> [INFO] [assembly:single {execution: distribution-package}] >> [INFO] Reading assembly descriptor: ../src/main/assembly/bin-jaxws.xml >> *[INFO] Copying files to >> /home/mark/dev/apache/travelsample-1.0-RC1/binaries/target/. >> [WARNING] Assembly file: >> /home/mark/dev/apache/travelsample-1.0-RC1/binaries/target/. is not a >> regular file (it may be a directory). It cannot be attached to the >> project build for installation or deployment. >> *[INFO] [install:install {execution: default-install}] >> [INFO] Installing >> /home/mark/dev/apache/travelsample-1.0-RC1/binaries/jaxws/pom.xml to >> /home/mark/.m2/repository/org/apache/tuscany/sca/scatours-binaries-jaxws/1.0/scatours-binaries-jaxws-1.0.pom >> >> >> Notice the warning about binaries/target/. not being a regular file. >> >> This happens for each of the binaries module builds >> >> I am using Maven 2.2.1 with Sun JDK 1.6.0_20 on Ubuntu 10.04. >> >> >> I've not yet had a chance to look into how I might fix it. >> >> Mark >> >> >> > I think I might have worked out what it is. If you do a mvn clean > install, it does not work because it builds the top level binaries > module last: > > m...@storm:~/dev/apache/travelsample-1.0-RC1/binaries$ mvn install > [INFO] Scanning for projects... > [INFO] Reactor build order: > [INFO] Apache Tuscany SCA Tours Binaries Bundle > [INFO] Apache Tuscany SCA Tours Binaries JAX-WS Dependencies for JDK 5 > [INFO] Apache Tuscany SCA Tours Binaries ODE Database > [INFO] Apache Tuscany SCA Tours Binaries OpenEJB Dependencies > [INFO] Apache Tuscany SCA Tours Binaries > > > However, the other sub modules are writing their output to the ../target > directory which has not yet been created since the top level Binaries > module has not been built yet. > > If I do the following in the Binaries directory, it works for me: > > mvn clean > mkdir target > mvn install > > I then get all the files I expect in the binaries/target directory. > > > Does this fix it on MacOS too? > > Mark > Thinking about this again, perhaps it is the order in which the modules are built when mvn clean install is run. Since the top level Binaries project is run last, the clean for that module will delete the target directory and remove all distributions created by the sub-modules.
Mark
