r-murphy / nw-gradle Goto Github PK
View Code? Open in Web Editor NEWSAP NetWeaver Gradle Plugins
License: MIT License
SAP NetWeaver Gradle Plugins
License: MIT License
Because NetWeaver web engine is servlet 2.x, it always needs web.xml, unlike 3.x. So we should just default the path to web.xml.
Login modules have a special folder structure, which even NWDS does not support. They are a good candidate for this tool.
Here are sample dependencies sections from an SAP Ear exported from NWDS. It should be generated from application-j2ee-engine.xml in the app dir, if found.
dependencies: <dependency Implementation-Title="engine.security.facade" Implementat
ion-Vendor-Id="sap.com" /> <dependency Implementation-Title="engine.j
2ee14.facade" Implementation-Vendor-Id="sap.com" /> <dependency Imple
mentation-Title="com.sap.aii.af.svc.facade" Implementation-Vendor-Id="
sap.com" /> <dependency Implementation-Title="com.sap.aii.af.ifc.faca
de" Implementation-Vendor-Id="sap.com" /> <dependency Implementation-
Title="com.sap.aii.af.lib.facade" Implementation-Vendor-Id="sap.com" /
> <dependency Implementation-Title="com.sap.base.technology.facade" I
mplementation-Vendor-Id="sap.com" /> <dependency Implementation-Title
="com.sap.xi.mapping.api.lib" Implementation-Vendor-Id="sap.com" /> <d
ependency Implementation-Title="com.sap.xi.mapping.svc" Implementatio
n-Vendor-Id="sap.com" />
dependencylist: <dependency keyname="engine.security.facade" keyvendor="sap.com" /> <
dependency keyname="engine.j2ee14.facade" keyvendor="sap.com" /> <dep
endency keyname="com.sap.aii.af.svc.facade" keyvendor="sap.com" /> <d
ependency keyname="com.sap.aii.af.ifc.facade" keyvendor="sap.com" />
<dependency keyname="com.sap.aii.af.lib.facade" keyvendor="sap.com" /
> <dependency keyname="com.sap.base.technology.facade" keyvendor="sap
.com" /> <dependency keyname="com.sap.xi.mapping.api.lib" keyvendor="
sap.com" /> <dependency keyname="com.sap.xi.mapping.svc" keyvendor="s
ap.com" />
Provide a way to customize the filename for the SDA deployment descriptor xml. Current hardcoded as sda-dd.xml
plugins.all closure should be called for all plugins, but it's not being called for NWEarPlugin.
I seem to be getting the below issue when using your plug-in.
fowlks@AVPHR-2F1SP32 /cygdrive/c/home2/SoftLaunch
$ ./gradlew Softlaunch-API:ear --stacktrace
:Softlaunch-API:compileJava UP-TO-DATE
:Softlaunch-API:processResources UP-TO-DATE
:Softlaunch-API:classes UP-TO-DATE
:Softlaunch-API:jar UP-TO-DATE
:Softlaunch-API:nwear
+> MANIFEST.MF
+> application-j2ee-engine.xml
+> args4j-2.32.jar
+> log4j-1.2.17.jar
+> Softlaunch-API.jar
+> SAP_MANIFEST.MF
:Softlaunch-API:nwear FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':Softlaunch-API:nwear'.
Could not add SAP_MANIFEST.MF to ZIP 'C:\home2\SoftLaunch\Softlaunch-API\build\libs\Softlaunch-API.ear'.
Try:
Run with --info or --debug option to get more log output.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':Softlaunch-API:nwear'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:306)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.api.GradleException: Could not add SAP_MANIFEST.MF to ZIP 'C:\home2\SoftLaunch\Softlaunch-API\build\libs\Softlaunch-API.ear'.
at org.gradle.api.internal.file.archive.ZipCopyAction$StreamAction.visitFile(ZipCopyAction.java:100)
at org.gradle.api.internal.file.archive.ZipCopyAction$StreamAction.processFile(ZipCopyAction.java:87)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1$1.processFile(NormalizingCopyActionDecorator.java:65)
at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1$1.processFile(DuplicateHandlingCopyActionDecorator.java:60)
at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.processFile(CopyFileVisitorImpl.java:60)
at org.gradle.api.internal.file.copy.CopyFileVisitorImpl.visitFile(CopyFileVisitorImpl.java:44)
at org.gradle.api.internal.file.AbstractFileTree$FilteredFileTree$1.visitFile(AbstractFileTree.java:145)
at org.gradle.api.internal.file.collections.MapFileTree$Visit.visit(MapFileTree.java:113)
at org.gradle.api.internal.file.collections.MapFileTree.visit(MapFileTree.java:75)
at org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:96)
at org.gradle.api.internal.file.AbstractFileTree$FilteredFileTree.visit(AbstractFileTree.java:136)
at org.gradle.api.internal.file.CompositeFileTree.visit(CompositeFileTree.java:54)
at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:37)
at org.gradle.api.internal.file.copy.CopySpecActionImpl.execute(CopySpecActionImpl.java:24)
at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:498)
at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)
at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)
at org.gradle.api.internal.file.copy.DefaultCopySpec$DefaultCopySpecResolver.walk(DefaultCopySpec.java:500)
at org.gradle.api.internal.file.copy.DefaultCopySpec.walk(DefaultCopySpec.java:322)
at org.gradle.api.internal.file.copy.CopySpecBackedCopyActionProcessingStream.process(CopySpecBackedCopyActionProcessingStream.java:36)
at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator$1.process(DuplicateHandlingCopyActionDecorator.java:44)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator$1.process(NormalizingCopyActionDecorator.java:56)
at org.gradle.api.internal.file.archive.ZipCopyAction$1.execute(ZipCopyAction.java:62)
at org.gradle.api.internal.file.archive.ZipCopyAction$1.execute(ZipCopyAction.java:60)
at org.gradle.internal.IoActions.withResource(IoActions.java:74)
at org.gradle.api.internal.file.archive.ZipCopyAction.execute(ZipCopyAction.java:60)
at org.gradle.api.internal.file.copy.NormalizingCopyActionDecorator.execute(NormalizingCopyActionDecorator.java:52)
at org.gradle.api.internal.file.copy.DuplicateHandlingCopyActionDecorator.execute(DuplicateHandlingCopyActionDecorator.java:42)
at org.gradle.api.internal.file.copy.CopyActionExecuter.execute(CopyActionExecuter.java:38)
at org.gradle.api.tasks.AbstractCopyTask.copy(AbstractCopyTask.java:83)
at org.gradle.api.tasks.bundling.Jar.super$5$copy(Jar.groovy)
at rm.nw.gradle.NWEar.copy(NWEar.groovy:145)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 47 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at rm.nw.gradle.descriptor.helpers.ManifestStringSplitter.splitIt(ManifestStringSplitter.java:23)
at rm.nw.gradle.descriptor.SAPManifest.getEffectiveManifest(SAPManifest.java:116)
at rm.nw.gradle.descriptor.SAPManifest_Decorated.getEffectiveManifest(Unknown Source)
at rm.nw.gradle.descriptor.SAPManifest.writeTo(SAPManifest.java:134)
at rm.nw.gradle.descriptor.SAPManifest.writeTo(SAPManifest.java:22)
at org.gradle.api.java.archives.Manifest$writeTo.call(Unknown Source)
at rm.nw.gradle.NWEar$1.execute(NWEar.groovy:100)
at rm.nw.gradle.NWEar$1.execute(NWEar.groovy)
at org.gradle.api.internal.file.collections.MapFileTree$FileVisitDetailsImpl.copyTo(MapFileTree.java:162)
at org.gradle.api.internal.file.copy.DefaultFileCopyDetails.copyTo(DefaultFileCopyDetails.java:96)
at org.gradle.api.internal.file.archive.ZipCopyAction$StreamAction.visitFile(ZipCopyAction.java:97)
Low priority, but it would be good to support resource adapter type projects, complete with ra.xml and friends.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.