Hi, See [1] for a possible workaround (this is the one I use). Basically when using maven 3, you just have to prefix your deployment url with dav: (ex. dav:http://yourmavenserver). It will use the dav wagon instead of the default http one, which has the bad habbit of loading the full file in memory before sending it away.
HTH, Vincent |1] http://maven.40175.n5.nabble.com/Heap-overflow-in-deploy-deploy-td3211324.html Vincent 2013/7/19 Raouf Abdelhamid <[email protected]>: > Okay thanks guys, i'll check the activity of maven-deploy and give you some > feedback > > > 2013/7/19 Daniel Beck <[email protected]> >> >> IIRC a few years ago I experienced an issue with very large artifacts >> being uploaded to an artifact repository. maven-deploy-plugin couldn't >> handle files larger than one third of the available heap space. >> >> On 19.07.2013, at 12:09, Raouf <[email protected]> wrote: >> >> > Hi there, >> > >> > I'm getting a java heap space that i can't really explain. i tried to >> > increase the memory allocated to jenkins, but that doesn't change a thing >> > >> > The most strange thing, is that i configured jenkins to not launch sonar >> > analysis if the build fails, but sonar analysis is launched anyway, goes >> > sucessful, and then the build is red ! >> > >> > I even tryied to montir the execution of this build with visual VM >> > remotely connected to jenkins, but didn't see any heap space error at any >> > moment. >> > >> > here's the corresponding log >> > >> > Uploading: >> > http://server/archiva/repository/snapshot/project-SNAPSHOT/project-SNAPSHOT-bin.tar.gz >> > >> > [JENKINS] Archiving /basepath/hudson/workspace/ >> > project/package/pom.xml to >> > /basepath/hudson/jobs/project/modules/package$module/builds/2013-07-18_14-08-50/archive/package/module/version-SNAPSHOT/module-version- >> > SNAPSHOT.pom >> > [JENKINS] Archiving /basepath/hudson/workspace/ >> > project/package/targetproject-version-SNAPSHOT.jar to >> > /basepath/hudson/jobs/project/modules/package$module/builds/2013-07-18_14-08-50/archive/package/module/version-SNAPSHOT/project-version- >> > SNAPSHOT.jar >> > [JENKINS] Archiving /basepath/hudson/workspace/ >> > project/package/target/project-version-SNAPSHOT-bin.tar.gz to >> > /basepath/hudson/jobs/project/modules/package$module/builds/2013-07-18_14-08-50/archive/package/module/version-SNAPSHOT/project-version- >> > SNAPSHOT-bin.tar.gz >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > >> > [ERROR] FATAL ERROR >> > >> > [INFO] ------------------------------------------------------------ >> > ------------ >> > [INFO] Java heap space >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > [INFO] Trace >> > java.lang.OutOfMemoryError: Java heap space >> > at java.util.Arrays.copyOf( >> > Arrays.java:2786) >> > at java.io.ByteArrayOutputStream. >> > write(ByteArrayOutputStream. >> > java:94) >> > at sun.net.www.http. >> > PosterOutputStream.write( >> > PosterOutputStream.java:61) >> > at org.apache.maven.wagon. >> > AbstractWagon.transfer( >> > AbstractWagon.java:338) >> > at org.apache.maven.wagon. >> > AbstractWagon.transfer( >> > AbstractWagon.java:305) >> > at org.apache.maven.wagon. >> > AbstractWagon.transfer( >> > AbstractWagon.java:267) >> > at org.apache.maven.wagon. >> > AbstractWagon.putTransfer( >> > AbstractWagon.java:238) >> > at org.apache.maven.wagon. >> > StreamWagon.put(StreamWagon. >> > java:143) >> > at org.apache.maven.wagon. >> > providers.http.LightweightHttpWagon.put( >> > LightweightHttpWagon.java:148) >> > at org.apache.maven.artifact. >> > manager.DefaultWagonManager.putRemoteFile( >> > DefaultWagonManager.java:244) >> > at org.apache.maven.artifact. >> > manager.DefaultWagonManager.putArtifact( >> > DefaultWagonManager.java:160) >> > at org.apache.maven.artifact. >> > deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java: >> > 80) >> > at org.apache.maven.plugin. >> > deploy.DeployMojo.execute( >> > DeployMojo.java:169) >> > at org.apache.maven.plugin. >> > DefaultPluginManager.executeMojo( >> > DefaultPluginManager.java:451) >> > at hudson.maven.agent. >> > PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java: >> > 182) >> > at org.apache.maven.lifecycle. >> > DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: >> > 558) >> > at org.apache.maven.lifecycle. >> > >> > DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java: >> > 499) >> > at org.apache.maven.lifecycle. >> > DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java: >> > 478) >> > at org.apache.maven.lifecycle. >> > >> > DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java: >> > 330) >> > at org.apache.maven.lifecycle. >> > >> > DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java: >> > 291) >> > at org.apache.maven.lifecycle. >> > DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java: >> > 142) >> > at org.apache.maven.lifecycle. >> > LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor. >> > java:65) >> > at org.apache.maven.DefaultMaven. >> > doExecute(DefaultMaven.java: >> > 336) >> > at org.apache.maven.DefaultMaven. >> > execute(DefaultMaven.java:129) >> > at org.apache.maven.cli.MavenCli. >> > main(MavenCli.java:287) >> > at sun.reflect. >> > NativeMethodAccessorImpl. >> > invoke0(Native Method) >> > at sun.reflect. >> > NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: >> > 39) >> > at sun.reflect. >> > DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl. >> > java:25) >> > at java.lang.reflect.Method. >> > invoke(Method.java:597) >> > at org.codehaus.classworlds. >> > Launcher.launchEnhanced( >> > Launcher.java:315) >> > at org.codehaus.classworlds. >> > Launcher.launch(Launcher.java: >> > 255) >> > at hudson.maven.agent.Main. >> > launch(Main.java:185) >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > [INFO] Total time: 10 minutes 28 seconds >> > [INFO] Finished at: Thu Jul 18 14:19:26 CEST 2013 >> > [INFO] Final Memory: 352M/995M >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > Waiting for Jenkins to finish collecting data >> > channel stopped >> > >> > >> > ....... >> > >> > >> > >> > [INFO] Building PROJECT >> > [INFO] task-segment: [org.codehaus.mojo:sonar- >> > maven-plugin:1.0:sonar] (aggregator-style) >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > [INFO] [sonar:sonar] >> > [INFO] Sonar host: >> > http://vd2260:20506 >> > >> > [INFO] Sonar version: 2.9 >> > [INFO] Execute: org.codehaus.sonar:sonar- >> > maven-plugin:2.9:sonar >> > [INFO] [sonar:sonar] >> > >> > >> > >> > >> > >> > ......... >> > >> > >> > >> > at the end of sonar analysis >> > >> > [INFO] Database optimization done: 15599 ms >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > [INFO] BUILD SUCCESSFUL >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > [INFO] Total time: 8 minutes 25 seconds >> > [INFO] Finished at: Thu Jul 18 14:28:04 CEST 2013 >> > [INFO] Final Memory: 93M/733M >> > [INFO] ------------------------------ >> > ------------------------------ >> > ------------ >> > Finished: FAILURE >> > >> > >> > >> > >> > >> > Thanks in advance for your help ! >> > >> > >> > >> > Regards, >> > Raouf. >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups "Jenkins Users" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an email to [email protected]. >> > For more options, visit https://groups.google.com/groups/opt_out. >> > >> > >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-users/MaDPC3IAXD4/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
