Re: [mevenide-dev] [jira] Created: (MEVENIDE-605) NetBeans public profile spoils multi-module builds

Daniel Mutch <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.mevenide.devel
Message-ID <[email protected]>

The problem is with the assembly process and is an issue with maven itself.
Essentially the assembly triggers a second build run through all child
projects. When this second run reaches the war it can't build it because it
depends on the jar project. Although the jar has been built the assembly
stage (and hence the second build run) occurs before the jar is installed
into your local repository (hence why you see this after clearing out the
local repository). Maven has a built in work around for this. In the
maven-assmbly-plugin section of the netbeans-public profile you can change
the goal from directory to directory-inline. This prevents the second build
parse and hence solves the problem.

cheers
Dan



JIRA jira-yCVjj/[email protected] wrote:
> 
> NetBeans public profile spoils multi-module builds
> --------------------------------------------------
> 
>                  Key: MEVENIDE-605
>                  URL: http://jira.codehaus.org/browse/MEVENIDE-605
>              Project: mevenide
>           Issue Type: Bug
>           Components: mevenide-netbeans
>     Affects Versions: NB_3.0
>             Reporter: Grzegorz Borkowski
>             Assignee: Milos Kleint
>          Attachments: mavenJarBuildOK.txt,
> mavenMultimoduleBuildFailed.txt, mavenMultimoduleBuildOK.txt
> 
> I have project with one main module of type "pom", and it contains two
> submodules, one is jar, second is war. War has dependency on jar. I want
> to be able to run a war on a server, and also run jar separately, as it
> has one main class.
> I also want to be able to build the whole project by building the parent
> module.
> I start with empty local repo, and build (from NetBeans) the parent
> module.Build is successful - all 3 modules are build.
> Then I want to run my jar, so go to project properties, add configuration
> for run. Netbeans creates in my pom.xml the profile "netbeans-public".
> Now I clean mu local repo, and try again build the whole project from IDE
> by building parent module. Build fails - war module complains about not
> found jar module in local repo. (But it will succeed from command line.)
> 
> It seems that the profile created for running jar by NetBeans spoils the
> build, and the "install" is not called on subbuild of jar module. If I try
> to build (always from IDE) the jar module itself, it is installed to local
> repo. But in multimodule build it is not. The problem is in following
> section generated by IDE in pom.xml profile:
> <plugin>
>                         <artifactId>maven-assembly-plugin</artifactId>
>                         <executions>
>                             <execution>
>                                 <id>nb</id>
>                                 <phase>package</phase>
>                                 <goals>
>                                     <goal>directory</goal>
>                                 </goals>
>                                 <configuration>
>                                    
> <descriptor>${basedir}/src/main/assemblies/netbeans-run.xml</descriptor>
>                                     <finalName>executable</finalName>
>                                 </configuration>
>                             </execution>
>                         </executions>
>                     </plugin>
> After removing this section, build is successful (but running jar fails,
> obviously).
> 
> I attach three files with output: first with multimodule build before
> creating netbeans profile (build ok), second after creating profile (build
> failed) and third with building only jar module (build ok).
> 
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://jira.codehaus.org/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
>         
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28MEVENIDE-605%29-NetBeans-public-profile-spoils-multi-module-builds-tp15335189p15407108.html
Sent from the mevenide - dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.