Cleanup of interpolator, removing references to PomClassicDomainModel, these aren't needed anymore.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@769827 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-04-29 17:00:17 +00:00
parent 260db144b1
commit baf09a4148
9 changed files with 70 additions and 732 deletions

View File

@ -417,7 +417,7 @@ public class DefaultMavenProjectBuilder
} }
try try
{ {
model = interpolator.interpolateDomainModel( domainModel, props ).getModel(); model = interpolator.interpolateModel( model, props, domainModel.getProjectDirectory() );
} }
catch ( IOException e ) catch ( IOException e )
{ {
@ -465,7 +465,6 @@ public class DefaultMavenProjectBuilder
List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>(); List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( projectBuilderConfiguration.getExecutionProperties(), PomInterpolatorTag.EXECUTION_PROPERTIES.name() ) ); interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( projectBuilderConfiguration.getExecutionProperties(), PomInterpolatorTag.EXECUTION_PROPERTIES.name() ) );
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( projectBuilderConfiguration.getUserProperties(), PomInterpolatorTag.USER_PROPERTIES.name() ) );
ProfileManagerInfo profileInfo = new ProfileManagerInfo(interpolatorProperties, activeProfileIds, inactiveProfileIds); ProfileManagerInfo profileInfo = new ProfileManagerInfo(interpolatorProperties, activeProfileIds, inactiveProfileIds);
PomClassicDomainModel domainModel = new PomClassicDomainModel( pomFile ); PomClassicDomainModel domainModel = new PomClassicDomainModel( pomFile );

View File

