jboss-fuse / fuse-apicurito-generator

Fuse Apicurito Generator
5 stars 14 forks source link

'mvn clean package' does not work out-of-the-box #13

Closed tsedmik closed 5 years ago

tsedmik commented 6 years ago

Maven repositories defined in pom.xml are not sufficient to build the project. If I try to execute mvn clean package with clean .m2 folder (without additional repositories in settings.xml file), the build is not successful (see below).

example git:(master) mvn clean package 
[INFO] Scanning for projects...
Downloading from maven.central: https://repo1.maven.org/maven2/org/jboss/redhat-fuse/fuse-springboot-bom/7.2.0.fuse-720009/fuse-springboot-bom-7.2.0.fuse-720009.pom
Downloading from red-hat-ga-repository: https://maven.repository.redhat.com/ga/org/jboss/redhat-fuse/fuse-springboot-bom/7.2.0.fuse-720009/fuse-springboot-bom-7.2.0.fuse-720009.pom
Downloading from red-hat-ea-repository: https://maven.repository.redhat.com/earlyaccess/all/org/jboss/redhat-fuse/fuse-springboot-bom/7.2.0.fuse-720009/fuse-springboot-bom-7.2.0.fuse-720009.pom
Downloading from central: https://repo.maven.apache.org/maven2/org/jboss/redhat-fuse/fuse-springboot-bom/7.2.0.fuse-720009/fuse-springboot-bom-7.2.0.fuse-720009.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.redhat-fuse:fuse-springboot-bom:pom:7.2.0.fuse-720009 in maven.central (https://repo1.maven.org/maven2) @ line 33, column 16
[ERROR] 'dependencies.dependency.version' for org.apache.camel:camel-spring-boot-starter:jar is missing. @ line 44, column 15
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 48, column 15
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-actuator:jar is missing. @ line 52, column 15
[ERROR] 'dependencies.dependency.version' for org.apache.camel:camel-servlet-starter:jar is missing. @ line 56, column 15
[ERROR] 'dependencies.dependency.version' for org.apache.camel:camel-jackson-starter:jar is missing. @ line 60, column 15
[ERROR] 'dependencies.dependency.version' for org.apache.camel:camel-swagger-java-starter:jar is missing. @ line 64, column 15
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project io.example:test:1.0-SNAPSHOT (/home/tsedmik/devel/git/fuse-apicurito-generator-tests/target/example/pom.xml) has 7 errors
[ERROR]     Non-resolvable import POM: Could not find artifact org.jboss.redhat-fuse:fuse-springboot-bom:pom:7.2.0.fuse-720009 in maven.central (https://repo1.maven.org/maven2) @ line 33, column 16 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for org.apache.camel:camel-spring-boot-starter:jar is missing. @ line 44, column 15
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ line 48, column 15
[ERROR]     'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-actuator:jar is missing. @ line 52, column 15
[ERROR]     'dependencies.dependency.version' for org.apache.camel:camel-servlet-starter:jar is missing. @ line 56, column 15
[ERROR]     'dependencies.dependency.version' for org.apache.camel:camel-jackson-starter:jar is missing. @ line 60, column 15
[ERROR]     'dependencies.dependency.version' for org.apache.camel:camel-swagger-java-starter:jar is missing. @ line 64, column 15
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
bfitzpat commented 5 years ago

This should work correctly once we get the work for https://github.com/jboss-fuse/fuse-apicurito-generator/issues/12 merged.

bfitzpat commented 5 years ago

After some investigation, this appears to be due to the lack of these repository entries in the pom.xml for the generated project. Do we want to add them?

    <repository>
        <id>jboss-ea</id>
        <url>https://repository.jboss.org/nexus/content/groups/ea</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>        

    <pluginRepository>
        <id>jboss-ea</id>
        <url>https://origin-repository.jboss.org/nexus/content/groups/ea</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
bfitzpat commented 5 years ago

@tsedmik @apupier @hiram wdyt? about adding the extra early access repo to generated projects until we have a final release of the springboot bom?

apupier commented 5 years ago

wdyt? about adding the extra early access repo to generated projects until we have a final release of the springboot bom?

if repository is public, I vote to include it to have generated projects working out of the box.

bfitzpat commented 5 years ago

Created PR https://github.com/jboss-fuse/fuse-apicurito-generator/pull/22

bfitzpat commented 5 years ago

Merged https://github.com/jboss-fuse/fuse-apicurito-generator/commit/e7c8848569030a765283e36d05bc62aa25be8dec

@tsedmik Can you verify?

tsedmik commented 5 years ago

@bfitzpat verified with master branch