Skip to content

Commit

Permalink
[CAMEL-13177] Improve build speed
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Feb 21, 2019
1 parent 5b51129 commit 6ced23d
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 160 deletions.
13 changes: 1 addition & 12 deletions catalog/camel-catalog/pom.xml
Expand Up @@ -33,6 +33,7 @@
<description>Camel Catalog</description>

<properties>
<camel.osgi.import.pkg>!org.apache.camel.util.json,*</camel.osgi.import.pkg>
<!-- use by camel-catalog -->
<firstVersion>2.15.0</firstVersion>
<label>tooling</label>
Expand Down Expand Up @@ -249,18 +250,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>org.apache.camel.catalog*</Export-Package>
<Import-Package>org.apache.camel.language.simple;resolution:=optional,!org.json.simple,*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>

</build>
Expand Down
3 changes: 2 additions & 1 deletion parent/pom.xml
Expand Up @@ -161,7 +161,7 @@
<couchbase-client-version>1.4.13</couchbase-client-version>
<couchbase-client-bundle-version>1.4.13_1</couchbase-client-bundle-version>
<curator-version>2.12.0</curator-version>
<cxf-version>3.3.0</cxf-version>
<cxf-version>3.3.1-SNAPSHOT</cxf-version>
<cxf-version-range>[3.1,4.0)</cxf-version-range>
<cxf-xjc-plugin-version>3.2.0</cxf-xjc-plugin-version>
<cxf-xjc-utils-version>3.2.0</cxf-xjc-utils-version>
Expand Down Expand Up @@ -5475,6 +5475,7 @@
<properties>
<maven.test.skip.exec>true</maven.test.skip.exec>
<assembly.skipAssembly>true</assembly.skipAssembly>
<fastinstall>true</fastinstall>
<noassembly>true</noassembly>
</properties>
</profile>
Expand Down
Expand Up @@ -3076,142 +3076,142 @@
<dependency>
<groupId>org.apache.cxf.services.sts</groupId>
<artifactId>cxf-services-sts-core</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf.services.ws-discovery</groupId>
<artifactId>cxf-services-ws-discovery-api</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-core</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-xml</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-databinding-jaxb</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-features-clustering</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-features-logging</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-management</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-extension-providers</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-oauth2</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description-swagger</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-jms</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-local</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-addr</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-mex</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-policy</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-rm</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security-oauth2</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-wsdl</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-testutils</artifactId>
<version>3.3.0</version>
<version>3.3.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.ftpserver</groupId>
Expand Down
Expand Up @@ -89,7 +89,9 @@ public static String createProperties(MavenProject project, String key, String v
}

public static void refresh(BuildContext buildContext, Path file) {
buildContext.refresh(file.toFile());
if (buildContext != null) {
buildContext.refresh(file.toFile());
}
}

public static void updateResource(BuildContext buildContext, Path out, String data) {
Expand Down
Expand Up @@ -221,9 +221,16 @@ protected void executeModel() throws MojoExecutionException, MojoFailureExceptio

for (File file : jsonFiles) {
File to = new File(modelsOutDir, file.getName());
if (warnDups && to.exists()) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate model name detected: " + to);
if (to.exists()) {
if (warnDups) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate model name detected: " + to);
} else if (file.lastModified() < to.lastModified()) {
getLog().debug("Skipping generated file: " + to);
continue;
} else {
getLog().warn("Stale file: " + to);
}
}
try {
copyFile(file, to);
Expand All @@ -245,12 +252,7 @@ protected void executeModel() throws MojoExecutionException, MojoFailureExceptio
String label = matcher.group(1);
String[] labels = label.split(",");
for (String s : labels) {
Set<String> models = usedLabels.get(s);
if (models == null) {
models = new TreeSet<>();
usedLabels.put(s, models);
}
models.add(name);
usedLabels.computeIfAbsent(s, k -> new TreeSet<>()).add(name);
}
}
}
Expand Down Expand Up @@ -394,9 +396,16 @@ protected Set<String> executeComponents() throws MojoExecutionException, MojoFai

for (File file : jsonFiles) {
File to = new File(componentsOutDir, file.getName());
if (warnDups && to.exists()) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate component name detected: " + to);
if (to.exists()) {
if (warnDups) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate component name detected: " + to);
} else if (file.lastModified() < to.lastModified()) {
getLog().debug("Skipping generated file: " + to);
continue;
} else {
getLog().warn("Stale file: " + to);
}
}
try {
copyFile(file, to);
Expand Down Expand Up @@ -577,9 +586,16 @@ protected Set<String> executeDataFormats() throws MojoExecutionException, MojoFa

for (File file : jsonFiles) {
File to = new File(dataFormatsOutDir, file.getName());
if (warnDups && to.exists()) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate dataformat name detected: " + to);
if (to.exists()) {
if (warnDups) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate dataformat name detected: " + to);
} else if (file.lastModified() < to.lastModified()) {
getLog().debug("Skipping generated file: " + to);
continue;
} else {
getLog().warn("Stale file: " + to);
}
}
try {
copyFile(file, to);
Expand Down Expand Up @@ -702,9 +718,16 @@ protected Set<String> executeLanguages() throws MojoExecutionException, MojoFail

for (File file : jsonFiles) {
File to = new File(languagesOutDir, file.getName());
if (warnDups && to.exists()) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate language name detected: " + to);
if (to.exists()) {
if (warnDups) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate language name detected: " + to);
} else if (file.lastModified() < to.lastModified()) {
getLog().debug("Skipping generated file: " + to);
continue;
} else {
getLog().warn("Stale file: " + to);
}
}
try {
copyFile(file, to);
Expand Down Expand Up @@ -844,9 +867,16 @@ private Set<String> executeOthers() throws MojoFailureException {

for (File file : jsonFiles) {
File to = new File(othersOutDir, file.getName());
if (warnDups && to.exists()) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate other name detected: " + to);
if (to.exists()) {
if (warnDups) {
duplicateJsonFiles.add(to);
getLog().warn("Duplicate other name detected: " + to);
} else if (file.lastModified() < to.lastModified()) {
getLog().debug("Skipping generated file: " + to);
continue;
} else {
getLog().warn("Stale file: " + to);
}
}
try {
copyFile(file, to);
Expand Down Expand Up @@ -1043,9 +1073,16 @@ protected void executeDocuments(Set<String> components, Set<String> dataformats,

for (File file : adocFiles) {
File to = new File(documentsOutDir, file.getName());
if (warnDups && to.exists()) {
duplicateAdocFiles.add(to);
getLog().warn("Duplicate document name detected: " + to);
if (to.exists()) {
if (warnDups) {
duplicateAdocFiles.add(to);
getLog().warn("Duplicate document name detected: " + to);
} else if (file.lastModified() < to.lastModified()) {
getLog().debug("Skipping generated file: " + to);
continue;
} else {
getLog().warn("Stale file: " + to);
}
}
try {
copyFile(file, to);
Expand Down

0 comments on commit 6ced23d

Please sign in to comment.