Where can I find dart 2 webdev binaries?

65 Views Asked by At

I'm migrating an application to Dart 2 and AngularDart 5. I used to build the application on a Jenkins server using 'pub build', (part of the SDK). I included 3 SDKs in the project (one for each Windows, Mac and Linux) and was able to build OS independently using Maven (see the Maven snippet below).

This tool is replaced now and I was told to use webdev. This tool works fine on my laptop, but I'm not sure how to use this in an OS independent way. Any ideas would be welcome!

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.5.0</version>
  <executions>
    <execution>
      <id>get</id>
      <phase>initialize</phase>
      <goals>
        <goal>exec</goal>
      </goals>
      <configuration>
        <executable>${dart.bin}</executable>
        <commandlineArgs>get</commandlineArgs>
      <workingDirectory>${project.basedir}/src/main/dart/</workingDirectory>
        <environmentVariables>
          <PUB_CACHE>${project.build.directory}/pub-cache</PUB_CACHE>
        </environmentVariables>
      </configuration>
    </execution>
    <execution>
      <id>build</id>
      <phase>compile</phase>
      <goals>
        <goal>exec</goal>
      </goals>
      <configuration>
        <executable>${dart.bin}</executable>
        <commandlineArgs>build --output="${project.build.directory}/webapp" </commandlineArgs>
         <workingDirectory>${project.basedir}/src/main/dart</workingDirectory>
        <environmentVariables>
          <PUB_CACHE>${project.build.directory}/pub-cache</PUB_CACHE>
        </environmentVariables>
      </configuration>
    </execution>
  </executions>
</plugin>

1

There are 1 best solutions below

1
On

The webdev tool is just a Dart project with a "binary" (named webdev). Get it from pub: https://pub.dartlang.org/packages/webdev

$ pub global activate webdev

If you have Dart installed, then you'll be able to run webdev.