[MNG-7264] refactor packaging bindings providers to ease maintenance

This commit is contained in:
Hervé Boutemy 2022-01-06 08:17:26 +01:00 committed by Hervé Boutemy
parent a7375a0eff
commit a53083db6c
14 changed files with 374 additions and 597 deletions

View File

@ -1,83 +0,0 @@
package org.apache.maven.lifecycle.mapping.providers;
/*
* 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.util.Collections;
import java.util.HashMap;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
import org.apache.maven.lifecycle.mapping.Lifecycle;
import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
@Named( "ear" )
@Singleton
public final class EarLifecycleMappingProvider
implements Provider<LifecycleMapping>
{
private final LifecycleMapping lifecycleMapping;
@Inject
public EarLifecycleMappingProvider()
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
lifecyclePhases.put(
"generate-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-ear-plugin:3.1.2:generate-application-xml" )
);
lifecyclePhases.put(
"process-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources" )
);
lifecyclePhases.put(
"package",
new LifecyclePhase( "org.apache.maven.plugins:maven-ear-plugin:3.1.2:ear" )
);
lifecyclePhases.put(
"install",
new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
);
lifecyclePhases.put(
"deploy",
new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
);
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
this.lifecycleMapping = new DefaultLifecycleMapping(
Collections.singletonList(
lifecycle
)
);
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
}

View File

@ -1,95 +0,0 @@
package org.apache.maven.lifecycle.mapping.providers;
/*
* 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.util.Collections;
import java.util.HashMap;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
import org.apache.maven.lifecycle.mapping.Lifecycle;
import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
@Named( "ejb" )
@Singleton
public final class EjbLifecycleMappingProvider
implements Provider<LifecycleMapping>
{
private final LifecycleMapping lifecycleMapping;
@Inject
public EjbLifecycleMappingProvider()
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
lifecyclePhases.put(
"process-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources" )
);
lifecyclePhases.put(
"compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile" )
);
lifecyclePhases.put(
"process-test-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources" )
);
lifecyclePhases.put(
"test-compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile" )
);
lifecyclePhases.put(
"test",
new LifecyclePhase( "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test" )
);
lifecyclePhases.put(
"package",
new LifecyclePhase( "org.apache.maven.plugins:maven-ejb-plugin:3.1.0:ejb" )
);
lifecyclePhases.put(
"install",
new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
);
lifecyclePhases.put(
"deploy",
new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
);
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
this.lifecycleMapping = new DefaultLifecycleMapping(
Collections.singletonList(
lifecycle
)
);
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
}

View File

@ -1,95 +0,0 @@
package org.apache.maven.lifecycle.mapping.providers;
/*
* 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.util.Collections;
import java.util.HashMap;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
import org.apache.maven.lifecycle.mapping.Lifecycle;
import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
@Named( "jar" )
@Singleton
public final class JarLifecycleMappingProvider
implements Provider<LifecycleMapping>
{
private final LifecycleMapping lifecycleMapping;
@Inject
public JarLifecycleMappingProvider()
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
lifecyclePhases.put(
"process-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources" )
);
lifecyclePhases.put(
"compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile" )
);
lifecyclePhases.put(
"process-test-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources" )
);
lifecyclePhases.put(
"test-compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile" )
);
lifecyclePhases.put(
"test",
new LifecyclePhase( "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test" )
);
lifecyclePhases.put(
"package",
new LifecyclePhase( "org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar" )
);
lifecyclePhases.put(
"install",
new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
);
lifecyclePhases.put(
"deploy",
new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
);
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
this.lifecycleMapping = new DefaultLifecycleMapping(
Collections.singletonList(
lifecycle
)
);
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
}

View File

@ -1,100 +0,0 @@
package org.apache.maven.lifecycle.mapping.providers;
/*
* 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.util.Collections;
import java.util.HashMap;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
import org.apache.maven.lifecycle.mapping.Lifecycle;
import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
@Named( "maven-plugin" )
@Singleton
public final class MavenPluginLifecycleMappingProvider
implements Provider<LifecycleMapping>
{
private final LifecycleMapping lifecycleMapping;
@Inject
public MavenPluginLifecycleMappingProvider()
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
lifecyclePhases.put(
"process-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources" )
);
lifecyclePhases.put(
"compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile" )
);
lifecyclePhases.put(
"process-classes",
new LifecyclePhase( "org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor" )
);
lifecyclePhases.put(
"process-test-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources" )
);
lifecyclePhases.put(
"test-compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile" )
);
lifecyclePhases.put(
"test",
new LifecyclePhase( "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test" )
);
lifecyclePhases.put(
"package",
new LifecyclePhase( "org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar,"
+ "org.apache.maven.plugins:maven-plugin-plugin:3.6.0:addPluginArtifactMetadata" )
);
lifecyclePhases.put(
"install",
new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
);
lifecyclePhases.put(
"deploy",
new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
);
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
this.lifecycleMapping = new DefaultLifecycleMapping(
Collections.singletonList(
lifecycle
)
);
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
}

View File

@ -1,95 +0,0 @@
package org.apache.maven.lifecycle.mapping.providers;
/*
* 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.util.Collections;
import java.util.HashMap;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
import org.apache.maven.lifecycle.mapping.Lifecycle;
import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
@Named( "rar" )
@Singleton
public final class RarLifecycleMappingProvider
implements Provider<LifecycleMapping>
{
private final LifecycleMapping lifecycleMapping;
@Inject
public RarLifecycleMappingProvider()
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
lifecyclePhases.put(
"process-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources" )
);
lifecyclePhases.put(
"compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile" )
);
lifecyclePhases.put(
"process-test-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources" )
);
lifecyclePhases.put(
"test-compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile" )
);
lifecyclePhases.put(
"test",
new LifecyclePhase( "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test" )
);
lifecyclePhases.put(
"package",
new LifecyclePhase( "org.apache.maven.plugins:maven-rar-plugin:2.4:rar" )
);
lifecyclePhases.put(
"install",
new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
);
lifecyclePhases.put(
"deploy",
new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
);
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
this.lifecycleMapping = new DefaultLifecycleMapping(
Collections.singletonList(
lifecycle
)
);
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
}

View File

@ -1,95 +0,0 @@
package org.apache.maven.lifecycle.mapping.providers;
/*
* 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.util.Collections;
import java.util.HashMap;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
import org.apache.maven.lifecycle.mapping.Lifecycle;
import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
@Named( "war" )
@Singleton
public final class WarLifecycleMappingProvider
implements Provider<LifecycleMapping>
{
private final LifecycleMapping lifecycleMapping;
@Inject
public WarLifecycleMappingProvider()
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
lifecyclePhases.put(
"process-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources" )
);
lifecyclePhases.put(
"compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile" )
);
lifecyclePhases.put(
"process-test-resources",
new LifecyclePhase( "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources" )
);
lifecyclePhases.put(
"test-compile",
new LifecyclePhase( "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile" )
);
lifecyclePhases.put(
"test",
new LifecyclePhase( "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test" )
);
lifecyclePhases.put(
"package",
new LifecyclePhase( "org.apache.maven.plugins:maven-war-plugin:3.3.1:war" )
);
lifecyclePhases.put(
"install",
new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
);
lifecyclePhases.put(
"deploy",
new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
);
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
this.lifecycleMapping = new DefaultLifecycleMapping(
Collections.singletonList(
lifecycle
)
);
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
}

View File

@ -1,4 +1,4 @@
package org.apache.maven.lifecycle.mapping.providers;
package org.apache.maven.lifecycle.providers.packaging;
/*
* Licensed to the Apache Software Foundation (ASF) under one
@ -22,50 +22,40 @@ package org.apache.maven.lifecycle.mapping.providers;
import java.util.Collections;
import java.util.HashMap;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping;
import org.apache.maven.lifecycle.mapping.Lifecycle;
import org.apache.maven.lifecycle.mapping.LifecycleMapping;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
@Named( "pom" )
@Singleton
public final class PomLifecycleMappingProvider
/**
* Base lifecycle mapping provider, ie per-packaging plugin bindings for {@code default} lifecycle.
*/
public abstract class AbstractLifecycleMappingProvider
implements Provider<LifecycleMapping>
{
private final LifecycleMapping lifecycleMapping;
private final LifecycleMapping lifecycleMapping;
@Inject
public PomLifecycleMappingProvider()
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
lifecyclePhases.put(
"install",
new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install" )
);
lifecyclePhases.put(
"deploy",
new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy" )
);
protected AbstractLifecycleMappingProvider( String[] pluginBindings )
{
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>();
int len = pluginBindings.length;
for ( int i = 0; i < len; i++ )
{
lifecyclePhases.put( pluginBindings[i++], new LifecyclePhase( pluginBindings[i] ) );
}
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
this.lifecycleMapping = new DefaultLifecycleMapping(
Collections.singletonList(
lifecycle
)
);
}
this.lifecycleMapping = new DefaultLifecycleMapping( Collections.singletonList( lifecycle ) );
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
@Override
public LifecycleMapping get()
{
return lifecycleMapping;
}
}

