It works for me. Thank for help.
cd /root/apache-cloudstack-4.2.1-src/plugins/hypervisors/xen mvn -X -P cloud-plugin-hypervisor-xen clean install cp /root/.m2/repository/org/apache/cloudstack/cloud-plugin-hypervisor-xen/4.2.1/cloud-plugin-hypervisor-xen-4.2.1.jar /usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-hypervisor-xen-4.2.1-SNAPSHOT.jar 2014-03-24 11:09 GMT+01:00 Tomasz Zięba <t.a.zi...@gmail.com>: > hi, > > thank you for responses. > unfortunately I don't know tools like mvn, ant etc. :-( > So I don't know how to interpret this command output.. > > # mvn -X -P developer,systemvm clean install -pl > cloud-plugin-hypervisor-xen > > Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 > 14:51:28+0100) > Maven home: /usr/local/apache-maven-3.0.5 > Java version: 1.6.0_30, vendor: Sun Microsystems Inc. > Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre > Default locale: en_US, platform encoding: UTF-8 > OS name: "linux", version: "2.6.32-358.23.2.el6.x86_64", arch: "amd64", > family: "unix" > [INFO] Error stacktraces are turned on. > [DEBUG] Reading global settings from > /usr/local/apache-maven-3.0.5/conf/settings.xml > [DEBUG] Reading user settings from /root/.m2/settings.xml > [DEBUG] Using local repository at /root/.m2/repository > [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for > /root/.m2/repository > [INFO] Scanning for projects... > [DEBUG] Extension realms for project > org.apache.cloudstack:cloudstack:pom:4.2.1: (none) > [DEBUG] Looking up lifecyle mappings for packaging pom from > ClassRealm[plexus.core, parent: null] > ..... > ..... > [DEBUG] Looking up lifecyle mappings for packaging pom from > ClassRealm[plexus.core, parent: null] > [DEBUG] Extension realms for project > org.apache.cloudstack:cloud-devcloud-kvm:pom:4.2.1: (none) > [DEBUG] Looking up lifecyle mappings for packaging pom from > ClassRealm[plexus.core, parent: null] > [ERROR] Could not find the selected project in the reactor: > cloud-plugin-hypervisor-xen -> [Help 1] > org.apache.maven.MavenExecutionException: Could not find the selected > project in the reactor: cloud-plugin-hypervisor-xen > at > org.apache.maven.DefaultMaven.trimSelectedProjects(DefaultMaven.java:749) > at > org.apache.maven.DefaultMaven.createDependencyGraph(DefaultMaven.java:703) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:622) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) > at > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) > [ERROR] > [ERROR] > [ERROR] For more information about the errors and possible solutions, > please read the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException > > But if I try to build rpms: > cd packaging/centos63 > ./package.sh > > everything works properly. > > > However, I do not want to create new rpms just update the jar file. > > PS: Sorry for asking such simple questions. > Thanks, > > > > 2014-03-24 10:34 GMT+01:00 Punith S <punit...@cloudbyte.com>: > > hi, >> >> if you are using maven build, >> >> do mvn -P developer,systemvm clean install -pl cloud-plugin-hypervisor-xen >> >> get the newly built jar from .m2 repo in localhost and replace the old jar >> in /usr/share/cloudtsack-management/webapps/client/WEB-INF/lib. >> >> your changes will be applied. >> >> thanks. >> >> >> >> On Mon, Mar 24, 2014 at 2:57 PM, Tomasz Zięba <t.a.zi...@gmail.com> >> wrote: >> >> > Hello, >> > >> > after running: jar -uvf ................. >> > >> > I have information: >> > adding: >> > >> > >> apache-cloudstack-4.2.1-src/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.class(in >> > = 238178) (out= 104028)(deflated 56%) >> > >> > New file size increases: >> > >> > ls -la >> > >> > >> /usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-hypervisor-xen-4.2.1* >> > -rw-r--r-- 1 root root 366550 Mar 24 09:55 >> > >> > >> /usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin-hypervisor-xen-4.2.1-SNAPSHOT.jar >> > >> > Original file looks as follows: >> > >> > ls -la >> > >> > >> /usr/share/cloudstack-management/webapps/client/WEB-INF/lib/__cloud-plugin-hypervisor-xen-4.2.1-SNAPSHOT.jar__ >> > -rw-r--r-- 1 root root 261682 Mar 20 14:02 >> > >> > >> /usr/share/cloudstack-management/webapps/client/WEB-INF/lib/__cloud-plugin-hypervisor-xen-4.2.1-SNAPSHOT.jar__ >> > >> > I'm using ACS from (cloudstack-*-SNAPSHOT.el6.x86_64.rpm) rpms na >> centos. >> > >> > >> > PS: I'm not "java master" :-) >> > >> > >> > Best Regards, >> > >> > >> > 2014-03-24 10:15 GMT+01:00 Wido den Hollander <w...@widodh.nl>: >> > >> > > On 03/24/2014 10:12 AM, Tomasz Zięba wrote: >> > > >> > >> Hello, >> > >> >> > >> How do I apply a patch to the ACS 4.2.1 ? >> > >> >> > >> I have fixed file: >> > >> apache-cloudstack-4.2.1-src/plugins/hypervisors/xen/src/ >> > >> com/cloud/hypervisor/xen/resource/CitrixResourceBase.java >> > >> >> > >> and would like to make apply this changes to cloudstack-management >> > >> >> > >> After performing the following commands: >> > >> >> > >> /usr/bin/javac -cp >> > >> /usr/share/java/commons-collections.jar:/usr/share/ >> > >> java/commons-dbcp.jar:/usr/share/java/commons-logging. >> > >> jar:/usr/share/java/commons-logging-api.jar:/usr/share/ >> > >> java/commons-pool.jar:/usr/share/java/commons-httpclient. >> > >> jar:/usr/share/java/ws-commons-util.jar:/usr/share/ >> > >> java/jnetpcap.jar:/usr/share/cloudstack-agent/lib/*:/usr/ >> > >> share/cloudstack-management/lib/*:/usr/share/cloudstack- >> > >> common/lib/*:/usr/share/cloudstack-management/webapps/ >> > >> client/WEB-INF/lib/* >> > >> apache-cloudstack-4.2.1-src/plugins/hypervisors/xen/src/ >> > >> com/cloud/hypervisor/xen/resource/CitrixResourceBase.java >> > >> >> > >> #find /usr/ -name "*.jar" -exec grep -Hls "xen.resource" {} \; >> > >> >> > >> /usr/bin/jar -uvf >> > >> >> > >> /usr/share/cloudstack-management/webapps/client/WEB-INF/lib/cloud-plugin- >> > >> hypervisor-xen-4.2.1-SNAPSHOT.jar >> > >> apache-cloudstack-4.2.1-src/plugins/hypervisors/xen/src/ >> > >> com/cloud/hypervisor/xen/resource/CitrixResourceBase.class >> > >> apache-cloudstack-4.2.1-src/plugins/hypervisors/xen/src/ >> > >> com/cloud/hypervisor/xen/resource/CitrixResourceBase$SRType.class >> > >> apache-cloudstack-4.2.1-src/plugins/hypervisors/xen/src/ >> > >> com/cloud/hypervisor/xen/resource/CitrixResourceBase$XsHost.class >> > >> apache-cloudstack-4.2.1-src/plugins/hypervisors/xen/src/ >> > >> >> > >> com/cloud/hypervisor/xen/resource/CitrixResourceBase$XsLocalNetwork.class >> > >> >> > >> >> > >> and restart cloudstack-management, unfortunately, still uses the old >> > >> classes. >> > >> >> > >> >> > > You should remove the same file without the -SNAPSHOT in the name. >> It's >> > > probably reading that file on boot. >> > > >> > > Wido >> > > >> > > Thank you. >> > >> >> > >> >> > > >> > >> > >> > -- >> > Regards, >> > Tomasz Zięba >> > Twitter: @TZieba >> > LinkedIn: >> > pl.linkedin.com/pub/tomasz-zięba-ph-d/3b/7a8/ab6/<http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/> >> <http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/> >> > <http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/> >> > >> >> >> >> -- >> regards, >> >> punith s >> cloudbyte.com >> > > > > -- > Regards, > Tomasz Zięba > Twitter: @TZieba > LinkedIn: > pl.linkedin.com/pub/tomasz-zięba-ph-d/3b/7a8/ab6/<http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/> > -- Regards, Tomasz Zięba Twitter: @TZieba LinkedIn: pl.linkedin.com/pub/tomasz-zięba-ph-d/3b/7a8/ab6/<http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/>