Index: src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java =================================================================== --- src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java (wersja 576003) +++ src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java (kopia robocza) @@ -159,7 +159,7 @@ suite.addTestSuite( MavenIT0113ServerAuthzAvailableToWagonMgrInPlugin.class ); suite.addTestSuite( MavenIT0114ExtensionThatProvidesResources.class ); suite.addTestSuite( MavenIT0118AttachedArtifactsInReactor.class ); - + suite.addTestSuite( MavenIT0127PluginDependencies.class ); // ---------------------------------------------------------------------------------------------------- // Tests that need to be fixed. // ---------------------------------------------------------------------------------------------------- Index: src/test/java/org/apache/maven/integrationtests/MavenIT0127AntrunDependencies.java =================================================================== --- src/test/java/org/apache/maven/integrationtests/MavenIT0127AntrunDependencies.java (wersja 572210) +++ src/test/java/org/apache/maven/integrationtests/MavenIT0127AntrunDependencies.java (kopia robocza) @@ -1,50 +0,0 @@ -package org.apache.maven.integrationtests; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import java.io.File; - -import org.apache.maven.it.Verifier; -import org.apache.maven.it.util.ResourceExtractor; - -public class MavenIT0127AntrunDependencies - extends AbstractMavenIntegrationTestCase -{ - - /** - * MNG-1323 - */ - public void testit0127() - throws Exception - { - File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0127-antrunDependencies" ); - - Verifier verifier = new Verifier( testDir.getAbsolutePath() ); - verifier.deleteArtifact( "org.apache.maven.its.it0127", "parent", "1.0-SNAPSHOT", "pom" ); - verifier.deleteArtifact( "org.apache.maven.its.it0127", "a", "1.0-SNAPSHOT", "jar" ); - verifier.deleteArtifact( "org.apache.maven.its.it0127", "b", "1.0-SNAPSHOT", "jar" ); - verifier.executeGoal( "compile" ); - verifier.verifyErrorFreeLog(); - verifier.resetStreams(); - } - - - -} Index: src/test/java/org/apache/maven/integrationtests/MavenIT0127PluginDependencies.java =================================================================== --- src/test/java/org/apache/maven/integrationtests/MavenIT0127PluginDependencies.java (wersja 0) +++ src/test/java/org/apache/maven/integrationtests/MavenIT0127PluginDependencies.java (wersja 0) @@ -0,0 +1,56 @@ +package org.apache.maven.integrationtests; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.File; + +import org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + +public class MavenIT0127PluginDependencies + extends AbstractMavenIntegrationTestCase +{ + + /** + * MNG-1323 + */ + public void testit0127() + throws Exception + { + /*Prepere tools*/ + File toolsDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0127-pluginDependencies/tools/classLoadableEnforcerRule" ); + + Verifier verifierTools = new Verifier( toolsDir.getAbsolutePath() ); + verifierTools.executeGoal( "install" ); + verifierTools.verifyErrorFreeLog(); + verifierTools.resetStreams(); + + + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0127-pluginDependencies" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.deleteArtifact( "org.apache.maven.its.it0127", "parent", "1.0-SNAPSHOT", "pom" ); + verifier.deleteArtifact( "org.apache.maven.its.it0127", "a", "1.0-SNAPSHOT", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.it0127", "b", "1.0-SNAPSHOT", "jar" ); + verifier.executeGoal( "compile" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + } +} Zmiany atrybutów dla: src/test/java/org/apache/maven/integrationtests/MavenIT0127PluginDependencies.java ___________________________________________________________________ Nazwa: svn:keywords + "Author Date Id Revision" Nazwa: svn:eol-style + native Index: src/test/resources/it0127-pluginDependencies/a/src/main/java/org/apache/maven/its/it0127/Component.java =================================================================== --- src/test/resources/it0127-pluginDependencies/a/src/main/java/org/apache/maven/its/it0127/Component.java (wersja 0) +++ src/test/resources/it0127-pluginDependencies/a/src/main/java/org/apache/maven/its/it0127/Component.java (wersja 0) @@ -0,0 +1,25 @@ +package org.apache.maven.its.it0127; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +public interface Component +{ + void func(); +} Index: src/test/resources/it0127-pluginDependencies/a/pom.xml =================================================================== --- src/test/resources/it0127-pluginDependencies/a/pom.xml (wersja 0) +++ src/test/resources/it0127-pluginDependencies/a/pom.xml (wersja 0) @@ -0,0 +1,63 @@ + + + + + + 4.0.0 + + org.apache.maven.its.it0127 + parent + 1.0-SNAPSHOT + + a + a + jar + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + org.apache.maven.its.it0127.tools + classLoadableEnforcerRule + 1.0-SNAPSHOT + + + + + enforce + + + java.lang.Integer + + + + enforce-once + + + + + + + Index: src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/.classpath =================================================================== --- src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/.classpath (wersja 0) +++ src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/.classpath (wersja 0) @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ brakuje znaku końca linii na końcu pliku Index: src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/.project =================================================================== --- src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/.project (wersja 0) +++ src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/.project (wersja 0) @@ -0,0 +1,13 @@ + + classLoadableEnforcerRule + + + + + org.eclipse.jdt.core.javabuilder + + + + org.eclipse.jdt.core.javanature + + \ brakuje znaku końca linii na końcu pliku Index: src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/src/main/java/org/apache/maven/its/it0127/ClassLoadable.java =================================================================== --- src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/src/main/java/org/apache/maven/its/it0127/ClassLoadable.java (wersja 0) +++ src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/src/main/java/org/apache/maven/its/it0127/ClassLoadable.java (wersja 0) @@ -0,0 +1,31 @@ +package org.apache.maven.its.it0127; + +import org.apache.maven.shared.enforcer.rule.api.EnforcerRule; +import org.apache.maven.shared.enforcer.rule.api.EnforcerRuleException; +import org.apache.maven.shared.enforcer.rule.api.EnforcerRuleHelper; + +/** + * Checks if class given in parameter "className" is + * available (in current classLoader) to be loaded. + * + * @author Piotr Tabor + */ +public class ClassLoadable + implements EnforcerRule +{ + private String className; + + public void execute( EnforcerRuleHelper arg0 ) + throws EnforcerRuleException + { + try + { + Thread.currentThread().getContextClassLoader().loadClass( className ); + } + catch ( ClassNotFoundException e ) + { + throw new EnforcerRuleException( "Class not found: " + className, e ); + } + } + +} Index: src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/pom.xml =================================================================== --- src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/pom.xml (wersja 0) +++ src/test/resources/it0127-pluginDependencies/tools/classLoadableEnforcerRule/pom.xml (wersja 0) @@ -0,0 +1,49 @@ + + 4.0.0 + org.apache.maven.its.it0127.tools + classLoadableEnforcerRule + classLoadableEnforcerRule + 1.0-SNAPSHOT + http://maven.apache.org + + + + + + org.apache.maven.shared + maven-enforcer-rule-api + 1.0-alpha-1 + + + org.apache.maven + maven-project + 2.0.5 + + + org.apache.maven + maven-core + 2.0.5 + + + org.apache.maven + maven-artifact + 2.0.5 + + + org.apache.maven + maven-plugin-api + 2.0.5 + + + org.codehaus.plexus + plexus-container-default + 1.0-alpha-9 + + + junit + junit + 3.8.1 + test + + + \ brakuje znaku końca linii na końcu pliku Index: src/test/resources/it0127-pluginDependencies/b/src/main/java/org/apache/maven/its/it0127/MyClient.java =================================================================== --- src/test/resources/it0127-pluginDependencies/b/src/main/java/org/apache/maven/its/it0127/MyClient.java (wersja 0) +++ src/test/resources/it0127-pluginDependencies/b/src/main/java/org/apache/maven/its/it0127/MyClient.java (wersja 0) @@ -0,0 +1,29 @@ +package org.apache.maven.its.it0127; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +public class MyClient +{ + + void func() + { + } +} Index: src/test/resources/it0127-pluginDependencies/b/pom.xml =================================================================== --- src/test/resources/it0127-pluginDependencies/b/pom.xml (wersja 0) +++ src/test/resources/it0127-pluginDependencies/b/pom.xml (wersja 0) @@ -0,0 +1,68 @@ + + + + + + 4.0.0 + + org.apache.maven.its.it0127 + parent + 1.0-SNAPSHOT + + b + b + jar + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + org.apache.maven.its.it0127.tools + classLoadableEnforcerRule + 1.0-SNAPSHOT + + + jakarta-regexp + jakarta-regexp + 1.4 + + + + + enforce + + + org.apache.regexp.REProgram + + + + enforce-once + + + + + + + \ brakuje znaku końca linii na końcu pliku Index: src/test/resources/it0127-pluginDependencies/pom.xml =================================================================== --- src/test/resources/it0127-pluginDependencies/pom.xml (wersja 0) +++ src/test/resources/it0127-pluginDependencies/pom.xml (wersja 0) @@ -0,0 +1,33 @@ + + + 4.0.0 + org.apache.maven.its.it0127 + parent + Parent + pom + 1.0-SNAPSHOT + + a + b + + + MNG-1323 + + \ brakuje znaku końca linii na końcu pliku Index: src/test/resources/pom.xml =================================================================== --- src/test/resources/pom.xml (wersja 576003) +++ src/test/resources/pom.xml (kopia robocza) @@ -126,8 +126,6 @@ it0126-testJarDependency - + it0127-pluginDependencies Index: src/test/resources/it0127-antrunDependencies/a/src/main/java/org/apache/maven/its/it0127/Component.java =================================================================== --- src/test/resources/it0127-antrunDependencies/a/src/main/java/org/apache/maven/its/it0127/Component.java (wersja 572210) +++ src/test/resources/it0127-antrunDependencies/a/src/main/java/org/apache/maven/its/it0127/Component.java (kopia robocza) @@ -1,25 +0,0 @@ -package org.apache.maven.its.it0127; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -public interface Component -{ - void func(); -} Index: src/test/resources/it0127-antrunDependencies/a/pom.xml =================================================================== --- src/test/resources/it0127-antrunDependencies/a/pom.xml (wersja 572210) +++ src/test/resources/it0127-antrunDependencies/a/pom.xml (kopia robocza) @@ -1,60 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.it0127 - parent - 1.0-SNAPSHOT - - a - a - jar - - - - - maven-antrun-plugin - - - generate-sources - - - - - - - - - run - - - - - - - - - - Index: src/test/resources/it0127-antrunDependencies/b/src/main/java/org/apache/maven/its/it0127/MyClient.java =================================================================== --- src/test/resources/it0127-antrunDependencies/b/src/main/java/org/apache/maven/its/it0127/MyClient.java (wersja 572210) +++ src/test/resources/it0127-antrunDependencies/b/src/main/java/org/apache/maven/its/it0127/MyClient.java (kopia robocza) @@ -1,29 +0,0 @@ -package org.apache.maven.its.it0127; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - -public class MyClient -{ - - void func() - { - } -} Index: src/test/resources/it0127-antrunDependencies/b/pom.xml =================================================================== --- src/test/resources/it0127-antrunDependencies/b/pom.xml (wersja 572210) +++ src/test/resources/it0127-antrunDependencies/b/pom.xml (kopia robocza) @@ -1,84 +0,0 @@ - - - - - - 4.0.0 - - org.apache.maven.its.it0127 - parent - 1.0-SNAPSHOT - - b - b - jar - - - org.apache.maven.its.it0127 - a - 1.0-SNAPSHOT - - - - - - - maven-antrun-plugin - - - generate-sources - - - - - - - - - - - - run - - - - - - jakarta-regexp - jakarta-regexp - 1.4 - - - ant - ant-jakarta-regexp - 1.6.1 - - - org.apache.ant - ant-nodeps - 1.7.0 - - - - - - Index: src/test/resources/it0127-antrunDependencies/pom.xml =================================================================== --- src/test/resources/it0127-antrunDependencies/pom.xml (wersja 572210) +++ src/test/resources/it0127-antrunDependencies/pom.xml (kopia robocza) @@ -1,38 +0,0 @@ - - - - - - 4.0.0 - org.apache.maven.its.it0127 - parent - Parent - pom - 1.0-SNAPSHOT - - a - b - - - MNG-1323 - -