View File

@ -0,0 +1,48 @@
package org.apache.maven.lifecycle.providers.packaging;
/*
* 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 javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* {@code ear} packaging plugins bindings provider for {@code default} lifecycle.
*/
@Named( "ear" )
@Singleton
public final class EarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
private static final String[] BINDINGS =
{
"generate-resources", "org.apache.maven.plugins:maven-ear-plugin:3.1.2:generate-application-xml",
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
"package", "org.apache.maven.plugins:maven-ear-plugin:3.1.2:ear",
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
@Inject
public EarLifecycleMappingProvider()
{
super( BINDINGS );
}
}

View File

@ -0,0 +1,51 @@
package org.apache.maven.lifecycle.providers.packaging;
/*
* 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 javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* {@code ejb} packaging plugins bindings provider for {@code default} lifecycle.
*/
@Named( "ejb" )
@Singleton
public final class EjbLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
"compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile",
"process-test-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources",
"test-compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile",
"test", "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test",
"package", "org.apache.maven.plugins:maven-ejb-plugin:3.1.0:ejb",
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
@Inject
public EjbLifecycleMappingProvider()
{
super( BINDINGS );
}
}

View File

@ -0,0 +1,51 @@
package org.apache.maven.lifecycle.providers.packaging;
/*
* 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 javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* {@code jar} packaging plugins bindings provider for {@code default} lifecycle.
*/
@Named( "jar" )
@Singleton
public final class JarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
"compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile",
"process-test-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources",
"test-compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile",
"test", "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test",
"package", "org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar",
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
@Inject
public JarLifecycleMappingProvider()
{
super( BINDINGS );
}
}

