more javadoc fixes #2056
Signed-off-by: olivier lamy <olamy@webtide.com>
This commit is contained in:
parent
c94fa5fac1
commit
041a3260b6
|
@ -52,18 +52,15 @@ public class UserInfo
|
|||
_credential = credential;
|
||||
if (roleNames != null)
|
||||
{
|
||||
synchronized (_roleNames)
|
||||
{
|
||||
_roleNames.addAll(roleNames);
|
||||
_rolesLoaded = true;
|
||||
}
|
||||
_roleNames.addAll(roleNames);
|
||||
_rolesLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param userName
|
||||
* @param credential
|
||||
* @param userName the user name
|
||||
* @param credential the credential
|
||||
*/
|
||||
public UserInfo (String userName, Credential credential)
|
||||
{
|
||||
|
|
|
@ -310,7 +310,7 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
* If jetty home does not exist, download it and
|
||||
* unpack to build dir.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if jetty distribution cannot be found neither downloaded
|
||||
*/
|
||||
public void configureJettyHome() throws Exception
|
||||
{
|
||||
|
@ -341,7 +341,7 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
* @param version the version of the artifact
|
||||
* @param extension the extension type of the artifact eg "zip", "jar"
|
||||
* @return the artifact from the local or remote repo
|
||||
* @throws ArtifactResolverException
|
||||
* @throws ArtifactResolverException in case of an error while resolving the artifact
|
||||
*/
|
||||
public Artifact resolveArtifact (String groupId, String artifactId, String version, String extension)
|
||||
throws ArtifactResolverException
|
||||
|
@ -363,7 +363,7 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
/**
|
||||
* Create or configure a jetty base.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if any error occured while copying files
|
||||
*/
|
||||
public void configureJettyBase() throws Exception
|
||||
{
|
||||
|
@ -372,9 +372,8 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
|
||||
targetBase = new File(target, "jetty-base");
|
||||
Path targetBasePath = targetBase.toPath();
|
||||
if (Files.exists(targetBasePath))
|
||||
IO.delete(targetBase);
|
||||
|
||||
Files.deleteIfExists(targetBase.toPath());
|
||||
|
||||
targetBase.mkdirs();
|
||||
|
||||
if (jettyBase != null)
|
||||
|
@ -483,7 +482,7 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
* Convert webapp config to properties
|
||||
*
|
||||
* @param file the file to place the properties into
|
||||
* @throws Exception
|
||||
* @throws Exception if any I/O exception during generating the properties file
|
||||
*/
|
||||
public void createPropertiesFile (File file)
|
||||
throws Exception
|
||||
|
@ -496,10 +495,9 @@ public class JettyRunDistro extends JettyRunMojo
|
|||
* Make the command to spawn a process to
|
||||
* run jetty from a distro.
|
||||
*
|
||||
* @return
|
||||
* @return the command configured
|
||||
*/
|
||||
public ProcessBuilder configureCommand()
|
||||
throws Exception
|
||||
{
|
||||
List<String> cmd = new ArrayList<>();
|
||||
cmd.add("java");
|
||||
|
|
|
@ -20,11 +20,13 @@
|
|||
package org.eclipse.jetty.maven.plugin;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -128,8 +130,9 @@ public class WebAppPropertyConverter
|
|||
//context xml to apply
|
||||
if (contextXml != null)
|
||||
props.put("context.xml", contextXml);
|
||||
|
||||
try (OutputStream out = new BufferedOutputStream(new FileOutputStream(propsFile)))
|
||||
|
||||
|
||||
try (BufferedWriter out = Files.newBufferedWriter(propsFile.toPath()))
|
||||
{
|
||||
props.store(out, "properties for forked webapp");
|
||||
}
|
||||
|
@ -175,7 +178,7 @@ public class WebAppPropertyConverter
|
|||
throw new IllegalArgumentException (propsFile.getCanonicalPath()+" does not exist");
|
||||
|
||||
Properties props = new Properties();
|
||||
try (InputStream in = new FileInputStream(propsFile))
|
||||
try (InputStream in = Files.newInputStream(propsFile.toPath()))
|
||||
{
|
||||
props.load(in);
|
||||
}
|
||||
|
@ -275,7 +278,7 @@ public class WebAppPropertyConverter
|
|||
*/
|
||||
private static String toCSV (Resource[] resources)
|
||||
{
|
||||
StringBuffer rb = new StringBuffer();
|
||||
StringBuilder rb = new StringBuilder();
|
||||
|
||||
for (Resource r:resources)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue