This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This issue was originally reported by John Eichelsdorfer in 24/Mar/08 at codehaus.org - see more details at http://jira.codehaus.org/browse/MEVENIDE-614 Environment: Netbeans 6.1 Beta, Mevenide 3.1 Nightly from March 17, AppFuse warpath plugin, Java 6.*, Vista/XP =========== Description: =========== Wars fail to compile into each other using the AppFuse plugin within Netbeans embedded environment. Switching from war targets to jar allows the projects to compile, but fail to create a correct end target. Changing to jar targets once while having the pom targets be jars rather then wars while pointing to an external maven will allow the first compile to work. It is possible then to switch back to war files to compile, but classpaths then show up messed up. If I compile from a command line prompt using "mvn install" this works without error or any hitch. It just fails embedded. I have attached an example of the problem. If AppFuse warpath plugin can not work, please suggest a better working solution within Mevenide for unbundling war dependencies and including them in a target holding that dependency. ---------------------------------------------- Comment by Milos Kleint [ 26/Mar/08 08:29 AM ] ---------------------------------------------- I was somewhat successful with adding a dependency of type "classes" to the project (next to "war" of the same id). However the dependent project had to be opened at the same time. http://deadlock.netbeans.org/hudson/job/mevenide/ build #359 and later. however I would suggest extracting all classes that are shared across multiple war files into a separate jar project. That's the recommended/usual approach to dealing with this situation i think. ---------------------------------------------------- Comment by John Eichelsdorfer [ 26/Mar/08 04:35 PM ] ---------------------------------------------------- I have been watching your changes and downloaded #359 and tried it. I think think the new Mevenide loaded correctly, but I hope to have a chance to retest that later tonight. I was still seeing red for classpath resolution. It seemed the same net result in my environment, but I did not try to extract all classes manually as they are all built together in a chained build each time. I used to have a bit more understanding on how warpath works, but I believe it unbundles the war for you and manages this aspect. I am not sure that Netbeans notices where those classes are, however. I need to do some looking around tonight if I can. I sure wish the warpath developer was part of this rather then me, the novice. I will see if I can get them involved as it would be a benefit to have the IDE work for AppFuse projects I think. ---------------------------------------------- Comment by Milos Kleint [ 31/Mar/08 03:03 AM ] ---------------------------------------------- yes, the warpath does unbundle the war file but only when you actually build the project (in the "generate-sources" phase). It will then add a dependency to the MavenProject instance that is being build, so that the compiler plugin that gets triggered in the next phase gets it. did you add a <type>classes</type> typed dependency for each <type>war</type> type dependency you have in your project? Only then will the #359+ builds work (sort of) ---------------------------------------------------- Comment by John Eichelsdorfer [ 31/Mar/08 10:08 AM ] ---------------------------------------------------- You mean in addition to the war type dependency? If so, I have not tried that. I didn't realize you could have two dependencies like that on the same code. I will give it a shot later and respond. ---------------------------------------------------- Comment by John Eichelsdorfer [ 31/Mar/08 07:13 PM ] ---------------------------------------------------- Well, I have just tried what you mentioned. This is what it looks like in my one sibling pom file. <dependencies> <dependency> <groupId>com.jmjmedia.jobbank</groupId> <artifactId>jobbank-core</artifactId> <version>3.0-SNAPSHOT</version> <type>war</type> <!-- <type>war</type> --> </dependency> <dependency> <groupId>com.jmjmedia.jobbank</groupId> <artifactId>jobbank-core</artifactId> <version>3.0-SNAPSHOT</version> <type>warpath</type> </dependency> <dependency> <groupId>com.jmjmedia.jobbank</groupId> <artifactId>jobbank-core</artifactId> <version>3.0-SNAPSHOT</version> <type>classes</type> </dependency> </dependencies> artifact org.apache.maven.plugins:maven-antrun-plugin: checking for updates from appfuse Using version: 1.1 of plugin: org.apache.maven.plugins:maven-antrun-plugin [WARN]Attempting to build MavenProject instance for Artifact (org.appfuse:maven-warpath-plugin:2.0.2-20080308.111818-54) of type: maven-plugin; constructing POM artifact instead. generate-sources [WARN]Attempting to build MavenProject instance for Artifact (org.appfuse:maven-warpath-plugin:2.0.2-20080308.111818-54) of type: maven-plugin; constructing POM artifact instead. [warpath:add-classes] process-resources [resources:resources] Using default encoding to copy filtered resources. compile ------------------------------------------------------------------------ Reactor Summary: ------------------------------------------------------------------------ JMJ Media Development Parent .......................... SUCCESS [1.329s] JMJ Media Common Development Library .................. SUCCESS [2.710s] JMJ Media Common Model View Controller Library ........ SUCCESS [1.389s] JMJ Media Payment Gateway ............................. SUCCESS [1.293s] JMJ Media Product and Service Platform ................ SUCCESS [5.925s] Jobbank Core Library .................................. SUCCESS [8.444s] Jobbank USA ........................................... FAILED [4.780s] JMJ Media Top Level Project ........................... NOT BUILT JMJ Media Top Level Project ........................... NOT BUILT ------------------------------------------------------------------------ [ERROR] [ERROR] Transitive dependency resolution for scope: compile has failed for your project. Error message: Missing: ---------- 1) com.jmjmedia.sp:jmjdev-psplatform:warpath:3.0-SNAPSHOT [ERROR] [ERROR] Try downloading the file manually from the project website. [ERROR] [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=com.jmjmedia.sp -DartifactId=jmjdev-psplatform -Dversion=3.0-SNAPSHOT -Dpackaging=warpath -Dfile=/path/to/file [ERROR] [ERROR] Alternatively, if you host your own repository you can deploy the file there: [ERROR] mvn deploy:deploy-file -DgroupId=com.jmjmedia.sp -DartifactId=jmjdev-psplatform -Dversion=3.0-SNAPSHOT -Dpackaging=warpath -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [ERROR] [ERROR] Path to dependency: [ERROR] 1) com.jmjmedia.jobbank.usa:jobbank-usa:war:3.0-SNAPSHOT [ERROR] 2) com.jmjmedia.jobbank:jobbank-core:warpath:3.0-SNAPSHOT [ERROR] 3) com.jmjmedia.sp:jmjdev-psplatform:warpath:3.0-SNAPSHOT [ERROR] [ERROR]---------- 1 required artifact is missing. for artifact: [ERROR] com.jmjmedia.jobbank.usa:jobbank-usa:war:3.0-SNAPSHOT [ERROR] [ERROR]from the specified remote repositories: [ERROR] appfuse (http://static.appfuse.org/repository), central (http://repo1.maven.org/maven2) [ERROR] Group-Id: com.jmjmedia.jobbank.usa Artifact-Id: jobbank-usa Version: 3.0-SNAPSHOT ---------------------------------------------------- Comment by John Eichelsdorfer [ 31/Mar/08 07:45 PM ] ---------------------------------------------------- The result was a little worse then I expected. Not only didn't it work for internal or external builds, but also it prevented me from switching to <type>jar</type> instead of war which normally would have at least allowed me to see the class paths resolve (though it would not properly handle the war manipulation). If there is any remotely easier way to do this let me know!!! ---------------------------------------------------- Comment by John Eichelsdorfer [ 03/Jun/08 10:26 AM ] ---------------------------------------------------- I am noticing a number of bugs were taken off of the project release and placed back into the pool, including this one. I don't know much about how these plug-ins work, but helping solve this would save me much time and allow for much more complicated builds. My current project has a hierarchy with 7 leaf modules. Let me know if there anything I can do to help with this. ---------------------------------------------- Comment by Milos Kleint [ 04/Jun/08 12:25 AM ] ---------------------------------------------- well, I think the problem is primarily on the side of the warpath plugin as far as I'm concerned, unfortunately. It's breaking the declarative nature of POMs.
...I am linking the following file which resides in Jira system: http://jira.codehaus.org/secure/attachment/33402/Demo.zip
filed with the war-path-plugin att appfuse under http://issues.appfuse.org/browse/APF-645 as I already mentioned I consider it to be primarily an issue on the side of the plugin that breaks declarative nature of pom. AFAIK it might even stop working in maven 3.x
NetBeans.org Migration: changing resolution from LATER to WONTFIX