AW: Classloading issues in maven plugin with custom lifecycle mapping
Sure I do ... It's an Apache Project ... you could reproduce by doing the following: 1. Checkout apache flex falcon from https://git-wip-us.apache.org/repos/asf/flex-falcon.git 2. switch to the "feature/maven-migration" branch 3. run the "migrate-to-maven.sh" script which moves stuff around Now it should be a valid Maven project. As I use a maven extension in the ".mvn" directory, you have to have at least Maven 3.3.1. I identified some modules that need to be built prior to running the build, after the first release I will separate them from the project as they should not change very often. They are built via the "minimal" profile: mvn install -P minimal The problem occurs if you build both of the main parts in one build: mvn clean install -P compiler,externs -DskipTests (You should skip the tests, as the build does have dependencies on the Flashplayer and skiping the tests, doesn't have an effect on the success/failure of the build) You should get a CNFE when building the externs, but if you just build the externs (by only activating the externs profile), all is good. Chris Von: Robert Scholte Gesendet: Dienstag, 12. April 2016 20:09 An: Maven Developers List Betreff: Re: Classloading issues in maven plugin with custom lifecycle mapping Hi, do you have an example project (e.g. at github) to reproduce it? Not sure if this is the issue, but maven-plugins cannot be part and used by a multimodule project. Before a project can be built, all plugins must be resolved. This shouldn't be an issue, since a maven-plugin should have a different lifecycle compared to a multimodule-project using it. thanks, Robert On Tue, 12 Apr 2016 15:16:01 +0200, Christofer Dutz wrote: > Hi, > > > I am currently working on converting Apache Flex from Ant to Maven. I > have managed to convert all of the Ant stuff in our newest SDK. I even > built a new maven plugin for doing the Flex compilation. All parts seem > to be working great. > > > The build consists of: > > - A compiler > > - Some Framework libs that are build using the compiler > > > The maven plugin is not part of the build. The maven plugin has a > plugin-dependency to the compiler artifact. It is used in the framework > modules to build the flex artifacts. > > > Now if I just build the compiler or I just build the framework, all > works fine. But if I build compiler and framework in the same build, the > flex maven plugin complains about not being able to find the classes of > the compiler. The dump of the classpath lists the compiler.jar, but it > doesn't seem to be able to load any classes from it. If I take the > context classloader inside the plugin and create a new instance with the > exact same URLs, I am able to manually load the class. > > > I assume that this is due to the fact that the compiler jar is replaced > during the build after getting a handle to the jar file and before using > it. But that is just a well educated guess. Is there anything I could do > to make this build work? > > > I am also having builds randomly fail because artifacts that are used b > plugins are replaced during the build, but I couldn't quite pin the > problem down to a cause. > > > Probably when I asked this question on the user list, this was too > specific for that list, as I didn't get a single response. Hopefully on > this list it will be different :-) > > > I would really appreciate a little Help here ... It's definitely worth > at least a beer in Vancouver ;-) > > > Chris - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Re: Classloading issues in maven plugin with custom lifecycle mapping
Hi, do you have an example project (e.g. at github) to reproduce it? Not sure if this is the issue, but maven-plugins cannot be part and used by a multimodule project. Before a project can be built, all plugins must be resolved. This shouldn't be an issue, since a maven-plugin should have a different lifecycle compared to a multimodule-project using it. thanks, Robert On Tue, 12 Apr 2016 15:16:01 +0200, Christofer Dutz wrote: Hi, I am currently working on converting Apache Flex from Ant to Maven. I have managed to convert all of the Ant stuff in our newest SDK. I even built a new maven plugin for doing the Flex compilation. All parts seem to be working great. The build consists of: - A compiler - Some Framework libs that are build using the compiler The maven plugin is not part of the build. The maven plugin has a plugin-dependency to the compiler artifact. It is used in the framework modules to build the flex artifacts. Now if I just build the compiler or I just build the framework, all works fine. But if I build compiler and framework in the same build, the flex maven plugin complains about not being able to find the classes of the compiler. The dump of the classpath lists the compiler.jar, but it doesn't seem to be able to load any classes from it. If I take the context classloader inside the plugin and create a new instance with the exact same URLs, I am able to manually load the class. I assume that this is due to the fact that the compiler jar is replaced during the build after getting a handle to the jar file and before using it. But that is just a well educated guess. Is there anything I could do to make this build work? I am also having builds randomly fail because artifacts that are used b plugins are replaced during the build, but I couldn't quite pin the problem down to a cause. Probably when I asked this question on the user list, this was too specific for that list, as I didn't get a single response. Hopefully on this list it will be different :-) I would really appreciate a little Help here ... It's definitely worth at least a beer in Vancouver ;-) Chris - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
Classloading issues in maven plugin with custom lifecycle mapping
Hi, I am currently working on converting Apache Flex from Ant to Maven. I have managed to convert all of the Ant stuff in our newest SDK. I even built a new maven plugin for doing the Flex compilation. All parts seem to be working great. The build consists of: - A compiler - Some Framework libs that are build using the compiler The maven plugin is not part of the build. The maven plugin has a plugin-dependency to the compiler artifact. It is used in the framework modules to build the flex artifacts. Now if I just build the compiler or I just build the framework, all works fine. But if I build compiler and framework in the same build, the flex maven plugin complains about not being able to find the classes of the compiler. The dump of the classpath lists the compiler.jar, but it doesn't seem to be able to load any classes from it. If I take the context classloader inside the plugin and create a new instance with the exact same URLs, I am able to manually load the class. I assume that this is due to the fact that the compiler jar is replaced during the build after getting a handle to the jar file and before using it. But that is just a well educated guess. Is there anything I could do to make this build work? I am also having builds randomly fail because artifacts that are used b plugins are replaced during the build, but I couldn't quite pin the problem down to a cause. Probably when I asked this question on the user list, this was too specific for that list, as I didn't get a single response. Hopefully on this list it will be different :-) I would really appreciate a little Help here ... It's definitely worth at least a beer in Vancouver ;-) Chris
Re: issues in maven
On Wed, Aug 1, 2012 at 4:38 PM, bshibin wrote: > Hi, > I am new to maven... > I created java spring hibernate project.. and i kept all .java files in this > path > Myapplication\src\main\java\com\mycompany > and create resources, webapp folders in Myapplication\src\main > and inside resources i created 3 folders hibernate, properties and spring. > in hibernate i kept all .hbm.xml files, in properties all properties files, > and in spring again i created 3 folders beans, config and database. > in beans i kept dispatch-servlet.xml and in database i kept > hibernate.cfg.xml. > in webapp i created WebINF\pages inside WebINF i kept web.xml and inside > the pages folder i kept all jsp pages... > > After this using the command mvn clean install -U -U and it shows BUILD > SUCCESS. > then using this command mvn war : war. for creating the war. > then i deployed the war file in localhost 8080. then I got the index page of > my application.. then after clicking any link on the index page it shows 500 > error.. > Im attaching my pom.xml and the error log from the tomcat also :) Please post this to the Users list at us...@maven.apache.org This list is for developing Maven rather than using it. You might also benefit from reading the freely available books at http://maven.apache.org/articles.html Paying particular attention to the sections on Maven builds one artifact per project and how war projects can be setup - you shouldn't need to run "mvn war:war". You should also try building your war by hand and make sure that works. Then you can compare what maven is building with what you know is working and determine how to fix that. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org
issues in maven
Hi, I am new to maven... I created java spring hibernate project.. and i kept all .java files in this path Myapplication\src\main\java\com\mycompany and create resources, webapp folders in Myapplication\src\main and inside resources i created 3 folders hibernate, properties and spring. in hibernate i kept all .hbm.xml files, in properties all properties files, and in spring again i created 3 folders beans, config and database. in beans i kept dispatch-servlet.xml and in database i kept hibernate.cfg.xml. in webapp i created WebINF\pages inside WebINF i kept web.xml and inside the pages folder i kept all jsp pages... After this using the command mvn clean install -U -U and it shows BUILD SUCCESS. then using this command mvn war : war. for creating the war. then i deployed the war file in localhost 8080. then I got the index page of my application.. then after clicking any link on the index page it shows 500 error.. Im attaching my pom.xml and the error log from the tomcat also :) -- View this message in context: http://maven.40175.n5.nabble.com/issues-in-maven-tp5715520.html Sent from the Maven Developers mailing list archive at Nabble.com. - To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org