View File

@ -0,0 +1,53 @@
package org.apache.maven.lifecycle.providers.packaging;
/*
* 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 javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* {@code maven-plugin} packaging plugins bindings provider for {@code default} lifecycle.
*/
@Named( "maven-plugin" )
@Singleton
public final class MavenPluginLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
"compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile",
"process-classes", "org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor",
"process-test-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources",
"test-compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile",
"test", "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test",
"package", "org.apache.maven.plugins:maven-jar-plugin:3.2.0:jar,"
+ "org.apache.maven.plugins:maven-plugin-plugin:3.6.0:addPluginArtifactMetadata",
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
@Inject
public MavenPluginLifecycleMappingProvider()
{
super( BINDINGS );
}
}

View File

@ -0,0 +1,45 @@
package org.apache.maven.lifecycle.providers.packaging;
/*
* 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 javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* {@code pom} packaging plugins bindings provider for {@code default} lifecycle.
*/
@Named( "pom" )
@Singleton
public final class PomLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
private static final String[] BINDINGS =
{
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
@Inject
public PomLifecycleMappingProvider()
{
super( BINDINGS );
}
}

View File

@ -0,0 +1,51 @@
package org.apache.maven.lifecycle.providers.packaging;
/*
* 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 javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* {@code rar} packaging plugins bindings provider for {@code default} lifecycle.
*/
@Named( "rar" )
@Singleton
public final class RarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
"compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile",
"process-test-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources",
"test-compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile",
"test", "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test",
"package", "org.apache.maven.plugins:maven-rar-plugin:2.4:rar",
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
@Inject
public RarLifecycleMappingProvider()
{
super( BINDINGS );
}
}

View File

@ -0,0 +1,51 @@
package org.apache.maven.lifecycle.providers.packaging;
/*
* 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 javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* {@code war} packaging plugins bindings provider for {@code default} lifecycle.
*/
@Named( "war" )
@Singleton
public final class WarLifecycleMappingProvider
extends AbstractLifecycleMappingProvider
{
private static final String[] BINDINGS =
{
"process-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources",
"compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile",
"process-test-resources", "org.apache.maven.plugins:maven-resources-plugin:3.2.0:testResources",
"test-compile", "org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile",
"test", "org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test",
"package", "org.apache.maven.plugins:maven-war-plugin:3.3.1:war",
"install", "org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install",
"deploy", "org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy"
};
@Inject
public WarLifecycleMappingProvider()
{
super( BINDINGS );
}
}