├── .github
├── dependabot.yml
├── release-drafter.yml
└── workflows
│ ├── maven.yml
│ └── release-drafter.yml
├── .gitignore
├── LICENSE.txt
├── README.md
├── pom.xml
└── src
├── it
├── AjcTestCompilerUsingCorrectClasspath
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ ├── main
│ │ │ ├── aspect
│ │ │ │ ├── Azpect.java
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ │ └── Clazz.java
│ │ └── test
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── ATestAzpect.java
│ │ │ └── ATestCase.java
│ ├── test-build-1-5.ajproperties
│ └── verify.groovy
├── AnnotationProcessingOutput
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── BuildAspectJ7
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── aspect
│ │ └── Azpect.java
│ │ └── java
│ │ └── Clazz.java
├── BuildConfigFileAndAspectJ5
│ ├── build-1-5.ajproperties
│ ├── invoker.properties
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── aspect
│ │ ├── Azpect.java
│ │ └── OldStyleAspect.aj
│ │ └── java
│ │ └── Clazz.java
├── BuildConfigFileExclusionsUsingOldStyle
│ ├── build-1-2-using-exclusions.ajproperties
│ ├── invoker.properties
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── aspect
│ │ ├── Azpect.java
│ │ └── OldStyleAspect.aj
│ │ └── java
│ │ └── Clazz.java
├── BuildConfigFileUsingOldStyle
│ ├── build-1-2.ajproperties
│ ├── invoker.properties
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── aspect
│ │ ├── Azpect.java
│ │ └── OldStyleAspect.aj
│ │ └── java
│ │ └── Clazz.java
├── BuildConfigFileWithUnknownAspectDirectory
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── foo
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── Azpect.java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── CreateCustomLoadTimeWeaveXml
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── foo
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── Azpect.java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── CreateDefaultLoadTimeWeaveXml
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── foo
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── Azpect.java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── CreateReport
│ ├── build-1-5.ajproperties
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── CreateSite
│ ├── build-1-5.ajproperties
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── ExclusionsAntStyle
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── foo
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── Azpect.java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── ExclusionsFullClassName
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── foo
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── Azpect.java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── InclusionsAntStyle
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── foo
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── Azpect.java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── InclusionsFullClassName
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── foo
│ │ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── foo
│ │ │ ├── Azpect.java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── JavaSourcesDefault
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── foo
│ │ │ └── Clazz.java
│ └── verify.groovy
├── JavaSourcesEmpty
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── foo
│ │ │ └── Clazz.java
│ └── verify.groovy
├── JavaSourcesList
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── java
│ │ │ └── foo
│ │ │ └── Clazz.java
│ └── verify.groovy
├── JavaSourcesNoBasedir
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── foo
│ │ │ └── Clazz.java
│ └── verify.groovy
├── LineNumbersInAjcWarnings
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── MASPECT-99
│ └── pom.xml
├── MASPECTJ-110
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ ├── main
│ │ │ ├── java
│ │ │ │ └── Clazz.java
│ │ │ └── trivialaspects
│ │ │ │ └── TrivialAspect.java
│ │ └── test
│ │ │ ├── java
│ │ │ └── AnotherClass.java
│ │ │ └── trivialtestaspects
│ │ │ └── TrivialTestAspect.java
│ └── verify.groovy
├── MASPECTJ-86
│ ├── invoker.properties
│ ├── pom.xml
│ └── verify.groovy
├── MASPECTJ-96
│ ├── invoker.properties
│ ├── pom.xml
│ └── verify.groovy
├── NoMainSourceWeave
│ ├── invoker.properties
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ └── java
│ │ │ └── Clazz.java
│ │ └── test
│ │ └── java
│ │ ├── ATestAzpect.java
│ │ └── ATestCase.java
├── NoParameters
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── NoSourcesAvailable
│ ├── invoker.properties
│ └── pom.xml
├── Parameters
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── TOFIX_MASPECTJ-4
│ ├── invoker.properties
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ └── java
│ │ │ └── Clazz.java
│ │ └── test
│ │ └── java
│ │ ├── ATestAzpect.java
│ │ └── ATestCase.java
├── WrongCompilerVersion
│ ├── build-1-5.ajproperties
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── Xajruntimetarget
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
├── XhasMember
│ ├── invoker.properties
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── aspect
│ │ ├── Azpect.java
│ │ └── OldStyleAspect.aj
│ │ └── java
│ │ └── Clazz.java
├── Xlint
│ ├── invoker.properties
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── aspect
│ │ ├── Azpect.java
│ │ └── OldStyleAspect.aj
│ │ └── java
│ │ └── Clazz.java
├── Xlintfile
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── Azpect.java
│ │ │ └── resources
│ │ │ └── XlintTestFile.properties
│ └── verify.groovy
├── XmlConfigured
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── Azpect.aj
│ │ │ ├── java
│ │ │ ├── ExcludedClazz.java
│ │ │ └── IncludedClazz.java
│ │ │ └── resources
│ │ │ └── aopTestExample.xml
│ └── verify.groovy
├── Xset
│ ├── invoker.properties
│ ├── pom.xml
│ ├── src
│ │ └── main
│ │ │ ├── aspect
│ │ │ └── Azpect.java
│ │ │ └── java
│ │ │ └── Clazz.java
│ └── verify.groovy
└── settings.xml
├── main
├── java
│ └── org
│ │ └── codehaus
│ │ └── mojo
│ │ └── aspectj
│ │ ├── AbstractAjcCompiler.java
│ │ ├── AbstractAjcMojo.java
│ │ ├── AjcCompileMojo.java
│ │ ├── AjcHelper.java
│ │ ├── AjcReportMojo.java
│ │ ├── AjcTestCompileMojo.java
│ │ ├── CompilationFailedException.java
│ │ ├── EclipseAjcMojo.java
│ │ ├── MavenMessageHandler.java
│ │ ├── Module.java
│ │ └── Source.java
└── resources
│ ├── aspectj-report.properties
│ ├── aspectj-report_en.properties
│ ├── aspectj-report_nl.properties
│ └── aspectj-report_sv.properties
├── site
├── apt
│ ├── ajc_reference
│ │ ├── experimental_opts.apt
│ │ └── standard_opts.apt
│ ├── examples
│ │ ├── differentTestAndCompile.apt.vm
│ │ ├── includeExclude.apt.vm
│ │ ├── libraryJars.apt.vm
│ │ ├── usingReport.apt.vm
│ │ ├── usingTogetherWithAJDT.apt.vm
│ │ ├── weaveDirectories.apt.vm
│ │ └── weaveJars.apt.vm
│ ├── index.apt.vm
│ ├── multimodule
│ │ └── multimodule_strategy.apt.vm
│ └── usage.apt.vm
├── resources
│ └── .nojekyll
└── site.xml
└── test
├── java
└── org
│ └── codehaus
│ └── mojo
│ └── aspectj
│ ├── AbstractAjcCompilerTest.java
│ ├── AjcCompilerMojoTest.java
│ ├── AjcHelperTest.java
│ ├── AjcTestCompileMojoTest.java
│ ├── CompilerMojoTestBase.java
│ ├── MockArtifact.java
│ └── MockArtifactHandler.java
└── projects
├── aspects-in-main-project
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── codehaus
│ │ └── mojo
│ │ └── aspectj
│ │ ├── Azpect.java
│ │ └── Clazz.java
│ └── test
│ └── java
│ └── org
│ └── codehaus
│ └── mojo
│ └── aspectj
│ └── ATestCase.java
├── no-main-weave-project
├── pom.xml
└── src
│ ├── main
│ ├── aspect
│ │ └── org
│ │ │ └── codehaus
│ │ │ └── mojo
│ │ │ └── aspectj
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ └── java
│ │ └── org
│ │ └── codehaus
│ │ └── mojo
│ │ └── aspectj
│ │ └── Clazz.java
│ └── test
│ └── java
│ └── org
│ └── codehaus
│ └── mojo
│ └── aspectj
│ ├── ATestAzpect.java
│ └── ATestCase.java
├── no-sources-project
└── pom.xml
├── parent-child-test-project
├── my-app
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── aspect
│ │ │ └── com
│ │ │ │ └── mycompany
│ │ │ │ └── app
│ │ │ │ └── aspects
│ │ │ │ └── AppAspect.aj
│ │ └── java
│ │ │ └── com
│ │ │ └── mycompany
│ │ │ └── app
│ │ │ └── App.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── mycompany
│ │ └── app
│ │ └── AppTest.java
└── pom.xml
└── test-project
├── build-1-2-using-exclusions.ajproperties
├── build-1-2.ajproperties
├── build-1-5.ajproperties
├── pom.xml
├── src
├── main
│ ├── aspect
│ │ └── org
│ │ │ └── codehaus
│ │ │ └── mojo
│ │ │ └── aspectj
│ │ │ ├── Azpect.java
│ │ │ └── OldStyleAspect.aj
│ └── java
│ │ └── org
│ │ └── codehaus
│ │ └── mojo
│ │ └── aspectj
│ │ └── Clazz.java
└── test
│ └── java
│ └── org
│ └── codehaus
│ └── mojo
│ └── aspectj
│ ├── ATestAzpect.java
│ └── ATestCase.java
└── test-build-1-5.ajproperties
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "maven"
4 | directory: "/"
5 | schedule:
6 | interval: "daily"
7 | - package-ecosystem: "github-actions"
8 | directory: "/"
9 | schedule:
10 | interval: "daily"
11 |
--------------------------------------------------------------------------------
/.github/release-drafter.yml:
--------------------------------------------------------------------------------
1 | _extends: .github
2 | tag-template: aspectj-maven-plugin-$NEXT_MINOR_VERSION
3 |
--------------------------------------------------------------------------------
/.github/workflows/release-drafter.yml:
--------------------------------------------------------------------------------
1 | name: Release Drafter
2 | on:
3 | push:
4 | branches:
5 | - master
6 | jobs:
7 | update_release_draft:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: release-drafter/release-drafter@v6
11 | env:
12 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright 2005-2015 Mojo@Codehaus
4 | Copyright 2015-2021 Mojohaus
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/src/it/AjcTestCompilerUsingCorrectClasspath/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean test-compile
--------------------------------------------------------------------------------
/src/it/AjcTestCompilerUsingCorrectClasspath/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/AjcTestCompilerUsingCorrectClasspath/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/AjcTestCompilerUsingCorrectClasspath/src/test/java/foo/ATestCase.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 | import junit.framework.TestCase;
27 |
28 | /**
29 | * A testcase to test if we have correct weaving of testcases.
30 | *
31 | * @author Kaare Nilsen
32 | */
33 | public class ATestCase
34 | extends TestCase
35 | {
36 | /**
37 | * Just to check if we don't get errors in weaving.
38 | * @throws Exception
39 | */
40 | public void testCp()
41 | throws Exception
42 | {
43 | System.out.println( "I was executed" );
44 | assert(true);
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/AjcTestCompilerUsingCorrectClasspath/test-build-1-5.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/,\
2 | src/main/java/,\
3 | src/test/java/
4 |
--------------------------------------------------------------------------------
/src/it/AjcTestCompilerUsingCorrectClasspath/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "target/test-classes/builddef.lst")
2 | assert file.exists()
3 | assert file.readLines().get(4) == '-classpath'
4 | assert file.readLines().get(5).contains('junit')
5 |
--------------------------------------------------------------------------------
/src/it/AnnotationProcessingOutput/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/AnnotationProcessingOutput/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | import com.google.auto.value.AutoValue;
26 |
27 | @AutoValue
28 | public abstract class Clazz
29 | {
30 | public static Clazz create(String name) {
31 | return new AutoValue_Clazz(name);
32 | }
33 |
34 | public abstract String name();
35 | }
36 |
--------------------------------------------------------------------------------
/src/it/AnnotationProcessingOutput/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "target/generated-sources/annotations/AutoValue_Clazz.java")
2 | assert file.exists()
3 |
--------------------------------------------------------------------------------
/src/it/BuildAspectJ7/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | build-aspectj7
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.7
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/it/BuildAspectJ7/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileAndAspectJ5/build-1-5.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/,\
2 | src/main/java/
3 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileAndAspectJ5/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/BuildConfigFileAndAspectJ5/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | buildconfigfile-aspect5
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | build-1-5.ajproperties
39 | 1.8
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileAndAspectJ5/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileAndAspectJ5/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileExclusionsUsingOldStyle/build-1-2-using-exclusions.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/java/
2 | src.excludes = src/main/aspect/org/codehaus/mojo/aspectj/Azpect.java
3 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileExclusionsUsingOldStyle/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/BuildConfigFileExclusionsUsingOldStyle/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | buildexclusions-oldstyle
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | build-1-2-using-exclusions.ajproperties
39 | 1.8
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileExclusionsUsingOldStyle/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileExclusionsUsingOldStyle/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileUsingOldStyle/build-1-2.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/org/codehaus/mojo/aspectj/OldStyleAspect.aj,\
2 | src/main/java/
3 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileUsingOldStyle/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/BuildConfigFileUsingOldStyle/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | build-oldstyle
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | build-1-2.ajproperties
39 | 1.8
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileUsingOldStyle/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileUsingOldStyle/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileWithUnknownAspectDirectory/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/BuildConfigFileWithUnknownAspectDirectory/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | build-unknownaspectdir
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | src/no/aspects
39 | 1.8
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileWithUnknownAspectDirectory/src/main/aspect/foo/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileWithUnknownAspectDirectory/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/BuildConfigFileWithUnknownAspectDirectory/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert !file.getText().contains("woven aspect foo.OldStyleAspect")
4 |
--------------------------------------------------------------------------------
/src/it/CreateCustomLoadTimeWeaveXml/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/CreateCustomLoadTimeWeaveXml/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | createcustomloadtimeweavexml
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | /META-INF/customaop.xml
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/it/CreateCustomLoadTimeWeaveXml/src/main/aspect/foo/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/it/CreateCustomLoadTimeWeaveXml/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/CreateCustomLoadTimeWeaveXml/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "target/classes/META-INF/customaop.xml")
2 | assert file.exists()
--------------------------------------------------------------------------------
/src/it/CreateDefaultLoadTimeWeaveXml/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/CreateDefaultLoadTimeWeaveXml/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | createdefaultloadtimeweavexml
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | true
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/it/CreateDefaultLoadTimeWeaveXml/src/main/aspect/foo/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/it/CreateDefaultLoadTimeWeaveXml/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/CreateDefaultLoadTimeWeaveXml/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "target/classes/META-INF/aop-ajc.xml")
2 | assert file.exists()
--------------------------------------------------------------------------------
/src/it/CreateReport/build-1-5.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/,\
2 | src/main/java/
3 |
--------------------------------------------------------------------------------
/src/it/CreateReport/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile org.codehaus.mojo:aspectj-maven-plugin:${project.version}:aspectj-report
--------------------------------------------------------------------------------
/src/it/CreateReport/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | ajcreport
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | build-1-5.ajproperties
39 | 1.8
40 | true
41 | true
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/it/CreateReport/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/CreateReport/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/CreateReport/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/CreateReport/verify.groovy:
--------------------------------------------------------------------------------
1 | indexFile = new File(basedir, "target/site/aspectj-report/index.html")
2 | assert indexFile.exists()
3 | clazzFile = new File(basedir, "target/site/aspectj-report/Clazz.html")
4 | assert clazzFile.getText().contains("Advised by:")
5 |
--------------------------------------------------------------------------------
/src/it/CreateSite/build-1-5.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/,\
2 | src/main/java/
3 |
--------------------------------------------------------------------------------
/src/it/CreateSite/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile site
--------------------------------------------------------------------------------
/src/it/CreateSite/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/CreateSite/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/CreateSite/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/CreateSite/verify.groovy:
--------------------------------------------------------------------------------
1 | indexFile = new File(basedir, "target/site/aspectj-report/index.html")
2 | assert indexFile.exists()
3 | clazzFile = new File(basedir, "target/site/aspectj-report/Clazz.html")
4 | assert clazzFile.getText().contains("Advised by:")
5 |
--------------------------------------------------------------------------------
/src/it/ExclusionsAntStyle/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/ExclusionsAntStyle/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | exclusions-antstyle
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 |
40 | **/Az*.*
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/it/ExclusionsAntStyle/src/main/aspect/foo/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/it/ExclusionsAntStyle/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/ExclusionsAntStyle/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert file.getText().contains("woven aspect foo.OldStyleAspect")
4 | assert !file.getText().contains("woven class foo.Azpect")
5 | assert file.getText().contains("woven class foo.Clazz")
--------------------------------------------------------------------------------
/src/it/ExclusionsFullClassName/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/ExclusionsFullClassName/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | exclusions-fullclassname
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 |
40 | foo/Azpect.java
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/it/ExclusionsFullClassName/src/main/aspect/foo/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/it/ExclusionsFullClassName/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/ExclusionsFullClassName/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert file.getText().contains("woven class foo.Clazz")
4 | assert !file.getText().contains("woven class foo.Azpect")
--------------------------------------------------------------------------------
/src/it/InclusionsAntStyle/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/InclusionsAntStyle/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | inclusions-antstyle
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 |
40 | **/Old*eAspect.aj
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/it/InclusionsAntStyle/src/main/aspect/foo/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/it/InclusionsAntStyle/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/InclusionsAntStyle/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert file.getText().contains("woven aspect foo.OldStyleAspect")
4 | assert !file.getText().contains("woven class foo.Azpect")
5 | assert !file.getText().contains("woven class foo.Clazz")
--------------------------------------------------------------------------------
/src/it/InclusionsFullClassName/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/InclusionsFullClassName/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | inclusions-fullclassname
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 |
40 | foo/OldStyleAspect.aj
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/it/InclusionsFullClassName/src/main/aspect/foo/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/it/InclusionsFullClassName/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/InclusionsFullClassName/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert file.getText().contains("woven aspect foo.OldStyleAspect")
4 | assert !file.getText().contains("woven class foo.Azpect")
5 | assert !file.getText().contains("woven class foo.Clazz")
--------------------------------------------------------------------------------
/src/it/JavaSourcesDefault/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/JavaSourcesDefault/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | javasources-default
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesDefault/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesDefault/verify.groovy:
--------------------------------------------------------------------------------
1 | log = new File( basedir, 'build.log' )
2 | assert log.exists()
3 | fooClazz = new File( basedir, 'src/main/java/foo/Clazz.java' )
4 | execLine = log.readLines().find { line -> line.contains( ' Running : ajc ' ) }
5 | assert execLine.toUpperCase().endsWith( fooClazz.getAbsolutePath().toUpperCase() )
--------------------------------------------------------------------------------
/src/it/JavaSourcesEmpty/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
2 | #Maven2 + plexus won't make an empty List/Array, but keeps it null
3 | invoker.maven.version=3.0+
--------------------------------------------------------------------------------
/src/it/JavaSourcesEmpty/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | javasources-empty
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesEmpty/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesEmpty/verify.groovy:
--------------------------------------------------------------------------------
1 | log = new File( basedir, 'build.log' )
2 | assert log.exists()
3 | execLine = log.readLines().find { line -> line.contains( ' Running : ajc ' ) }
4 | assert execLine == null
--------------------------------------------------------------------------------
/src/it/JavaSourcesList/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/JavaSourcesList/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | javasources-list
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 |
39 |
40 | src/java
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesList/src/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesList/verify.groovy:
--------------------------------------------------------------------------------
1 | log = new File( basedir, 'build.log' )
2 | assert log.exists()
3 | fooClazz = new File( basedir, 'src/java/foo/Clazz.java' )
4 | execLine = log.readLines().find { line -> line.contains( ' Running : ajc ' ) }
5 | assert execLine.toUpperCase().endsWith( fooClazz.getAbsolutePath().toUpperCase() )
--------------------------------------------------------------------------------
/src/it/JavaSourcesNoBasedir/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/JavaSourcesNoBasedir/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | javasources-nobasedir
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesNoBasedir/src/main/java/foo/Clazz.java:
--------------------------------------------------------------------------------
1 | package foo;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/it/JavaSourcesNoBasedir/verify.groovy:
--------------------------------------------------------------------------------
1 | log = new File( basedir, 'build.log' )
2 | assert log.exists()
3 | execLine = log.readLines().find { line -> line.contains( ' Running : ajc ' ) }
4 | assert execLine == null
--------------------------------------------------------------------------------
/src/it/LineNumbersInAjcWarnings/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/LineNumbersInAjcWarnings/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | WarningMessagesWithLineNumbers
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | unusedLocals,unusedImports,unusedArguments
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/LineNumbersInAjcWarnings/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/LineNumbersInAjcWarnings/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/LineNumbersInAjcWarnings/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | // An unused import statement, should yield the following from AJC:
2 | // [WARNING] The import java.io.File is never used
3 | import java.io.File;
4 |
5 | /**
6 | * The Class to get woven
7 | *
8 | * @author Kaare Nilsen
9 | */
10 | public class Clazz
11 | {
12 | // An unused argument, should yield the following from AJC:
13 | // [WARNING] The value of the parameter anUnusedArguent is not used
14 | public void print( String anUnusedArgument )
15 | {
16 | final int anUnusedLocalVariable = 42;
17 |
18 | System.out.println( "Weave me" );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/it/MASPECT-99/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | MASPECTJ-99
6 | 0.0.1-SNAPSHOT
7 | Verifies that the absence of code and aspect do not crash the plugin.
8 |
9 |
10 |
11 | org.aspectj
12 | aspectjrt
13 | @aspectjVersion@
14 |
15 |
16 |
17 |
18 |
19 |
20 | org.apache.maven.plugins
21 | maven-compiler-plugin
22 |
23 | 1.8
24 | 1.8
25 |
26 |
27 |
28 | org.codehaus.mojo
29 | aspectj-maven-plugin
30 | @project.version@
31 |
32 |
33 |
34 | compile
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/it/MASPECTJ-110/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean package
2 | #Maven2 + plexus won't make an empty List/Array, but keeps it null
3 | invoker.maven.version=3.0+
--------------------------------------------------------------------------------
/src/it/MASPECTJ-110/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 | public void print()
33 | {
34 | System.out.println( "Weave me" );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/it/MASPECTJ-110/src/test/java/AnotherClass.java:
--------------------------------------------------------------------------------
1 | public class AnotherClass
2 | {
3 | public void print()
4 | {
5 | System.out.println( "Weave me" );
6 | }
7 | }
--------------------------------------------------------------------------------
/src/it/MASPECTJ-86/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/MASPECTJ-86/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert !file.getText().contains("No sources found skipping aspectJ compile")
4 | ajcOptionsfile = new File(basedir, "target/classes/builddef.lst")
5 | assert file.exists()
6 |
--------------------------------------------------------------------------------
/src/it/MASPECTJ-96/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = compile
2 |
--------------------------------------------------------------------------------
/src/it/MASPECTJ-96/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | maspectj-96
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.codehaus.mojo
20 | aspectj-maven-plugin
21 | @project.version@
22 |
23 |
24 |
25 | compile
26 |
27 |
28 |
29 |
30 | true
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/it/MASPECTJ-96/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "target/classes/builddef.lst")
2 | assert !file.exists()
3 |
--------------------------------------------------------------------------------
/src/it/NoMainSourceWeave/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean test-compile
--------------------------------------------------------------------------------
/src/it/NoMainSourceWeave/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | no-mainsource-weave
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 | junit
16 | junit
17 | 4.13.1
18 | test
19 |
20 |
21 |
22 |
23 |
24 |
25 | org.apache.maven.plugins
26 | maven-compiler-plugin
27 |
28 | 1.8
29 | 1.8
30 |
31 |
32 |
33 | org.codehaus.mojo
34 | aspectj-maven-plugin
35 | @project.version@
36 |
37 |
38 |
39 | test-compile
40 |
41 |
42 |
43 |
44 | 1.8
45 | false
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/it/NoMainSourceWeave/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/NoMainSourceWeave/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/NoMainSourceWeave/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/NoMainSourceWeave/src/test/java/ATestCase.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 | import junit.framework.TestCase;
27 |
28 | /**
29 | * A testcase to test if we have correct weaving of testcases.
30 | *
31 | * @author Kaare Nilsen
32 | */
33 | public class ATestCase
34 | extends TestCase
35 | {
36 | /**
37 | * Just to check if we don't get errors in weaving.
38 | * @throws Exception
39 | */
40 | public void testCp()
41 | throws Exception
42 | {
43 | System.out.println( "I was executed" );
44 | assert(true);
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/NoParameters/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/NoParameters/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | parameters
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | false
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/NoParameters/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | */
30 | @Aspect
31 | public class Azpect
32 | {
33 | @Before ("execution (* Clazz.print(..))")
34 | public void trace()
35 | {
36 | System.out.println("Trace");
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/src/it/NoParameters/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | */
28 | public aspect OldStyleAspect
29 | {
30 |
31 | pointcut oldStylePointcut():execution(* Clazz.print(..));
32 |
33 | before() : oldStylePointcut(){
34 | System.out.println( "before print()" );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/it/NoParameters/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | */
28 | public class Clazz
29 | {
30 | public void print()
31 | {
32 | System.out.println( "Weave me" );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/it/NoParameters/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert !file.getText().contains("compiler errors:")
4 | assert !(file.getText() =~ /Running : ajc .* -parameters .*/).matches()
5 |
--------------------------------------------------------------------------------
/src/it/NoSourcesAvailable/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/NoSourcesAvailable/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | no-sources-project
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/it/Parameters/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/Parameters/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | parameters
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | true
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/Parameters/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | */
30 | @Aspect
31 | public class Azpect
32 | {
33 | @Before ("execution (* Clazz.print(..))")
34 | public void trace()
35 | {
36 | System.out.println("Trace");
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/src/it/Parameters/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | */
28 | public aspect OldStyleAspect
29 | {
30 |
31 | pointcut oldStylePointcut():execution(* Clazz.print(..));
32 |
33 | before() : oldStylePointcut(){
34 | System.out.println( "before print()" );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/it/Parameters/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | */
28 | public class Clazz
29 | {
30 | public void print()
31 | {
32 | System.out.println( "Weave me" );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/it/Parameters/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert !file.getText().contains("compiler errors:")
4 | assert file.getText() =~ /Running : ajc .* -parameters .*/
5 |
--------------------------------------------------------------------------------
/src/it/TOFIX_MASPECTJ-4/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean cobertura:cobertura
2 | #issue not fixed yet
3 | invoker.buildResult=failure
--------------------------------------------------------------------------------
/src/it/TOFIX_MASPECTJ-4/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/TOFIX_MASPECTJ-4/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/TOFIX_MASPECTJ-4/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/TOFIX_MASPECTJ-4/src/test/java/ATestCase.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import junit.framework.TestCase;
25 |
26 | /**
27 | * A testcase to test if we have correct weaving of testcases.
28 | *
29 | * @author Kaare Nilsen
30 | */
31 | public class ATestCase
32 | extends TestCase
33 | {
34 | /**
35 | * Just to check if we don't get errors in weaving.
36 | * @throws Exception
37 | */
38 | public void testCp()
39 | throws Exception
40 | {
41 | System.out.println( "I was executed" );
42 | assert(true);
43 | }
44 | }
--------------------------------------------------------------------------------
/src/it/WrongCompilerVersion/build-1-5.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/,\
2 | src/main/java/
3 |
--------------------------------------------------------------------------------
/src/it/WrongCompilerVersion/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
2 | invoker.buildResult = failure
--------------------------------------------------------------------------------
/src/it/WrongCompilerVersion/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | wrong-compilerversion
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 | 3.7.0
22 |
23 | 1.8
24 | 1.8
25 |
26 |
27 |
28 | org.codehaus.mojo
29 | aspectj-maven-plugin
30 | @project.version@
31 |
32 |
33 |
34 | compile
35 |
36 |
37 |
38 |
39 | build-1-5.ajproperties
40 | 1.4
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/WrongCompilerVersion/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/WrongCompilerVersion/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/WrongCompilerVersion/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | assert file.getText().contains("compiler errors:")
--------------------------------------------------------------------------------
/src/it/Xajruntimetarget/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/Xajruntimetarget/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | xajruntimetarget
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | 1.2
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/Xajruntimetarget/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/Xajruntimetarget/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/Xajruntimetarget/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/Xajruntimetarget/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | execLine = file.readLines().find { line -> line.contains( ' Running : ajc ' ) }
4 | assert execLine != null
5 | assert execLine.contains( " -Xajruntimetarget:1.2 " )
--------------------------------------------------------------------------------
/src/it/XhasMember/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/XhasMember/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | xhasmember
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | true
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/XhasMember/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/XhasMember/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/XhasMember/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/Xlint/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/Xlint/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | xlint
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | ignore
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/Xlint/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/Xlint/src/main/aspect/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * Testing of pre @AspectJ code style.
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public aspect OldStyleAspect
31 | {
32 |
33 | pointcut oldStylePointcut():execution(* Clazz.print(..));
34 |
35 | before() : oldStylePointcut(){
36 | System.out.println( "before print()" );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/it/Xlint/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 | public void print()
33 | {
34 | System.out.println( "Weave me" );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/it/Xlintfile/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/Xlintfile/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | xlintfile
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | ${project.build.outputDirectory}${file.separator}XlintTestFile.properties
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/Xlintfile/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | @Aspect
28 | public class Azpect
29 | {
30 | @Before ("execution (* Clazzz.print(..))") //Clazzz does not exist
31 | public void trace()
32 | {
33 | System.out.println("Trace");
34 | }
35 | }
--------------------------------------------------------------------------------
/src/it/Xlintfile/src/main/resources/XlintTestFile.properties:
--------------------------------------------------------------------------------
1 | adviceDidNotMatch = ignore
--------------------------------------------------------------------------------
/src/it/Xlintfile/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | execLine = file.readLines().find { line -> line.contains( ' Running : ajc ' ) }
4 | assert execLine != null
5 | assert execLine.contains( " -Xlintfile " )
6 | assert execLine.contains( "XlintTestFile.properties" )
7 | text = file.getText()
8 | //Xlint:adviceDidNotMatch set to ignore
9 | assert !text.contains("[Xlint:adviceDidNotMatch]")
10 | //WARNING level is default for Xlint:invalidAbsoluteTypeName
11 | assert text.contains("[WARNING] no match for this type name: Clazzz [Xlint:invalidAbsoluteTypeName]")
--------------------------------------------------------------------------------
/src/it/XmlConfigured/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | XmlConfigured
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 | ${project.build.outputDirectory}${file.separator}aopTestExample.xml
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/it/XmlConfigured/src/main/aspect/Azpect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * @author Krzysztof Debski
29 | */
30 | @Aspect()
31 | public class Azpect
32 | {
33 | @Before ("execution (* IncludedClazz.print(..)) || execution (* ExcludedClazz..print(..))")
34 | public void trace()
35 | {
36 | System.out.println("Trace");
37 | }
38 | }
--------------------------------------------------------------------------------
/src/it/XmlConfigured/src/main/java/ExcludedClazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The class NOT included in aopTestExample.xml
27 | *
28 | * @author Krzysztof Debski/a>
29 | */
30 | public class ExcludedClazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/XmlConfigured/src/main/java/IncludedClazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The class included in aopTestExample.xml
27 | *
28 | * @author Krzysztof Debski/a>
29 | */
30 | public class IncludedClazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/XmlConfigured/src/main/resources/aopTestExample.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/it/XmlConfigured/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | execLine = file.readLines().find { line -> line.contains( ' Running : ajc ' ) }
4 | assert execLine != null
5 | assert execLine.contains(" -xmlConfigured ")
6 | assert execLine.contains("aopTestExample.xml ")
7 |
8 | text = file.getText()
9 | assert text.contains("Aspect 'Azpect' is scoped to apply against types matching pattern 'IncludedClazz'")
10 | assert text.contains("Type 'ExcludedClazz' not woven by aspect 'Azpect' due to scope exclusion in XML definition")
11 | assert !text.contains("Type 'IncludedClazz' not woven by aspect 'Azpect' due to scope exclusion in XML definition")
12 |
--------------------------------------------------------------------------------
/src/it/Xset/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean compile
--------------------------------------------------------------------------------
/src/it/Xset/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | org.codehaus.mojo.aspectj.it
5 | xset
6 | 0.0.1-SNAPSHOT
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | @aspectjVersion@
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.plugins
20 | maven-compiler-plugin
21 |
22 | 1.8
23 | 1.8
24 |
25 |
26 |
27 | org.codehaus.mojo
28 | aspectj-maven-plugin
29 | @project.version@
30 |
31 |
32 |
33 | compile
34 |
35 |
36 |
37 |
38 | 1.8
39 |
40 | true
41 | false
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/it/Xset/src/main/aspect/Azpect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | import org.aspectj.lang.annotation.Aspect;
25 | import org.aspectj.lang.annotation.Before;
26 |
27 | /**
28 | * Testing of @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | @Aspect
33 | public class Azpect
34 | {
35 | @Before ("execution (* Clazz.print(..))")
36 | public void trace()
37 | {
38 | System.out.println("Trace");
39 | }
40 |
41 | @Before ("execution (* ATestCase.*(..))")
42 | public void testTrace()
43 | {
44 | System.out.println("Test-Trace");
45 | }
46 | }
--------------------------------------------------------------------------------
/src/it/Xset/src/main/java/Clazz.java:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | /**
26 | * The Class to get weaved
27 | *
28 | * @author Kaare Nilsen
29 | */
30 | public class Clazz
31 | {
32 |
33 | public void print()
34 | {
35 | System.out.println( "Weave me" );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/it/Xset/verify.groovy:
--------------------------------------------------------------------------------
1 | file = new File(basedir, "build.log")
2 | assert file.exists()
3 | execLine = file.readLines().find { line -> line.contains( ' Running : ajc ' ) }
4 | assert execLine != null
5 | assert execLine.contains( " -Xset:overWeaving=true,avoidFinal=false " ) || execLine.contains( " -Xset:avoidFinal=false,overWeaving=true " )
--------------------------------------------------------------------------------
/src/main/java/org/codehaus/mojo/aspectj/CompilationFailedException.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | import org.apache.maven.plugin.MojoExecutionException;
4 | import org.aspectj.bridge.IMessage;
5 |
6 | /**
7 | * Exception thrown when Ajc finds errors during compilation.
8 | *
9 | * @author Carlos Sanchez
10 | */
11 | public final class CompilationFailedException extends MojoExecutionException {
12 |
13 | // Internal state
14 | private static final long serialVersionUID = 2558168648061612263L;
15 | private static final String LINE_SEPARATOR = System.getProperty("line.separator");
16 |
17 | private CompilationFailedException(final String message) {
18 | super(message);
19 | }
20 |
21 | /**
22 | * Factory method which creates a CompilationFailedException from the supplied AJC IMessages.
23 | *
24 | * @param errors A non-empty array of IMessage objects which
25 | * @return A CompilationFailedException containing a string representation of the supplied errors.
26 | */
27 | public static CompilationFailedException create(final IMessage[] errors) {
28 |
29 | final StringBuilder sb = new StringBuilder();
30 | sb.append("AJC compiler errors:").append(LINE_SEPARATOR);
31 | for (final IMessage error : errors) {
32 | sb.append(error.toString()).append(LINE_SEPARATOR);
33 | }
34 |
35 | return new CompilationFailedException(sb.toString());
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codehaus/mojo/aspectj/Source.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 | import org.codehaus.plexus.util.DirectoryScanner;
27 |
28 | /**
29 | * Default implementation when a source is configured
30 | *
31 | * @author Robert Scholte
32 | * @since 1.4
33 | */
34 | public class Source extends DirectoryScanner {}
35 |
--------------------------------------------------------------------------------
/src/main/resources/aspectj-report.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2005-2006 The Codehaus.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | # this software and associated documentation files (the "Software"), to deal in
7 | # the Software without restriction, including without limitation the rights to
8 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 | # of the Software, and to permit persons to whom the Software is furnished to do
10 | # so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | #
23 | report.aspectj.name= AspectJ Report
24 | report.aspectj.description= The report contains HTML documentation for AspectJ constructs as well as \
25 | the Java constructs that javadoc renders. In addition it displays the crosscutting nature in the form of links. \
26 | That means, for example, that you can see everything affecting a method when reading the documentation for the method.
--------------------------------------------------------------------------------
/src/main/resources/aspectj-report_en.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2005-2006 The Codehaus.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | # this software and associated documentation files (the "Software"), to deal in
7 | # the Software without restriction, including without limitation the rights to
8 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 | # of the Software, and to permit persons to whom the Software is furnished to do
10 | # so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | #
--------------------------------------------------------------------------------
/src/main/resources/aspectj-report_nl.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2005-2006 The Codehaus.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | # this software and associated documentation files (the "Software"), to deal in
7 | # the Software without restriction, including without limitation the rights to
8 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 | # of the Software, and to permit persons to whom the Software is furnished to do
10 | # so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | #
23 | report.aspectj.name= AspectJ Rapport
24 | report.aspectj.description= Dit rapport bevat HTML documentatie voor zowel AspectJ constructs als Java constructs \
25 | zoals die door javadoc worden gegenereerd. Daarnaast toont het rapport het 'aspects' gedrag in de vorm van links. \
26 | Dit betekent bijvoorbeeld, dat je in de documentatie kunt achterhalen door welke 'aspects' een methode geraakt wordt.
--------------------------------------------------------------------------------
/src/main/resources/aspectj-report_sv.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright 2005-2006 The Codehaus.
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | # this software and associated documentation files (the "Software"), to deal in
7 | # the Software without restriction, including without limitation the rights to
8 | # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 | # of the Software, and to permit persons to whom the Software is furnished to do
10 | # so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in all
13 | # copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | # SOFTWARE.
22 | #
23 | report.aspectj.name= AspectJ-rapport
24 | report.aspectj.description= Rapporten innehåller HTML-dokumentation av AspectJ-konstruktionerna såväl som \
25 | de Java-konstruktioner som Javadoc renderar. Utöver det visar den kopplingen mellan dem i form av länkar. \
26 | Det betyder t.ex. att du kan se allt som påverkar en metod när du läser metodens dokumentation.
--------------------------------------------------------------------------------
/src/site/apt/ajc_reference/experimental_opts.apt:
--------------------------------------------------------------------------------
1 | ------
2 | AJC Experimental Options
3 | ------
4 | ------
5 | ------
6 |
7 | AspectJ Compiler reference: non-standard options
8 |
9 | Mojo's AspectJ Maven Plugin delegates the majority of its arguments to the AspectJ Compiler ("ajc"), which is part
10 | of the AspectJ binary distribution. For convenience, the help text and option reference of the AJC's nonstandard
11 | options is reproduced below verbatim. Relevant options found in the listing below are mirrored in the
12 | options of its goals, as defined in the {{{../plugin-info.html}Plugin Documentation}} page.
13 |
14 | +------------------------------------------
15 |
16 | AspectJ Compiler - Eclipse Compiler a00b62fa3572b0 (7Sept2022) - Java17
17 |
18 | AspectJ-specific non-standard options:
19 | -XnoInline dont inline advice
20 | -XnotReweavable create class files that cant be subsequently rewoven
21 | by AspectJ.
22 | -XserializableAspects allows aspects to implement serializable
23 | -XterminateAfterCompilation compile classes then terminate before weaving
24 | -XaddSerialVersionUID calculates and adds the serialVersionUID to any
25 | serializable type woven by an aspect
26 | -Xajruntimetarget: allows code to be generated that targets
27 | a 1.2, 1.5, 1.9 level AspectJ runtime (default 1.5)
28 | -XhasMember allow hasmethod() and hasfield type patterns in
29 | declare parents and declare @type
30 | -Xjoinpoints: supply a comma separated list of new joinpoints
31 | that can be identified by pointcuts. Values are:
32 | arrayconstruction, synchronization
33 |
34 | +------------------------------------------
35 |
--------------------------------------------------------------------------------
/src/site/apt/examples/differentTestAndCompile.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Separate test/compile settings
3 | ------
4 | ------
5 | ------
6 |
7 | Example of different configurations for compile and test-compile goal
8 |
9 | To have different weaving configurations for the main and test classes
10 | you can do as shown below.
11 |
12 | +------------------------------------------+
13 |
14 | ...
15 |
16 | ...
17 |
18 | org.aspectj
19 | aspectjrt
20 | ${aspectjVersion}
21 |
22 | ...
23 |
24 | ...
25 |
26 |
27 |
28 | org.codehaus.mojo
29 | aspectj-maven-plugin
30 | ${project.version}
31 |
32 |
33 | compile
34 |
35 | build.ajproperties
36 |
37 |
38 | compile
39 |
40 |
41 |
42 | test-compile
43 |
44 | test.ajproperties
45 |
46 |
47 | test-compile
48 |
49 |
50 |
51 |
52 | ...
53 |
54 |
55 | ...
56 |
57 | +------------------------------------------+
58 |
--------------------------------------------------------------------------------
/src/site/apt/examples/usingReport.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Configuring Report
3 | ------
4 | ------
5 | ------
6 |
7 | Configuring AspectJ report
8 |
9 |
10 | Example of ajdoc report creation.
11 |
12 | <> Since this report is using <<>> as a system scoped dependency
13 | you will need to make sure that your JAVA_HOME environment variable
14 | are set to a JDK, before you could use this report.
15 | Also we discovered that it does not work with JDK 1.5.0, and you would
16 | need to upgrade your VM if this is the one you currently are using.
17 |
18 | +------------------------------------------+
19 |
20 | ...
21 |
22 | ...
23 |
24 | org.aspectj
25 | aspectjrt
26 | ${aspectjVersion}
27 | compile
28 |
29 | ...
30 |
31 | ...
32 |
33 |
34 |
35 | org.codehaus.mojo
36 | aspectj-maven-plugin
37 | ${project.version}
38 |
39 | true
40 | true
41 | 1.5
42 | build.ajproperties
43 |
44 |
45 |
46 |
47 | aspectj-report
48 |
49 |
50 |
51 |
52 |
53 |
54 | ...
55 |
56 |
--------------------------------------------------------------------------------
/src/site/apt/index.apt.vm:
--------------------------------------------------------------------------------
1 | ------
2 | Introduction
3 | ------
4 | ------
5 | ------
6 |
7 | Mojo's AspectJ Maven Plugin
8 |
9 | This plugin weaves AspectJ aspects into your classes using the AspectJ compiler ("ajc").
10 | Typically, aspects are used in one of two ways within your Maven reactors:
11 |
12 | * As part of a , implying aspects and code are defined within the same Maven project.
13 | This is the simplest approach to start out with; feel free to examine the
14 | "Examples: Single-project AspectJ use" to better understand single-project use.
15 |
16 | * As part of a where one/some project(s) contains aspects and other
17 | projects within the Maven reactor contain code using the aspects ("woven by the aspects").
18 | This is a more complex and powerful approach, best suited when several Maven projects should be woven
19 | by a common set of aspects. The "Examples: Multi-module AspectJ use" contains a basic walkthrough
20 | of this approach.
21 |
22 | []
23 |
24 | The AspectJ Maven Plugin delegates most of its work to the AspectJ dependencies included within
25 | the plugin. (Refer to {{http://www.eclipse.org/aspectj/}} for descriptions and documentation about
26 | AspectJ itself).
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/site/resources/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mojohaus/aspectj-maven-plugin/fc15e27c407edf01ef469ecad9a62f9925db0f8c/src/site/resources/.nojekyll
--------------------------------------------------------------------------------
/src/test/java/org/codehaus/mojo/aspectj/AjcTestCompileMojoTest.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | import org.apache.maven.plugin.testing.AbstractMojoTestCase;
4 |
5 | public class AjcTestCompileMojoTest extends AbstractMojoTestCase {
6 |
7 | public void testExecuteWithSkip() throws Exception {
8 | final AjcTestCompileMojo testSubject = new AjcTestCompileMojo();
9 | System.setProperty(AjcTestCompileMojo.MAVEN_TEST_SKIP, "true");
10 | testSubject.execute();
11 | }
12 |
13 | public void testExecuteWithoutSkip() throws Exception {
14 | final AjcTestCompileMojo testSubject = new AjcTestCompileMojo();
15 |
16 | try {
17 | testSubject.execute();
18 | } catch (Exception e) {
19 | // should throw exception, as superclass executes
20 | // and no setup has been done.
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/test/projects/aspects-in-main-project/src/main/java/org/codehaus/mojo/aspectj/Azpect.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 | import org.aspectj.lang.annotation.Aspect;
27 | import org.aspectj.lang.annotation.Around;
28 |
29 | /**
30 | * Testing of @AspectJ code style.
31 | *
32 | * @author Kaare Nilsen
33 | */
34 | @Aspect
35 | public class Azpect
36 | {
37 | @Around ("execution (* Clazz.print(..))")
38 | public Object trace()
39 | {
40 | return "intercepted";
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/src/test/projects/aspects-in-main-project/src/main/java/org/codehaus/mojo/aspectj/Clazz.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public String print()
36 | {
37 | return "Weave me" ;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/test/projects/no-main-weave-project/src/main/aspect/org/codehaus/mojo/aspectj/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/test/projects/no-main-weave-project/src/main/java/org/codehaus/mojo/aspectj/Clazz.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/test/projects/no-sources-project/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | org.codehaus.mojo.aspectj.test-projects
7 | 1.0
8 | aspectj-compiler-no-sources-testproject
9 | jar
10 | aspectj-compiler-no-sources-testproject
11 |
12 |
13 | org.aspectj
14 | aspectjrt
15 | 1.6.1
16 | compile
17 |
18 |
19 |
20 |
21 |
22 |
23 | org.codehaus.mojo
24 | aspectj-maven-plugin
25 |
26 |
27 | compile
28 |
29 | compile
30 | test-compile
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/test/projects/parent-child-test-project/my-app/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | com.mycompany.app
5 | my-app
6 | jar
7 | 1.0-SNAPSHOT
8 | Maven Quick Start Archetype
9 | http://maven.apache.org
10 |
11 |
12 | junit
13 | junit
14 | 4.13.1
15 | test
16 |
17 |
18 |
19 | com.mycompany.app
20 | app
21 | 1.0-SNAPSHOT
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/test/projects/parent-child-test-project/my-app/src/main/aspect/com/mycompany/app/aspects/AppAspect.aj:
--------------------------------------------------------------------------------
1 | /**
2 | * The MIT License
3 | *
4 | * Copyright 2005-2006 The Codehaus.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | * this software and associated documentation files (the "Software"), to deal in
8 | * the Software without restriction, including without limitation the rights to
9 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10 | * of the Software, and to permit persons to whom the Software is furnished to do
11 | * so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | public aspect AppAspect
25 | {
26 |
27 | pointcut appCut() : call(* *.printHelloWorld(..));
28 |
29 | before() : appCut() {
30 | System.out.println( "I'm saying " );
31 | }
32 | }
--------------------------------------------------------------------------------
/src/test/projects/parent-child-test-project/my-app/src/main/java/com/mycompany/app/App.java:
--------------------------------------------------------------------------------
1 | package com.mycompany.app;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * TestClass for maven2 aspectJ plugin
29 | *
30 | */
31 | public class App
32 | {
33 |
34 | public App()
35 | {
36 | }
37 |
38 | public void printHelloWorld()
39 | {
40 | System.out.println( "Hello World!" );
41 | }
42 |
43 | public static void main( String[] args )
44 | {
45 | App app = new App();
46 | app.printHelloWorld();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/test/projects/parent-child-test-project/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 | com.mycompany.app
4 | 1.0-SNAPSHOT
5 | app
6 | pom
7 |
8 |
9 |
10 | org.aspectj
11 | aspectjrt
12 | 1.6.1
13 |
14 |
15 |
16 |
17 |
18 |
19 | org.codehaus.mojo
20 | aspectj-maven-plugin
21 |
22 |
23 |
24 | compile
25 | test-compile
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | Maven Snapshots
36 | http://snapshots.maven.codehaus.org/maven2/
37 |
38 | true
39 |
40 |
41 | false
42 |
43 |
44 |
45 |
46 |
47 | my-app
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/src/test/projects/test-project/build-1-2-using-exclusions.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/java/
2 | src.excludes = src/main/aspect/org/codehaus/mojo/aspectj/Azpect.java
3 |
--------------------------------------------------------------------------------
/src/test/projects/test-project/build-1-2.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/org/codehaus/mojo/aspectj/OldStyleAspect.aj,\
2 | src/main/java/
3 |
--------------------------------------------------------------------------------
/src/test/projects/test-project/build-1-5.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/,\
2 | src/main/java/
3 |
--------------------------------------------------------------------------------
/src/test/projects/test-project/src/main/aspect/org/codehaus/mojo/aspectj/OldStyleAspect.aj:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * Testing of pre @AspectJ code style.
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public aspect OldStyleAspect
33 | {
34 |
35 | pointcut oldStylePointcut():execution(* Clazz.print(..));
36 |
37 | before() : oldStylePointcut(){
38 | System.out.println( "before print()" );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/test/projects/test-project/src/main/java/org/codehaus/mojo/aspectj/Clazz.java:
--------------------------------------------------------------------------------
1 | package org.codehaus.mojo.aspectj;
2 |
3 | /**
4 | * The MIT License
5 | *
6 | * Copyright 2005-2006 The Codehaus.
7 | *
8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of
9 | * this software and associated documentation files (the "Software"), to deal in
10 | * the Software without restriction, including without limitation the rights to
11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12 | * of the Software, and to permit persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | * The above copyright notice and this permission notice shall be included in all
16 | * copies or substantial portions of the Software.
17 | *
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | * SOFTWARE.
25 | */
26 |
27 | /**
28 | * The Class to get weaved
29 | *
30 | * @author Kaare Nilsen
31 | */
32 | public class Clazz
33 | {
34 |
35 | public void print()
36 | {
37 | System.out.println( "Weave me" );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/test/projects/test-project/test-build-1-5.ajproperties:
--------------------------------------------------------------------------------
1 | src.includes = src/main/aspect/,\
2 | src/main/java/,\
3 | src/test/java/
4 |
--------------------------------------------------------------------------------