package dev.jeka.core.samples;

import dev.jeka.core.api.depmanagement.JkDependencySet;
import dev.jeka.core.api.depmanagement.JkScope;
import dev.jeka.core.api.depmanagement.JkScopeMapping;
import dev.jeka.core.tool.JkCommands;
import dev.jeka.core.tool.builtins.java.JkPluginJava;

import static dev.jeka.core.api.depmanagement.JkJavaDepScopes.*;
import static dev.jeka.core.api.depmanagement.JkPopularModules.JERSEY_SERVER;

/**
 * This build illustrates how one can use other dependency scope mapping then the standard ones.
 */
public class SimpleScopeBuild extends JkCommands {

    private static final JkScope FOO = JkScope.of("foo");

    JkPluginJava javaPlugin = getPlugin(JkPluginJava.class);

    @Override
    protected void setup() {
        javaPlugin.getProject().addDependencies(JkDependencySet.of()
                .andFile(getBaseDir().resolve("libs/foo.jar"))
                .and(JERSEY_SERVER, "1.19", JkScopeMapping
                    .of(COMPILE).to(RUNTIME.getName())
                    .and(FOO, PROVIDED).to("bar", PROVIDED.getName())));
        BuildUtility.printHello();
    }


}



@@ -222,16 +222,50 @@
 mmands;%0A
+import dev.jeka.core.tool.JkInit;%0A
 import d
@@ -908,16 +908,63 @@
 .jar%22))%0A
+                .and(%22junit:junit:4.11%22, TEST)%0A
         
@@ -1014,16 +1014,20 @@
 Mapping%0A
+    
         
@@ -1146,16 +1146,17 @@
 e())));%0A
+%0A
         
@@ -1189,13 +1189,134 @@
 %0A    %7D%0A%0A
+    public static void main(String%5B%5D args) %7B%0A        JkInit.instanceOf(SimpleScopeBuild.class).javaPlugin.pack();%0A    %7D%0A%0A
 %0A%7D%0A%0A%0A

fix build