Skip to content

Commit 50cf35c

Browse files
committed
dependency scope of asset processor must be: provided (not test) fix #394
1 parent 8f0e652 commit 50cf35c

18 files changed

Lines changed: 26 additions & 26 deletions

File tree

jooby-assets/src/main/java/org/jooby/assets/AssetProcessor.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
* <dependency>
4545
* <groupId>org.jooby</groupId>
4646
* <artifactId>jooby-assets-my-processor</artifactId>
47-
* <scope>test</scope>
47+
* <scope>provided</scope>
4848
* </dependency>
4949
* </pre>
5050
*
5151
* <p>
52-
* Did you see the <strong>test</strong> scope? We just need the processor for development, because
53-
* assets are processed on the fly. For <code>prod</code>, assets are processed at built-time via
54-
* Maven plugin, at runtime we don't need this. This also, helps to keep our dependencies and the
55-
* jar size to minimum.
52+
* Did you see the <strong>provided</strong> scope? We just need the processor for development,
53+
* because assets are processed on the fly. For <code>prod</code>, assets are processed at
54+
* built-time via Maven plugin, at runtime we don't need this. This also, helps to keep our
55+
* dependencies and the jar size to minimum.
5656
* </p>
5757
*
5858
* <p>

jooby-maven-plugin/src/main/java/org/jooby/AssetMojo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
import com.typesafe.config.Config;
4444
import com.typesafe.config.ConfigFactory;
4545

46-
@Mojo(name = "assets", defaultPhase = LifecyclePhase.COMPILE,
47-
requiresDependencyResolution = ResolutionScope.TEST)
48-
@Execute(phase = LifecyclePhase.COMPILE)
46+
@Mojo(name = "assets", defaultPhase = LifecyclePhase.PREPARE_PACKAGE,
47+
requiresDependencyResolution = ResolutionScope.COMPILE)
48+
@Execute(phase = LifecyclePhase.PREPARE_PACKAGE)
4949
public class AssetMojo extends AbstractMojo {
5050

5151
@SuppressWarnings("serial")

md/asset-processor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ First thing to do is to add the dependency:
1010
<dependency>
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-my-processor</artifactId>
13-
<scope>test</scope>
13+
<scope>provided</scope>
1414
</dependency>
1515
```
1616

17-
Did you see the **test** scope? We just need the processor for development, because assets are processed on the fly. For ```prod```, assets are processed at built-time via Maven plugin, at runtime we don't need this. This also, helps to keep our dependencies and the jar size to minimum.
17+
Did you see the **provided** scope? We just need the processor for development, because assets are processed on the fly. For ```prod```, assets are processed at built-time via Maven plugin, so we don't need this library/dependency. This also, helps to keep our dependencies and the jar size to minimum.
1818

1919
Now we have the dependency all we have to do is to add it to our pipeline:
2020

md/doc/assets-babel/babel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-babel</artifactId>
1313
<version>{{version}}</version>
14-
<scope>test</scope>
14+
<scope>provided</scope>
1515
</dependency>
1616
```
1717

@@ -36,7 +36,7 @@ assets {
3636
<groupId>org.jooby</groupId>
3737
<artifactId>jooby-assets-babel</artifactId>
3838
<version>{{version}}</version>
39-
<scope>test</scope>
39+
<scope>provided</scope>
4040
</dependency>
4141
```
4242

md/doc/assets-clean-css/cleancss.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A fast, efficient, and well tested CSS minifier, via: <a href="https://github.co
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-clean-css</artifactId>
1313
<version>{{version}}</version>
14-
<scope>test</scope>
14+
<scope>provided</scope>
1515
</dependency>
1616
```
1717

md/doc/assets-closure-compiler/closure-compiler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-closure-compiler</artifactId>
1313
<version>{{version}}</version>
14-
<scope>test</scope>
14+
<scope>provided</scope>
1515
</dependency>
1616
```
1717

md/doc/assets-csslint/csslint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-csslint</artifactId>
1313
<version>{{version}}</version>
14-
<scope>test</scope>
14+
<scope>provided</scope>
1515
</dependency>
1616
```
1717

md/doc/assets-jscs/jscs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-jscs</artifactId>
1313
<version>{{version}}</version>
14-
<scope>test</scope>
14+
<scope>provided</scope>
1515
</dependency>
1616
```
1717

md/doc/assets-jshint/jshint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-jshint</artifactId>
1313
<version>{{version}}</version>
14-
<scope>test</scope>
14+
<scope>provided</scope>
1515
</dependency>
1616
```
1717

md/doc/assets-less/less.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<groupId>org.jooby</groupId>
1212
<artifactId>jooby-assets-less</artifactId>
1313
<version>{{version}}</version>
14-
<scope>test</scope>
14+
<scope>provided</scope>
1515
</dependency>
1616
```
1717

0 commit comments

Comments
 (0)