Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added missing license header

  • Loading branch information...
commit 0349703f2d6e34d2b1ad8eb167608bf968a1aa92 1 parent 69b4d97
@gastaldi gastaldi authored
View
26 javaee-impl/src/main/java/org/jboss/forge/spec/javaee/jpa/PersistenceMetaModelFacetImpl.java
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2012 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Eclipse Public License version 1.0, available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
package org.jboss.forge.spec.javaee.jpa;
import java.util.List;
@@ -37,7 +43,7 @@
@Inject
private BeanManager manager;
-
+
@Inject
private ShellPrompt prompt;
@@ -56,7 +62,7 @@ public boolean isInstalled()
{
return processorConfigured(lookupProvider());
}
-
+
@Override
public String getProcessor()
{
@@ -94,22 +100,22 @@ private void addProcessorPlugin(MetaModelProvider provider)
{
DependencyBuilder processorDependency = createProcessorDependency();
Dependency versioned = promptVersion(processorDependency);
-
+
ConfigurationBuilder configuration = ConfigurationBuilder.create();
configuration.createConfigurationElement("processors")
- .addChild("processor").setText(provider.getProcessor());
+ .addChild("processor").setText(provider.getProcessor());
if (!Strings.isNullOrEmpty(provider.getCompilerArguments()))
{
configuration.createConfigurationElement("compilerArguments")
.setText(provider.getCompilerArguments());
}
-
+
ExecutionBuilder execution = ExecutionBuilder.create()
.setId("process")
.setPhase("generate-sources")
.addGoal("process")
.setConfig(configuration);
-
+
Dependency aptDependency = provider.getAptDependency();
if (Strings.isNullOrEmpty(aptDependency.getVersion()))
{
@@ -119,7 +125,7 @@ private void addProcessorPlugin(MetaModelProvider provider)
.setDependency(versioned)
.addExecution(execution)
.addPluginDependency(aptDependency);
-
+
project.getFacet(MavenPluginFacet.class).addPlugin(processorPlugin);
}
@@ -146,7 +152,7 @@ private void modifyCompilerPlugin()
}
pluginFacet.updatePlugin(compiler);
}
-
+
private boolean processorConfigured(MetaModelProvider provider)
{
DependencyBuilder dependency = createProcessorDependency().setVersion(null);
@@ -166,7 +172,7 @@ private boolean processorConfigured(MetaModelProvider provider)
}
return false;
}
-
+
private void addPluginRepository(MetaModelProvider provider)
{
Repository repository = provider.getAptPluginRepository();
@@ -176,7 +182,7 @@ private void addPluginRepository(MetaModelProvider provider)
pluginFacet.addPluginRepository(repository.getName(), repository.getUrl());
}
}
-
+
private Dependency promptVersion(Dependency dependency)
{
DependencyFacet dependencyFacet = project.getFacet(DependencyFacet.class);
Please sign in to comment.
Something went wrong with that request. Please try again.