Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-…
Browse files Browse the repository at this point in the history
…5739-Remove-distribution-from-doco
  • Loading branch information
joakime committed Dec 2, 2020
2 parents c90690a + 0eccdde commit 41c2e9c
Show file tree
Hide file tree
Showing 22 changed files with 490 additions and 479 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import org.eclipse.jetty.ant.types.Connector;
import org.eclipse.jetty.ant.types.ContextHandlers;
Expand Down Expand Up @@ -135,7 +136,7 @@ public WebAppScannerListener(AntWebAppContext awc)
}

@Override
public void filesChanged(List<String> changedFileNames)
public void filesChanged(Set<String> changedFileNames)
{
boolean isScanned = false;
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,15 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
*
*/
@ManagedObject("Abstract Provider for loading webapps")
public abstract class ScanningAppProvider extends ContainerLifeCycle implements AppProvider
{
private static final Logger LOG = LoggerFactory.getLogger(ScanningAppProvider.class);

private Map<String, App> _appMap = new HashMap<String, App>();

private final Map<String, App> _appMap = new HashMap<>();
private DeploymentManager _deploymentManager;
protected FilenameFilter _filenameFilter;
private FilenameFilter _filenameFilter;
private final List<Resource> _monitored = new CopyOnWriteArrayList<>();
private boolean _recursive = false;
private int _scanInterval = 10;
private Scanner _scanner;

Expand Down Expand Up @@ -140,7 +135,6 @@ protected void doStart() throws Exception
_scanner = new Scanner();
_scanner.setScanDirs(files);
_scanner.setScanInterval(_scanInterval);
_scanner.setRecursive(_recursive);
_scanner.setFilenameFilter(_filenameFilter);
_scanner.setReportDirs(true);
_scanner.setScanDepth(1); //consider direct dir children of monitored dir
Expand Down Expand Up @@ -237,12 +231,6 @@ public int getScanInterval()
return _scanInterval;
}

@ManagedAttribute("recursive scanning supported")
public boolean isRecursive()
{
return _recursive;
}

@Override
public void setDeploymentManager(DeploymentManager deploymentManager)
{
Expand Down Expand Up @@ -295,11 +283,6 @@ public void setMonitoredDirectories(Collection<String> directories)
}
}

protected void setRecursive(boolean recursive)
{
_recursive = recursive;
}

public void setScanInterval(int scanInterval)
{
_scanInterval = scanInterval;
Expand All @@ -312,7 +295,7 @@ public void scan()
getMonitoredResources().stream().map((r) -> r.getURI().toASCIIString())
.collect(Collectors.joining(", ", "[", "]"))
);
_scanner.scan();
_scanner.nudge();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public void setupEnvironment() throws Exception
if (provider instanceof ScanningAppProvider)
{
_providers++;
((ScanningAppProvider)provider).addScannerListener(new Scanner.ScanListener()
((ScanningAppProvider)provider).addScannerListener(new Scanner.ScanCycleListener()
{
@Override
public void scan()
public void scanEnded(int cycle)
{
_scans.incrementAndGet();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.nio.file.Path;
import java.nio.file.PathMatcher;
import java.util.Date;
import java.util.List;
import java.util.Set;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -191,7 +191,7 @@ protected void configureScanner()
}
scanner.addListener(new Scanner.BulkListener()
{
public void filesChanged(List<String> changes)
public void filesChanged(Set<String> changes)
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Date;
import java.util.List;
import java.util.Set;

import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Execute;
Expand Down Expand Up @@ -197,7 +197,7 @@ public void configureScanner() throws MojoExecutionException
configureScanTargetPatterns(scanner);
scanner.addListener(new Scanner.BulkListener()
{
public void filesChanged(List<String> changes)
public void filesChanged(Set<String> changes)
{
try
{
Expand Down
4 changes: 2 additions & 2 deletions jetty-osgi/jetty-osgi-boot-jsp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
</dependency>
<!-- Servlet Deps -->
Expand Down
2 changes: 1 addition & 1 deletion jetty-osgi/jetty-osgi-boot-warurl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<artifactId>jetty-util</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
</dependencies>
Expand Down
7 changes: 4 additions & 3 deletions jetty-osgi/jetty-osgi-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
<artifactId>jetty-jmx</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
</dependency>
</dependencies>
Expand Down Expand Up @@ -81,7 +81,8 @@
javax.transaction.xa;version="1.1.0";resolution:=optional,
org.objectweb.asm;version="$(version;=;${asm.version})";resolution:=optional,
org.osgi.framework,
org.osgi.service.cm;version="1.2.0",
org.osgi.service.cm;version="1.4.0",
org.osgi.service.event;version="1.4.0",
org.osgi.service.packageadmin,
org.osgi.service.startlevel;version="1.0.0",
org.osgi.service.url;version="1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion jetty-osgi/jetty-osgi-httpservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<artifactId>servlet</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
9 changes: 5 additions & 4 deletions jetty-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
<packaging>pom</packaging>

<properties>
<osgi-version>3.7.1</osgi-version>
<osgi-services-version>3.2.100.v20100503</osgi-services-version>
<osgi-version>3.16.0</osgi-version>
<osgi-services-version>3.9.0</osgi-services-version>
<osgi-util-version>3.5.300</osgi-util-version>
<equinox-http-servlet-version>1.0.0-v20070606</equinox-http-servlet-version>
</properties>

Expand Down Expand Up @@ -129,7 +130,7 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<version>${osgi-services-version}</version>
<exclusions>
Expand All @@ -146,7 +147,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>${osgi-version}</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions jetty-osgi/test-jetty-osgi-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions jetty-osgi/test-jetty-osgi-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions jetty-osgi/test-jetty-osgi-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<artifactId>jetty-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<scope>provided</scope>
</dependency>
Expand Down
62 changes: 52 additions & 10 deletions jetty-osgi/test-jetty-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
<jetty-orbit-url>https://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
<assembly-directory>target/distribution</assembly-directory>
<pax.exam.version>4.13.1</pax.exam.version>
<pax.url.version>2.6.1</pax.url.version>
<pax.url.version>2.6.2</pax.url.version>
<bnd.version>5.2.0</bnd.version>
<swissbox.version>1.8.3</swissbox.version>
<tinybundles.version>3.0.0</tinybundles.version>
<injection.bundle.version>1.2</injection.bundle.version>
</properties>
<dependencies>
Expand Down Expand Up @@ -42,18 +45,33 @@
<groupId>biz.aQute.bnd</groupId>
<artifactId>bndlib</artifactId>
</exclusion>
<exclusion>
<groupId>org.ops4j.pax.tinybundles</groupId>
<artifactId>tinybundles</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.ops4j.pax.tinybundles</groupId>
<artifactId>tinybundles</artifactId>
<version>${tinybundles.version}</version>
</dependency>
<dependency>
<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>pax-swissbox-framework</artifactId>
<version>1.8.3</version>
<version>${swissbox.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.ops4j.base</groupId>
<artifactId>ops4j-base-monitors</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>pax-swissbox-tracker</artifactId>
<version>1.8.3</version>
<version>${swissbox.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -89,7 +107,7 @@
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bndlib</artifactId>
<version>5.1.2</version>
<version>${bnd.version}</version>
<exclusions>
<exclusion>
<groupId>org.osgi</groupId>
Expand All @@ -100,13 +118,19 @@
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.16.0</version>
<version>${osgi-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
<version>3.9.0</version>
<version>${osgi-services-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.util</artifactId>
<version>${osgi-util-version}</version>
<scope>test</scope>
</dependency>

Expand All @@ -124,11 +148,11 @@
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
</exclusion>
</exclusions>
Expand All @@ -140,11 +164,11 @@
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.osgi</groupId>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
</exclusion>
</exclusions>
Expand Down Expand Up @@ -458,6 +482,24 @@
<scope>test</scope>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<scope>test</scope>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-analysis</artifactId>
<scope>test</scope>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<scope>test</scope>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-client</artifactId>
Expand Down
Loading

0 comments on commit 41c2e9c

Please sign in to comment.