@ -1,9 +1,11 @@
package org.apache.maven.model.interpolator; package org.apache.maven.model.interpolator;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.Writer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@ -29,39 +31,41 @@ import org.apache.maven.model.PomClassicDomainModel;
import org.apache.maven.model.ProjectUri; import org.apache.maven.model.ProjectUri;
import org.apache.maven.model.Reporting; import org.apache.maven.model.Reporting;
import org.apache.maven.model.Resource; import org.apache.maven.model.Resource;
import org.apache.maven.model.io.xpp3.MavenXpp3Writer;
import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.util.WriterFactory;
@Component(role = Interpolator.class) @Component(role = Interpolator.class)
public class DefaultInterpolator public class DefaultInterpolator
implements Interpolator implements Interpolator
{ {
public PomClassicDomainModel interpolateDomainModel( PomClassicDomainModel dm, Properties properties ) public Model interpolateModel( Model model, Properties properties, File projectDirectory )
throws IOException throws IOException
{ {
List<InterpolatorProperty> props = new ArrayList<InterpolatorProperty>(); if ( model == null )
{
throw new IllegalArgumentException( "model: null" );
}
if(properties == null)
{
return model;
}
List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
for ( Entry<Object, Object> e : properties.entrySet() ) for ( Entry<Object, Object> e : properties.entrySet() )
{ {
props.add( new InterpolatorProperty( (String) e.getKey(), (String) e.getValue(), PomInterpolatorTag.EXECUTION_PROPERTIES.toString() ) ); interpolatorProperties.add( new InterpolatorProperty( (String) e.getKey(), (String) e.getValue(), PomInterpolatorTag.EXECUTION_PROPERTIES.toString() ) );
} }
return interpolateDomainModel( dm, props );
}
public PomClassicDomainModel interpolateDomainModel( PomClassicDomainModel dm, List<InterpolatorProperty> interpolatorProperties )
throws IOException
{
if ( dm == null )
{
throw new IllegalArgumentException( "dm: null" );
}
if ( !containsProjectVersion( interpolatorProperties ) ) if ( !containsProjectVersion( interpolatorProperties ) )
{ {
aliases.put( "\\$\\{project.version\\}", "\\$\\{version\\}" ); aliases.put( "\\$\\{project.version\\}", "\\$\\{version\\}" );
} }
//TODO: Insert customized logic for parsing //TODO: Insert customized logic for parsing
List<ModelProperty> modelProperties = getModelProperties( dm.getInputStream() ); List<ModelProperty> modelProperties = getModelProperties( model );
if ( "jar".equals( dm.getModel().getPackaging() ) ) if ( "jar".equals( model.getPackaging() ) )
{ {
modelProperties.add( new ModelProperty( ProjectUri.packaging, "jar" ) ); modelProperties.add( new ModelProperty( ProjectUri.packaging, "jar" ) );
} }
@ -88,17 +92,14 @@ public class DefaultInterpolator
List<InterpolatorProperty> standardInterpolatorProperties = new ArrayList<InterpolatorProperty>(); List<InterpolatorProperty> standardInterpolatorProperties = new ArrayList<InterpolatorProperty>();
if ( dm.isPomInBuild() ) String basedir = projectDirectory.getAbsolutePath();
{ standardInterpolatorProperties.add( new InterpolatorProperty( "${project.basedir}", basedir, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
String basedir = dm.getProjectDirectory().getAbsolutePath(); standardInterpolatorProperties.add( new InterpolatorProperty( "${basedir}", basedir, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
standardInterpolatorProperties.add( new InterpolatorProperty( "${project.basedir}", basedir, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) ); standardInterpolatorProperties.add( new InterpolatorProperty( "${pom.basedir}", basedir, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
standardInterpolatorProperties.add( new InterpolatorProperty( "${basedir}", basedir, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
standardInterpolatorProperties.add( new InterpolatorProperty( "${pom.basedir}", basedir, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
String baseuri = dm.getProjectDirectory().toURI().toString(); String baseuri = projectDirectory.toURI().toString();
standardInterpolatorProperties.add( new InterpolatorProperty( "${project.baseUri}", baseuri, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) ); standardInterpolatorProperties.add( new InterpolatorProperty( "${project.baseUri}", baseuri, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
standardInterpolatorProperties.add( new InterpolatorProperty( "${pom.baseUri}", baseuri, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) ); standardInterpolatorProperties.add( new InterpolatorProperty( "${pom.baseUri}", baseuri, PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
}
for ( ModelProperty mp : modelProperties ) for ( ModelProperty mp : modelProperties )
{ {
@ -129,28 +130,24 @@ public class DefaultInterpolator
interpolateModelProperties( modelProperties, ips1 ); interpolateModelProperties( modelProperties, ips1 );
// SECOND PASS - Set absolute paths on build directories Map<ModelProperty, ModelProperty> buildDirectories = new HashMap<ModelProperty, ModelProperty>();
if ( dm.isPomInBuild() ) for ( ModelProperty mp : secondPassModelProperties )
{ {
String basedir = dm.getProjectDirectory().getAbsolutePath(); if ( mp.getUri().startsWith( ProjectUri.Build.xUri ) || mp.getUri().equals( ProjectUri.Reporting.outputDirectory ) )
Map<ModelProperty, ModelProperty> buildDirectories = new HashMap<ModelProperty, ModelProperty>(); {
for ( ModelProperty mp : secondPassModelProperties ) File file = new File( mp.getResolvedValue() );
{ if ( !file.isAbsolute() && !mp.getResolvedValue().startsWith( "${project.build." ) && !mp.getResolvedValue().equals( "${project.basedir}" ) )
if ( mp.getUri().startsWith( ProjectUri.Build.xUri ) || mp.getUri().equals( ProjectUri.Reporting.outputDirectory ) ) {
{ buildDirectories.put( mp, new ModelProperty( mp.getUri(), new File( basedir, file.getPath() ).getAbsolutePath() ) );
File file = new File( mp.getResolvedValue() ); }
if ( !file.isAbsolute() && !mp.getResolvedValue().startsWith( "${project.build." ) && !mp.getResolvedValue().equals( "${project.basedir}" ) ) }
{
buildDirectories.put( mp, new ModelProperty( mp.getUri(), new File( basedir, file.getPath() ).getAbsolutePath() ) );
}
}
}
for ( Map.Entry<ModelProperty, ModelProperty> e : buildDirectories.entrySet() )
{
secondPassModelProperties.remove( e.getKey() );
secondPassModelProperties.add( e.getValue() );
}
} }
for ( Map.Entry<ModelProperty, ModelProperty> e : buildDirectories.entrySet() )
{
secondPassModelProperties.remove( e.getKey() );
secondPassModelProperties.add( e.getValue() );
}
// THIRD PASS - Use build directories as interpolator properties // THIRD PASS - Use build directories as interpolator properties
List<InterpolatorProperty> ips2 = new ArrayList<InterpolatorProperty>( interpolatorProperties ); List<InterpolatorProperty> ips2 = new ArrayList<InterpolatorProperty>( interpolatorProperties );
@ -175,30 +172,17 @@ public class DefaultInterpolator
try try
{ {
String xml = unmarshalModelPropertiesToXml( modelProperties, ProjectUri.baseUri ); String xml = unmarshalModelPropertiesToXml( modelProperties, ProjectUri.baseUri );
PomClassicDomainModel domainModel = new PomClassicDomainModel( new ByteArrayInputStream( xml.getBytes( "UTF-8" ) ) ); Model m = new PomClassicDomainModel( new ByteArrayInputStream( xml.getBytes( "UTF-8" ) ) ).getModel();
if ( dm.getProjectDirectory() != null ) if ( projectDirectory != null )
{ {
alignPaths( domainModel.getModel(), dm.getProjectDirectory() ); alignPaths( m, projectDirectory );
} }
return domainModel; return m;
} }
catch ( IOException e ) catch ( IOException e )
{ {
throw new IllegalStateException( "Unmarshalling of model properties failed", e ); throw new IllegalStateException( "Unmarshalling of model properties failed", e );
} }
/*
for(ModelProperty mp : modelProperties)
{
if((mp.getValue() != null) && !mp.getValue().equals(mp.getResolvedValue()))
{
if(mp.getUri().equals(ProjectUri.version))
{
}
}
}
*/
} }
/** /**
@ -350,9 +334,27 @@ public class DefaultInterpolator
return ips; return ips;
} }
private static List<ModelProperty> getModelProperties( InputStream is )
private static List<ModelProperty> getModelProperties( Model model )
throws IOException throws IOException
{ {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Writer out = null;
MavenXpp3Writer writer = new MavenXpp3Writer();
try
{
out = WriterFactory.newXmlWriter( baos );
writer.write( out, model );
}
finally
{
if ( out != null )
{
out.close();
}
}
Set<String> s = new HashSet<String>(); Set<String> s = new HashSet<String>();
//TODO: Should add all collections from ProjectUri //TODO: Should add all collections from ProjectUri
s.addAll( URIS ); s.addAll( URIS );
@ -378,7 +380,7 @@ public class DefaultInterpolator
s.add( ProjectUri.Profiles.Profile.Dependencies.xUri ); s.add( ProjectUri.Profiles.Profile.Dependencies.xUri );
s.add( ProjectUri.Profiles.Profile.Build.Plugins.Plugin.configuration ); s.add( ProjectUri.Profiles.Profile.Build.Plugins.Plugin.configuration );
return new ArrayList<ModelProperty>( marshallXmlToModelProperties( is, ProjectUri.baseUri, s ) ); return new ArrayList<ModelProperty>( marshallXmlToModelProperties( new ByteArrayInputStream(baos.toByteArray()), ProjectUri.baseUri, s ) );
} }
/** /**
@ -414,8 +416,6 @@ public class DefaultInterpolator
continue; continue;
} }
//String val = (mp.getResolvedValue() != null) ? "\"" + mp.getResolvedValue() + "\"" : null;
// System.out.println("new ModelProperty(\"" + mp.getUri() +"\" , " + val +"),");
if ( !uri.startsWith( baseUri ) ) if ( !uri.startsWith( baseUri ) )
{ {
throw new IllegalArgumentException( "Passed in model property that does not match baseUri: Property URI = " + uri + ", Base URI = " + baseUri ); throw new IllegalArgumentException( "Passed in model property that does not match baseUri: Property URI = " + uri + ", Base URI = " + baseUri );

View File

@ -1,12 +1,13 @@
package org.apache.maven.model.interpolator; package org.apache.maven.model.interpolator;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.Properties; import java.util.Properties;
import org.apache.maven.model.PomClassicDomainModel; import org.apache.maven.model.Model;
public interface Interpolator public interface Interpolator
{ {
PomClassicDomainModel interpolateDomainModel( PomClassicDomainModel dm, Properties interpolatorProperties ) Model interpolateModel( Model model, Properties properties, File projectDirectory )
throws IOException; throws IOException;
} }

View File

@ -1,11 +1,7 @@
package org.apache.maven.model.interpolator; package org.apache.maven.model.interpolator;
public enum PomInterpolatorTag public enum PomInterpolatorTag
{ {
USER_PROPERTIES,
PROJECT_PROPERTIES, PROJECT_PROPERTIES,
EXECUTION_PROPERTIES EXECUTION_PROPERTIES

View File

@ -1,90 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
*
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer</artifactId>
<version>2-SNAPSHOT</version>
</parent>
<artifactId>enforcer-api</artifactId>
<packaging>jar</packaging>
<version>1.0-alpha-5-SNAPSHOT</version>
<name>Enforcer API</name>
<description>
This component provides the generic interfaces needed to implement custom rules for the maven-enforcer-plugin.
</description>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
<executions>
<execution>
<id>custom-rule</id>
<phase>pre-site</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>custom-rule</finalName>
<outputDirectory>target/site</outputDirectory>
<descriptors>
<descriptor>src/main/assembly/custom-rule-sample.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-9</version>
</dependency>
</dependencies>
</project>

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
*
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer</artifactId>
<version>2-SNAPSHOT</version>
</parent>
<artifactId>enforcer-rules</artifactId>
<packaging>jar</packaging>
<version>1.0-alpha-5-SNAPSHOT</version>
<name>Enforcer Rules</name>
<description>This component contains the standard Enforcer Rules</description>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!--plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>shitty-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<goals>
<goal>clean</goal>
<goal>install</goal>
<goal>test</goal>
</goals>
<configuration>
<parallel>false</parallel>
</configuration>
</execution>
</executions>
</plugin-->
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-api</artifactId>
</dependency>
<dependency>
<groupId>org.beanshell</groupId>
<artifactId>bsh</artifactId>
<version>2.0b4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,166 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
*
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer</artifactId>
<version>2-SNAPSHOT</version>
</parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven Enforcer Plugin</name>
<description>The Loving Iron Fist of Maven</description>
<version>1.0-alpha-5-SNAPSHOT</version>
<url>http://maven.apache.org/plugins/maven-enforcer-plugin/</url>
<issueManagement>
<system>JIRA</system>
<url>http://jira.codehaus.org/browse/MENFORCER</url>
</issueManagement>
<prerequisites>
<!--because of the encoding fixes, I need a new plexus-utils. The new plexus utils can only be used in 2.0.6 or later: http://jira.codehaus.org/browse/MNG-2892 -->
<maven>2.0.6</maven>
</prerequisites>
<developers>
<developer>
<id>brianf</id>
<name>Brian Fox</name>
<email>brianf@apache.org</email>
<roles>
<role>Lead Developer</role>
</roles>
<timezone>5</timezone>
</developer>
</developers>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<distributionManagement>
<site>
<id>apache.website</id>
<url>${site.deploy.url}/plugins/maven-enforcer-plugin</url>
</site>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<stagingSiteURL>
scp://people.apache.org/www/maven.apache.org/plugins/${project.artifactId}-${project.version}
</stagingSiteURL>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<executions>
<execution>
<id>generated-helpmojo</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<!-- Include super-pom defined main/resources
Removing this section will break the build.
Since we have defined a new build/resources
section for the Apache process LICENSE and NOTICE
files, this original default section is now
required. -->
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</build>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-rules</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-rules</artifactId>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
</dependency>
</dependencies>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven.plugin.plugin.version}</version>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -1,281 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>maven-parent</artifactId>
<groupId>org.apache.maven</groupId>
<version>9</version>
<relativePath>../pom/maven/pom.xml</relativePath>
</parent>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer</artifactId>
<packaging>pom</packaging>
<name>Enforcer</name>
<version>2-SNAPSHOT</version>
<description>Enforcer is a build rule execution framework.</description>
<url>http://maven.apache.org/enforcer</url>
<prerequisites>
<maven>2.0.6</maven>
</prerequisites>
<issueManagement>
<system>jira</system>
<url>http://jira.codehaus.org/browse/MENFORCER</url>
</issueManagement>
<inceptionYear>2007</inceptionYear>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>brianf</id>
<name>Brian Fox</name>
<email>brianf@apache.org</email>
<roles>
<role>Lead Developer</role>
</roles>
<timezone>5</timezone>
</developer>
</developers>
<mailingLists>
<mailingList>
<name>Maven User List</name>
<subscribe>users-subscribe@maven.apache.org</subscribe>
<unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
<post>users@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
<otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
<otherArchive>http://maven.users.markmail.org/</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Maven Developer List</name>
<subscribe>dev-subscribe@maven.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
<post>dev@maven.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/dev@maven.apache.org/</otherArchive>
<otherArchive>http://www.nabble.com/Maven-Developers-f179.html</otherArchive>
<otherArchive>http://maven.dev.markmail.org/</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Maven Issues List</name>
<subscribe>issues-subscribe@maven.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/issues@maven.apache.org</otherArchive>
<otherArchive>http://www.nabble.com/Maven---Issues-f15573.html</otherArchive>
<otherArchive>http://maven.issues.markmail.org/</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Maven Commits List</name>
<subscribe>commits-subscribe@maven.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/commits@maven.apache.org</otherArchive>
<otherArchive>http://www.nabble.com/Maven---Commits-f15575.html</otherArchive>
<otherArchive>http://maven.commits.markmail.org/</otherArchive>
</otherArchives>
</mailingList>
<!-- duplication from parent pom - temporary until they inherit properly (MNG-3124) -->
<mailingList>
<name>Maven Announcements List</name>
<post>announce@maven.apache.org</post>
<subscribe>announce-subscribe@maven.apache.org</subscribe>
<unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/announce@maven.apache.org</otherArchive>
<otherArchive>http://www.nabble.com/Maven-Announcements-f15617.html</otherArchive>
<otherArchive>http://maven.announce.markmail.org/</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Maven Notifications List</name>
<subscribe>notifications-subscribe@maven.apache.org</subscribe>
<unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
<otherArchives>
<otherArchive>http://www.mail-archive.com/notifications@maven.apache.org</otherArchive>
<otherArchive>http://www.nabble.com/Maven---Notifications-f15574.html</otherArchive>
<otherArchive>http://maven.notifications.markmail.org/</otherArchive>
</otherArchives>
</mailingList>
</mailingLists>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/enforcer/trunk/</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/enforcer/trunk/</developerConnection>
<url>http://svn.apache.org/viewcvs.cgi/maven/enforcer/trunk</url>
</scm>
<properties>
<api.version>1.0-alpha-4-SNAPSHOT</api.version>
<rules.version>1.0-alpha-4-SNAPSHOT</rules.version>
<maven.version>2.0.9</maven.version>
<maven.plugin.plugin.version>2.4.3</maven.plugin.plugin.version>
<site.deploy.url>scp://people.apache.org/www/maven.apache.org</site.deploy.url>
</properties>
<build>
<resources>
<!-- Include super-pom defined main/resources
Removing this section will break the build.
Since we have defined a new build/resources
section for the Apache process LICENSE and NOTICE
files, this original default section is now
required. -->
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven.plugin.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>https://svn.apache.org/repos/asf/maven/enforcer/tags</tagBase>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<distributionManagement>
<site>
<id>apache.website</id>
<url>${site.deploy.url}/enforcer/</url>
</site>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-api</artifactId>
<version>1.0-alpha-5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-rules</artifactId>
<version>1.0-alpha-5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven.enforcer</groupId>
<artifactId>enforcer-rules</artifactId>
<version>1.0-alpha-5-SNAPSHOT</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<scope>test</scope>
<version>1.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
<configuration>
<tagletArtifacts>
<tagletArtifact>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-javadoc</artifactId>
<version>2.4.3</version>
</tagletArtifact>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-javadoc</artifactId>
<version>1.0</version>
</tagletArtifact>
</tagletArtifacts>
</configuration>
</plugin>
</plugins>
</reporting>
<modules>
<module>enforcer-api</module>
<module>enforcer-rules</module>
<module>maven-enforcer-plugin</module>
</modules>
</project>

View File

@ -1 +0,0 @@
test