forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability for JVM targets to refuse to allow themselves to be
cached in the artifact cache. Sometimes, we'll later generate resources that ought to be added to an artifact (e.g. args-apt in commons). In the long run, the artifact cache will be able to cache resources and this will be moot. Testing Done: Ran new tests. Reviewed at https://rbcommons.com/s/twitter/r/1206/
- Loading branch information
1 parent
39988f9
commit 97af5ed
Showing
6 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
java_library(name='nocache', | ||
sources = ['Hello.java'], | ||
no_cache = True | ||
) | ||
|
||
java_library(name='cache_me', | ||
sources = ['Goodbye.java'], | ||
) |
12 changes: 12 additions & 0 deletions
12
testprojects/src/java/com/pants/testproject/nocache/Goodbye.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). | ||
// Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
package com.pants.testproject.nocache; | ||
|
||
|
||
public class Goodbye { | ||
|
||
public static void main(String[] args) { | ||
System.out.println("This one is OK to cache."); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
testprojects/src/java/com/pants/testproject/nocache/Hello.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). | ||
// Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
package com.pants.testproject.nocache; | ||
|
||
|
||
public class Hello { | ||
|
||
public static void main(String[] args) { | ||
System.out.println("For some reason, we don't want to cache this in the build cache"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters