├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ └── maven.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 ├── CreateReportCustomDirs │ ├── 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 ├── CreateSiteCustomDirs │ ├── 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 ├── changeArgumentFileLocation │ ├── invoker.properties │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── Application.java │ │ └── test │ │ │ └── java │ │ │ └── DummyTest.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 ├── site ├── asciidoc │ ├── ajc_reference │ │ ├── experimental_opts.adoc │ │ └── standard_opts.adoc │ ├── examples │ │ ├── differentTestAndCompile.adoc │ │ ├── includeExclude.adoc │ │ ├── libraryJars.adoc │ │ ├── usingReport.adoc │ │ ├── usingTogetherWithAJDT.adoc │ │ ├── weaveDirectories.adoc │ │ └── weaveJars.adoc │ ├── index.adoc │ ├── multimodule │ │ └── multimodule_strategy.adoc │ └── usage.adoc ├── resources │ ├── .nojekyll │ └── css │ │ └── site.css └── 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/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [kriegaex] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Maven 2 | target/ 3 | 4 | # Eclipse 5 | .classpath 6 | .project 7 | .settings 8 | 9 | # IntelliJ IDEA 10 | *.iml 11 | .idea/ 12 | 13 | # AspectJ 14 | test.lst 15 | 16 | # Asciidoctor Maven Plugin - TODO: remove when plugin is fixed 17 | /src/site/asciidoc/.asciidoctor/ 18 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright 2005-2015 Mojo@Codehaus | Maven group ID: org.codehaus.mojo 4 | Copyright 2015-2018 Mojohaus | Maven group ID: org.codehaus.mojo 5 | Copyright 2018-2020 Nicholas Wong | Maven group ID: com.nickwongdev 6 | Copyright 2021-today Alexander Kriegisch | Maven group ID: dev.aspectj 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do 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 | -------------------------------------------------------------------------------- /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(6) == '-classpath' 4 | assert file.readLines().get(7).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 | dev.aspectj.aspectj-maven.it 5 | build-aspectj7 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.7 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | buildconfigfile-aspect5 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | build-1-5.ajproperties 45 | 1.8 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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/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 | dev.aspectj.aspectj-maven.it 5 | build-oldstyle 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | build-1-2.ajproperties 45 | 1.8 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | build-unknownaspectdir 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | src/no/aspects 45 | 1.8 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | createcustomloadtimeweavexml 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | /META-INF/customaop.xml 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | createdefaultloadtimeweavexml 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | true 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 dev.aspectj:aspectj-maven-plugin:${project.version}:aspectj-report 2 | -------------------------------------------------------------------------------- /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/reports/aspectj-report/index.html") 2 | assert indexFile.exists() 3 | clazzFile = new File(basedir, "target/reports/aspectj-report/Clazz.html") 4 | assert clazzFile.getText().contains("Advised by:") 5 | -------------------------------------------------------------------------------- /src/it/CreateReportCustomDirs/build-1-5.ajproperties: -------------------------------------------------------------------------------- 1 | src.includes = src/main/aspect/,\ 2 | src/main/java/ 3 | -------------------------------------------------------------------------------- /src/it/CreateReportCustomDirs/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean compile dev.aspectj:aspectj-maven-plugin:${project.version}:aspectj-report 2 | -------------------------------------------------------------------------------- /src/it/CreateReportCustomDirs/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/CreateReportCustomDirs/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/CreateReportCustomDirs/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/CreateReportCustomDirs/verify.groovy: -------------------------------------------------------------------------------- 1 | indexFile = new File(basedir, "no-target/custom-aspectj-report/index.html") 2 | assert indexFile.exists() 3 | clazzFile = new File(basedir, "no-target/custom-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/CreateSiteCustomDirs/build-1-5.ajproperties: -------------------------------------------------------------------------------- 1 | src.includes = src/main/aspect/,\ 2 | src/main/java/ 3 | -------------------------------------------------------------------------------- /src/it/CreateSiteCustomDirs/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean compile site -------------------------------------------------------------------------------- /src/it/CreateSiteCustomDirs/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/CreateSiteCustomDirs/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/CreateSiteCustomDirs/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/CreateSiteCustomDirs/verify.groovy: -------------------------------------------------------------------------------- 1 | indexFile = new File(basedir, "target/custom-site/custom-aspectj-report/index.html") 2 | assert indexFile.exists() 3 | clazzFile = new File(basedir, "target/custom-site/custom-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 | dev.aspectj.aspectj-maven.it 5 | exclusions-antstyle 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | 46 | **/Az*.* 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /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/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/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/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 | dev.aspectj.aspectj-maven.it 5 | javasources-default 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | javasources-empty 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | javasources-list 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 45 | 46 | src/java 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | javasources-nobasedir 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | WarningMessagesWithLineNumbers 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | unusedLocals,unusedImports,unusedArguments 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.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 | UTF-8 11 | UTF-8 12 | 13 | 14 | 15 | 16 | org.aspectj 17 | aspectjrt 18 | @aspectjVersion@ 19 | 20 | 21 | 22 | 23 | 24 | 25 | org.apache.maven.plugins 26 | maven-compiler-plugin 27 | 3.1 28 | 29 | 1.8 30 | 1.8 31 | 32 | 33 | 34 | dev.aspectj 35 | aspectj-maven-plugin 36 | @project.version@ 37 | 38 | 39 | 40 | compile 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.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 | dev.aspectj 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/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/NoParameters/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean compile -------------------------------------------------------------------------------- /src/it/NoParameters/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | dev.aspectj.aspectj-maven.it 5 | parameters 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | false 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | no-sources-project 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/it/Parameters/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean compile -------------------------------------------------------------------------------- /src/it/Parameters/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | dev.aspectj.aspectj-maven.it 5 | parameters 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | true 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | wrong-compilerversion 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | build-1-5.ajproperties 45 | 1.4 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | xajruntimetarget 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | 1.2 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | xhasmember 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | true 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | xlint 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | ignore 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | xlintfile 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | ${project.build.outputDirectory}${file.separator}XlintTestFile.properties 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.it 5 | XmlConfigured 6 | 0.0.1-SNAPSHOT 7 | 8 | 9 | UTF-8 10 | UTF-8 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | @aspectjVersion@ 18 | 19 | 20 | 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-compiler-plugin 26 | 3.1 27 | 28 | 1.8 29 | 1.8 30 | 31 | 32 | 33 | dev.aspectj 34 | aspectj-maven-plugin 35 | @project.version@ 36 | 37 | 38 | 39 | compile 40 | 41 | 42 | 43 | 44 | 1.8 45 | ${project.build.outputDirectory}${file.separator}aopTestExample.xml 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /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/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/it/changeArgumentFileLocation/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean test-compile 2 | -------------------------------------------------------------------------------- /src/it/changeArgumentFileLocation/src/main/java/Application.java: -------------------------------------------------------------------------------- 1 | public class Application { 2 | public static void main(String[] args) { 3 | System.out.println("Dummy class to trigger AspectJ Maven 'compile' goal"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/it/changeArgumentFileLocation/src/test/java/DummyTest.java: -------------------------------------------------------------------------------- 1 | public class DummyTest { 2 | public static void main(String[] args) { 3 | System.out.println("Dummy class to trigger AspectJ Maven 'test-compile' goal"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/it/changeArgumentFileLocation/verify.groovy: -------------------------------------------------------------------------------- 1 | notExistingFiles = [ 2 | "classes/builddef.lst", 3 | "test-classes/builddef.lst", 4 | "classes/builddef-test.lst", 5 | "test-classes/builddef-test.lst" 6 | ] 7 | existingFiles = [ 8 | "aspectj-build/builddef.lst", 9 | "aspectj-build/builddef-test.lst" 10 | ] 11 | 12 | for (file in notExistingFiles) 13 | assert !new File("$basedir/target/$file").exists() 14 | for (file in existingFiles) 15 | assert new File("$basedir/target/$file").exists() 16 | -------------------------------------------------------------------------------- /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 | 27 | import org.codehaus.plexus.util.DirectoryScanner; 28 | 29 | /** 30 | * Default implementation when a source is configured 31 | * 32 | * @author Robert Scholte 33 | * @since 1.4 34 | */ 35 | public class Source 36 | extends DirectoryScanner 37 | { 38 | 39 | } 40 | -------------------------------------------------------------------------------- /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 javadoc information, enriched by cross-cutting information from \ 25 | AspectJ aspects. For example, you can see aspects affecting a method in that method's documentation. 26 | -------------------------------------------------------------------------------- /src/site/asciidoc/ajc_reference/experimental_opts.adoc: -------------------------------------------------------------------------------- 1 | # AJC experimental options 2 | :imagesdir: ../images 3 | 4 | ## AspectJ Compiler reference: non-standard options 5 | 6 | AspectJ Maven Plugin delegates the majority of its arguments to the AspectJ Compiler `ajc`, which is part of the 7 | AspectJ binary distribution. For convenience, the help text for AJC's non-standard options is reproduced below verbatim. 8 | 9 | Relevant options found in the listing below are mirrored in the corresponding plugin goal options, see 10 | link:../plugin-info.html[Plugin Documentation]. 11 | 12 | For a reference of standard AJC options, please refer to xref:standard_opts.adoc[AJC standard options]. 13 | 14 | ---- 15 | AspectJ Compiler - Eclipse Compiler 8398f6c1210ec3 (13Feb2024) - Java21 16 | 17 | AspectJ-specific non-standard options: 18 | -XnoInline do not inline advice 19 | -XnotReweavable create class files that cannot be subsequently 20 | rewoven by AspectJ. 21 | -XserializableAspects allows aspects to implement serializable 22 | -XterminateAfterCompilation compile classes then terminate before weaving 23 | -XaddSerialVersionUID calculates and adds the serialVersionUID to any 24 | serializable type woven by an aspect 25 | -Xajruntimetarget: allows code to be generated that targets 26 | a 1.2, 1.5, 1.9 level AspectJ runtime (default 1.5) 27 | -XhasMember allow hasmethod() and hasfield type patterns in 28 | declare parents and declare @type 29 | -Xjoinpoints: supply a comma separated list of new joinpoints 30 | that can be identified by pointcuts. Values are: 31 | arrayconstruction, synchronization 32 | ---- 33 | -------------------------------------------------------------------------------- /src/site/asciidoc/examples/differentTestAndCompile.adoc: -------------------------------------------------------------------------------- 1 | # Separate test/compile settings 2 | :imagesdir: ../images 3 | 4 | ## Example of different configurations for compile and test-compile goal 5 | 6 | To have different weaving configurations for the main and test classes, you can configure the plugin as shown below. 7 | 8 | [source,xml] 9 | ---- 10 | 11 | 12 | 13 | 14 | 15 | org.aspectj 16 | aspectjrt 17 | ${aspectjVersion} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ${project.groupId} 26 | aspectj-maven-plugin 27 | ${project.version} 28 | 29 | 30 | compile 31 | 32 | build.ajproperties 33 | 34 | 35 | compile 36 | 37 | 38 | 39 | test-compile 40 | 41 | test.ajproperties 42 | 43 | 44 | test-compile 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | ---- 55 | -------------------------------------------------------------------------------- /src/site/asciidoc/examples/usingReport.adoc: -------------------------------------------------------------------------------- 1 | # Configuring report 2 | :imagesdir: ../images 3 | 4 | ## Configuring AspectJ report 5 | 6 | Example of `ajdoc` report creation, i.e. javadoc-like API documentation enhanced by aspect information. 7 | 8 | **Note:** Since this report is using `tools.jar` on JDK 8 as a system scoped dependency and the corresponding JDK tool 9 | classes for javadoc generation on JDK 9+, you need to make sure that your `JAVA_HOME` environment variable points to the 10 | correct JDK before using this feature. You can just try your default setup, but if classes or libraries are not found, 11 | you probably need to adjust your configuration correspondingly. 12 | 13 | [source,xml] 14 | ---- 15 | 16 | 17 | 18 | 19 | 20 | org.aspectj 21 | aspectjrt 22 | ${aspectjVersion} 23 | compile 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ${project.groupId} 32 | aspectj-maven-plugin 33 | ${project.version} 34 | 35 | true 36 | true 37 | 8 38 | build.ajproperties 39 | 40 | 41 | 42 | 43 | aspectj-report 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | ---- 53 | -------------------------------------------------------------------------------- /src/site/asciidoc/examples/usingTogetherWithAJDT.adoc: -------------------------------------------------------------------------------- 1 | # Using with AJDT 2 | :imagesdir: ../images 3 | 4 | ## Using together with AJDT 5 | 6 | To use this plugin together with AJDT (AspectJ Development Tools for Eclipse IDE), you simply specify the 7 | `ajdtBuildDefFile` property to point to the `build.ajproperties` file generated by AJDT. The use of this property 8 | overrides the configured project source folders. Any include or exclude elements in the POM are also disregarded. 9 | 10 | [source,xml] 11 | ---- 12 | 13 | 14 | 15 | 16 | 17 | org.aspectj 18 | aspectjrt 19 | ${aspectjVersion} 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | ${project.groupId} 28 | aspectj-maven-plugin 29 | ${project.version} 30 | 31 | build.ajproperties 32 | 33 | 34 | 35 | 36 | compile 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | ---- 47 | 48 | ### Example of a valid build properties file 49 | 50 | **Note:** In this file, the paths are relative to the project's base directory. 51 | 52 | ---- 53 | src.includes = src/main/aspect,\ 54 | src/main/java/com/mycompany/myaspects/**/*TransactionAspect.java 55 | src.excludes = src/main/java/org/codehaus/mojo/aspectj/Azpect.java 56 | ---- 57 | -------------------------------------------------------------------------------- /src/site/resources/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dev-aspectj/aspectj-maven-plugin/e14c6397973aa833023285e61721dd38ce679c39/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 | 8 | public void testExecuteWithSkip() throws Exception { 9 | final AjcTestCompileMojo testSubject = new AjcTestCompileMojo(); 10 | System.setProperty(AjcTestCompileMojo.MAVEN_TEST_SKIP, "true"); 11 | testSubject.execute(); 12 | } 13 | 14 | public void testExecuteWithoutSkip() throws Exception { 15 | final AjcTestCompileMojo testSubject = new AjcTestCompileMojo(); 16 | 17 | try 18 | { 19 | testSubject.execute(); 20 | } 21 | catch (Exception e) 22 | { 23 | // should throw exception, as superclass executes 24 | // and no setup has been done. 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /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 | dev.aspectj.aspectj-maven.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 | dev.aspectj 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 | dev.aspectj.aspectj-maven.test-projects 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 | 15 | 4.13.2 16 | test 17 | 18 | 19 | 20 | com.mycompany.app 21 | app 22 | 1.0-SNAPSHOT 23 | 24 | 25 | -------------------------------------------------------------------------------- /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 | 5 | 4.0.0 6 | dev.aspectj.aspectj-maven.test-projects 7 | 1.0-SNAPSHOT 8 | app 9 | pom 10 | 11 | 12 | 13 | org.aspectj 14 | aspectjrt 15 | 1.6.1 16 | 17 | 18 | 19 | 20 | 21 | 22 | dev.aspectj 23 | aspectj-maven-plugin 24 | 25 | 26 | 27 | compile 28 | test-compile 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | Maven Snapshots 39 | http://snapshots.maven.codehaus.org/maven2/ 40 | 41 | true 42 | 43 | 44 | false 45 | 46 | 47 | 48 | 49 | 50 | my-app 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------