NutzCN Logo
问答 nutzboot make构建的项目不能启动
发布于 1567天前 作者 Tomcat 1420 次浏览 复制 上一个帖子 下一个帖子
标签:

zip里的pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.necros</groupId>
    <artifactId>nutgen</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <nutzboot.version>2.4.0.v20200427</nutzboot.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.nutz</groupId>
                <artifactId>nutzboot-parent</artifactId>
                <version>${nutzboot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-swagger</artifactId>
        </dependency>

       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-mvc</artifactId>
        </dependency>

       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-dao</artifactId>
        </dependency>

       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jetty</artifactId>
        </dependency>

       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.196</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>nutz</id>
            <url>http://jfrog.nutz.cn/artifactory/libs-release</url>
        </repository>
        <repository>
            <id>nutz-snapshots</id>
            <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>nutz-snapshots</id>
            <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.nutz.boot</groupId>
                <artifactId>nutzboot-maven-plugin</artifactId>
                <version>${nutzboot.version}</version>
            </plugin>
        </plugins>
    </build>
</project>

maven运行的输出:

[INFO ] 11:25:56.522 org.nutz.boot.banner.SimpleBannerPrinter.printBanner(SimpleBannerPrinter.java:34) - 
 _   _ ______                                      ___   
| \ | || ___ \  ______ ______ ______ ______ ______| \ \  
|  \| || |_/ / |______|______|______|______|______| |\ \ 
| . ` || ___ \  ______ ______ ______ ______ ______| | > >
| |\  || |_/ / |______|______|______|______|______| |/ / 
\_| \_/\____/                                     |_/_/  
  
:: Nutz Boot ::   (2.4.0.v20200427)
[INFO ] 11:25:56.548 org.nutz.resource.impl.ErrorResourceLocation.<init>(ErrorResourceLocation.java:28) - [loc=/Volumes/Tomcat's%20Extension/src/coding/nutgen/target/classes]not exist
[DEBUG] 11:25:56.552 org.nutz.resource.Scans.printLocations(Scans.java:527) - Locations count=3 time use 9ms
[DEBUG] 11:25:56.556 org.nutz.resource.Scans.scan(Scans.java:280) - Found 0 resource by src( custom/ ) , regex( ^.+[.]properties$ )
[DEBUG] 11:25:56.621 org.nutz.castor.Castors.reload(Castors.java:116) - Using 107 castor for Castors
[ERROR] 11:25:56.622 org.nutz.boot.NbApp.execute(NbApp.java:224) - something happen!!
java.lang.RuntimeException: folder or file like '^.+[.]properties$' no found in custom/
	at org.nutz.lang.Lang.makeThrow(Lang.java:158)
	at org.nutz.resource.Scans.loadResource(Scans.java:112)
	at org.nutz.ioc.impl.PropertiesProxy.getResources(PropertiesProxy.java:173)
	at org.nutz.ioc.impl.PropertiesProxy.setPaths(PropertiesProxy.java:102)
	at org.nutz.boot.config.impl.PropertiesConfigureLoader.init(PropertiesConfigureLoader.java:31)
	at org.nutz.boot.NbApp.prepareConfigureLoader(NbApp.java:370)
	at org.nutz.boot.NbApp.prepare(NbApp.java:268)
	at org.nutz.boot.NbApp.execute(NbApp.java:201)
	at org.nutz.boot.NbApp.run(NbApp.java:182)
	at io.nutgen.MainLauncher.main(MainLauncher.java:35)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
	at java.lang.Thread.run(Thread.java:748)

5 回复

"Tomcat's%20Extension" 带空格的路径, 挂

这个……是不是太“严格”了点……
对路径还有啥要求么?

没中文没特殊字符

改了个地方还是不行:

[INFO ] 11:42:40.723 org.nutz.boot.banner.SimpleBannerPrinter.printBanner(SimpleBannerPrinter.java:34) - 
 _   _ ______                                      ___   
| \ | || ___ \  ______ ______ ______ ______ ______| \ \  
|  \| || |_/ / |______|______|______|______|______| |\ \ 
| . ` || ___ \  ______ ______ ______ ______ ______| | > >
| |\  || |_/ / |______|______|______|______|______| |/ / 
\_| \_/\____/                                     |_/_/  
  
:: Nutz Boot ::   (2.4.0.v20200427)
[DEBUG] 11:42:40.756 org.nutz.resource.Scans.printLocations(Scans.java:527) - Locations count=3 time use 8ms
[DEBUG] 11:42:40.763 org.nutz.resource.Scans.scan(Scans.java:280) - Found 0 resource by src( custom/ ) , regex( ^.+[.]properties$ )
[DEBUG] 11:42:40.871 org.nutz.castor.Castors.reload(Castors.java:116) - Using 107 castor for Castors
[ERROR] 11:42:40.873 org.nutz.boot.NbApp.execute(NbApp.java:224) - something happen!!
java.lang.RuntimeException: folder or file like '^.+[.]properties$' no found in custom/
	at org.nutz.lang.Lang.makeThrow(Lang.java:158)
	at org.nutz.resource.Scans.loadResource(Scans.java:112)
	at org.nutz.ioc.impl.PropertiesProxy.getResources(PropertiesProxy.java:173)
	at org.nutz.ioc.impl.PropertiesProxy.setPaths(PropertiesProxy.java:102)
	at org.nutz.boot.config.impl.PropertiesConfigureLoader.init(PropertiesConfigureLoader.java:31)
	at org.nutz.boot.NbApp.prepareConfigureLoader(NbApp.java:370)
	at org.nutz.boot.NbApp.prepare(NbApp.java:268)
	at org.nutz.boot.NbApp.execute(NbApp.java:201)
	at org.nutz.boot.NbApp.run(NbApp.java:182)
	at io.nutgen.MainLauncher.main(MainLauncher.java:35)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
	at java.lang.Thread.run(Thread.java:748)

这次的路径是:

/Users/weiht/src/nutgen

添加回复
请先登陆
回到顶部