Skip to content

Commit 85b13d0

Browse files
committed
Merge branch '473-additional-aop.xml'
2 parents 1f4b47b + d259942 commit 85b13d0

File tree

8 files changed

+14
-7
lines changed

8 files changed

+14
-7
lines changed

docs/framework-aspectj_weaver_agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The AspectJ Weaver Agent Framework configures the AspectJ Runtime Weaving Agent
44
<table>
55
<tr>
66
<td><strong>Detection Criterion</strong></td>
7-
<td><tt>aspectjweaver-*.jar</tt> existing and <tt>BOOT-INF/classes/META-INF/aop.xml</tt>, <tt>BOOT-INF/classes/org/aspectj/aop.xml</tt>, or <tt>META-INF/aop.xml</tt> existing.</td>
7+
<td><tt>aspectjweaver-*.jar</tt> existing and <tt>BOOT-INF/classes/META-INF/aop.xml</tt>, <tt>BOOT-INF/classes/org/aspectj/aop.xml</tt>, <tt>META-INF/aop.xml</tt>, or <tt>org/aspectj/aop.xml</tt> existing.</td>
88
</tr>
99
<tr>
1010
<td><strong>Tags</strong></td>

lib/java_buildpack/framework/aspectj_weaver_agent.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def release
5454
def aop_xml_exist?
5555
(@application.root + 'BOOT-INF/classes/META-INF/aop.xml').exist? ||
5656
(@application.root + 'BOOT-INF/classes/org/aspectj/aop.xml').exist? ||
57-
(@application.root + 'META-INF/aop.xml').exist?
57+
(@application.root + 'META-INF/aop.xml').exist? ||
58+
(@application.root + 'org/aspectj/aop.xml').exist?
5859
end
5960

6061
def enabled?

spec/fixtures/framework_aspectj_weaver_classes/BOOT-INF/classes/org/aspectj/aop.xml renamed to spec/fixtures/framework_aspectj_weaver_boot_inf_classes/BOOT-INF/classes/org/aspectj/aop.xml

File renamed without changes.

spec/fixtures/framework_aspectj_weaver_classes_meta_inf/BOOT-INF/lib/aspectjweaver-1.8.10.jar renamed to spec/fixtures/framework_aspectj_weaver_boot_inf_classes/BOOT-INF/lib/aspectjweaver-1.8.10.jar

File renamed without changes.

spec/fixtures/framework_aspectj_weaver_classes_meta_inf/BOOT-INF/classes/META-INF/aop.xml renamed to spec/fixtures/framework_aspectj_weaver_boot_inf_classes_meta_inf/BOOT-INF/classes/META-INF/aop.xml

File renamed without changes.

spec/fixtures/framework_aspectj_weaver_boot_inf_classes_meta_inf/BOOT-INF/lib/aspectjweaver-1.8.10.jar

Whitespace-only changes.

spec/fixtures/framework_aspectj_weaver_classes/org/aspectj/aop.xml

Whitespace-only changes.

spec/java_buildpack/framework/aspectj_weaver_agent_spec.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
expect(component.detect).to be_nil
3434
end
3535

36-
it 'detects when aop.xml in classes',
37-
app_fixture: 'framework_aspectj_weaver_classes' do
36+
it 'detects when aop.xml in BOOT-INF classes',
37+
app_fixture: 'framework_aspectj_weaver_boot_inf_classes' do
3838

3939
expect(component.detect).to eq('aspectj-weaver-agent=1.8.10')
4040
end
4141

42-
it 'detects when aop.xml in classes/META-INF',
43-
app_fixture: 'framework_aspectj_weaver_classes_meta_inf' do
42+
it 'detects when aop.xml in BOOT-INF/classes/META-INF',
43+
app_fixture: 'framework_aspectj_weaver_boot_inf_classes_meta_inf' do
4444

4545
expect(component.detect).to eq('aspectj-weaver-agent=1.8.10')
4646
end
@@ -57,9 +57,15 @@
5757
expect(component.detect).to eq('aspectj-weaver-agent=1.8.10')
5858
end
5959

60-
it 'adds java agent',
60+
it 'detects when aop.xml in classes',
6161
app_fixture: 'framework_aspectj_weaver_classes' do
6262

63+
expect(component.detect).to eq('aspectj-weaver-agent=1.8.10')
64+
end
65+
66+
it 'adds java agent',
67+
app_fixture: 'framework_aspectj_weaver_boot_inf_classes' do
68+
6369
component.release
6470
expect(java_opts).to include('-javaagent:$PWD/BOOT-INF/lib/aspectjweaver-1.8.10.jar')
6571
end

0 commit comments

Comments
 (0)