I want to compile a project (with CruiseControl) not only if its source changes, but also if some dependencies change.
example:
I got 3 folders:
c:\myProject\src (my source folder)
c:\dependency1\src (source code of dependency 1)
c:\dependency2\output (dll of dependency 2)
I want to compile my project in cruisecontrol if anything in one of these folders change.
How can I configure this in my ccnet.config?
bye and thanks
juergen
Should be something like this:
<project>
<!-- ... -->
<sourcecontrol type="multi">
<requireChangesFromAll>False</requireChangesFromAll>
<sourceControls>
<svn>
<trunkUrl>svn://svn.mycompany.com/myProject/trunk</trunkUrl>
<workingDirectory>c:\myProject\src</workingDirectory>
<!-- ... -->
</svn>
<svn>
<trunkUrl>svn://svn.mycompany.com/dependency1/trunk</trunkUrl>
<workingDirectory>c:\dependency1\src</workingDirectory>
<!-- ... -->
</svn>
<filtered>
<exclusionFilters />
<inclusionFilters>
<pathFilter>
<caseSensitive>False</caseSensitive>
<pattern>c:\dependency2\output\dependency2.dll</pattern>
</pathFilter>
</inclusionFilters>
<sourceControlProvider type="filesystem">
<autoGetSource>False</autoGetSource>
<ignoreMissingRoot>True</ignoreMissingRoot>
<repositoryRoot>c:\dependency2\output</repositoryRoot>
</sourceControlProvider>
</filtered>
</sourceControls>
</sourcecontrol>
<!-- ... -->
</project>
If you have the dependencies setup as subversion externals, then follow the instructions on this StackOverflow thread.
If they are each in their own subversion repository, you might try something like this post by Mark Cohen.
If the changes are only at the filesystem level, then you might try the <filesystem> modification set detector.
Related
I have a simple RCL with following structure:
/Pages
/Shared/
_Footer.cshtml
The content is very simple:
<h3> _Footer.cshtml partial view.</h3>
I also have a ASP.NET Core Web App project with same folder structure:
/Pages
_ViewImports.cshtml
-ViewStart.cshtml
/Shared
_Layout.cshtml
Somewhere in the layout file I make a reference to the partial view:
<partial name="_Footer" />
Here is the problem:
If I add a Project Reference of RCL to the Web App, the partial view is found and pages render fine.
If I make a Nuget package from the RCL, add it to a local Nuget source and add a reference to the package, the partial view won't be found.
The partial view '_Footer' was not found. The following locations were searched: /Pages/_Footer.cshtml /Pages/Shared/_Footer.cshtml /Views/Shared/_Footer.cshtml
What could be the difference between adding a project reference and Nuget reference? I've verified the Nuget package does contain both the Class Lib's default and views assemblies.
I found it works if you use dotnet pack instead of nuget pack. Note for dotnet pack package information is now read from csproj instead of nuget spec file.
In my case I wasn't even able to make it work in the scenario the op said it does work:
If I add a Project Reference of RCL to the Web App, the partial view
is found and pages render fine.
I was just getting the standard error message that the partial view was not found (even if the searched paths were correct).
After some head banging I solved this problem by adding the following xml block to both .csproj files:
RCL: e.g. RazorUIClassLib.csproj
Web App: e.g. WebApp1.csproj
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
I had the same problem, the solved writing the full path from the library Area, for example:
In the library i have:
Areas/Footer/Pages/_footer.cshtml
with my UI Proyect i called it like: <partial name="~/Areas/Footer/Pages/_footer.cshtml" model="My Model instance"/>
I hope it can help you
According to the docs (https://learn.microsoft.com/en-us/aspnet/core/razor-pages/sdk), I think you can use IncludeRazorContentInPack to include your .cshtml files in a NuGet package (it defaults to false).
I have a maven repo with custom checks which I want all the other maven repos to depend on. I want to suppress checks for some generated code in one of my repos. There are 2 ways I can setup suppression file:
Have suppression file in the custom check repo, then specify SuppressionFilter in custom check style xml:
<module name="SuppressionFilter">
<property name="file" value="${samedir}/checkstyle_suppressions.xml"
default="src/main/resources/checkstyle_suppressions.xml"/>
</module>
Then in the maven plugin section of the pom.xml file of repo that I want to run custom checkstyle on:
<suppressionsLocation>checkstyle_suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
Do not put the SuppressionFilter section in the custom checkstyle xml. Have the same pom.xml setup for the repo to be checked. The suppression file can be placed local to the repo to be checked.
Both of the approach work with command line "mvn clean validate". But neither works with CheckStyle IDEA plugin for Intellij. The Intellij plugin complains it couldn't find the suppression file for the 1st method above.
I don't want to force every repo to have a suppression file if they don't need it. I wonder if there is a way to make suppression work for CheckStyle IDEA without having to have multiple copies of the same suppression file (1 in custom check repo, 1 in local repo).
Thanks!
The logic the plugin uses is
does the file path resolve?
does the file path exist relative to the rules file?
does the file path exist relative to the module content roots, the module file or the project base directory?
If not, it gives up. So there's two possibilities:
there's a bug in the logic. Raise an issue on GitHub please.
it doesn't fit your use case. Raise a feature feature on GitHub, with a example to reproduce the problem and how you think resolution should be changed to fit your needs.
The code's in the resolveAssociatedFile method of https://github.com/jshiell/checkstyle-idea/blob/master/src/main/java/org/infernus/idea/checkstyle/model/ConfigurationLocation.java if you're interested.
I had some problems with understanding how function loadwave(...) exactly works. So i found a file with its description here: /usr/share/scilab/modules/sound/macros/loadwave.sci using find -name ... command.
Now i don't understand how optim(...) function works and so i also want to find its source file but i can't (i tried to use combinations of find and grep again). There are some demo files with examples of optim usage in /usr/share/scilab/modules/optimization/demos/optim directory but i still can not find any source code of optim(...) itself that as i understand should look somehow as follows:
function [...]=optim(...)
...
end function;
Could you give me a tip, please?
Update:
for now I only managed to find this in file
/usr/share/scilab/modules/optimization/sci_gateway/optimization_gateway.xml :
<!DOCTYPE GATEWAY SYSTEM "../../functions/xml/gateway.dtd">
<GATEWAY name="optimization">
<!-- =================== -->
<!--
Scilab
Interface description. In this file, we define the list of the function which
will be available into Scilab and the link to the "native" function.
gatewayId is the position in the hashtable 'Interfaces' defined in the
file SCI/modules/core/src/c/callinterf.h
primitiveId is the position in the hashtable '<module>Table Tab[]' defined
in the file modules/<module>/sci_gateway/c/gw_<module>.c
primitiveName is the name of the Scilab function
===================
Don't touch if you do not know what you are doing
-->
<!-- =================== -->
<PRIMITIVE gatewayId="11" primitiveId="1" primitiveName="optim" />
<PRIMITIVE gatewayId="11" primitiveId="2" primitiveName="semidef" />
<PRIMITIVE gatewayId="11" primitiveId="3" primitiveName="fsolve" />
<PRIMITIVE gatewayId="11" primitiveId="4" primitiveName="lsqrsolve" />
<PRIMITIVE gatewayId="11" primitiveId="5" primitiveName="qld" />
<PRIMITIVE gatewayId="11" primitiveId="6" primitiveName="qp_solve" />
<PRIMITIVE gatewayId="11" primitiveId="7" primitiveName="readmps" />
</GATEWAY>
So in the git repo of scilab the link to which has been kindly given to me by user1149326 below i have found the file scilab/modules/optimization/sci_gateway/c/sci_optim.c (http://gitweb.scilab.org/?p=scilab.git;a=blob;f=scilab/modules/optimization/sci_gateway/c/sci_optim.c;h=608f7dabe822fc6cfecb456e847f3b7373014322;hb=HEAD)
You can check out all Scilab sources at their git repository. More specifically all optim sources are in the optimization module. See the src and macro folder. You can read about how the module is organized on their wiki.
I think the sources are too complex to give you insight in how optim works. Instead of looking at the sources, I would recommend a document by Scilab about the kinds of optimization , that may also give the information you're looking for.
I have got a library project (written in ActionScript), that has two build outputs: One is made by including library A, the other is made by including library B.
My goal is to mavenize this library, and I've come up with the following solution:
I have a multi module Maven project that looks like this:
myLib-Mobile
\- pom.xml
myLib-Web
\- pom.xml
src
\- main
\- actionScript
...code is here
pom.xml
The parent pom.xml holds everything except the one dependency that changes based on the build target (and the FlexMojos compiler, since one needs to be built with AIR the other with Flash). Since the code is not at the usual location I define it this way in the pom files of the children:
<build>
<sourceDirectory>../src/main/actionscript</sourceDirectory>
...
This works fine if I build it in the console, but when I import this as a Maven project in IntelliJ, it does not find the source files - it seems to me that IntelliJ cannot handle if the <sourceDirectory> tag has a reference to the parent directory. The only workaround I found was to manually specify the content root in the project settings.
Anyone knows a better solution? Maybe using modules is not the way to go?
We have an existing cc configuration that was setup by someone before I got here.
We've converted our repository from cvs to mercurial stored on bitbucket.
Everything in my question below is basically just wondering, where do I point to the bitbucket repository in my setup to check for changes? And information about my specific setup.
Looking at how the cvs projects were set up, we have a config.xml and a projectbuild.xml file that contain information about the repository.
I've found the documentation for tag options for the config.xml here :
http://cruisecontrol.sourceforge.net/main/configxml.html
but I'm not sure where I can actually look at the bitbucket repository to check for changes. I assume this would be in the projectbuild.xml file, but I'm not sure what the tag options would be for mercurial. I'm more than happy to be pointed toward some documentation, all I've been able to find is stuff on the config.xml.
Here is part of my config.xml and my projectbuild, or build-tnl-default.xml file as it's called for my specific case:
config.xml (Notice I don't have bootstrappers in this file, I've seen this in other examples and am not sure if this would help me.
<modificationset quietperiod="900">
<mercurial localworkingcopy="projects/${project.name}">
</modificationset>
<schedule interval="100">
<ant anthome="C:\usr\local\apache-ant"
antworkingdir="projects/${project.name}"
buildfile="build-tnl-default.xml"
uselogger="true"
usedebug="false"
propertyfile="C:\usr\local\ia\build.properties"/>
</schedule>
build-tnl-default.xml:
<project name="build-tnl-default"
default="build">
<target name="build">
<!-- Get the latest from mercurial -->
<mercurial>
<!-- Call the target that does everything -->
<ant antfile="build.xml" dir="tnl" target="all"/>
</target>
</project>
Here I have no idea what options are available to me in the mercurial tag. I assume I just need to point this to the repository on bitbucket? In the previous version, it looked like this was pointing to the cvs repository here. I'm just not sure what the mercurial attributes are.
I'm sorry about my newness with this stuff, I might require a little more explanation than many other users. Any help is appreciated. Thanks
You check for updates in your repository (regardless whereever it is hosted) via
<modificationset quietperiod="900">
<mercurial localworkingcopy="projects/${project.name}">
</modificationset>
These tags say, that you query the repository you've checked out under projects/${project.name} and that a build is triggered if within a time frame of 15 minutes (900 seconds) no further changes occured. (I think that 15 minutes is a bit much, btw)
Simply make sure that projects/${project.name} is a Mercurial project that was checked out via hg clone http://repositoryAtBitbucketAsAnExample projects/${project.name} (make sure to expand ${project.name}).
I did not fully understand what build-tnl-default.xml is supposed to do, but if it should grab the newest build.xml, you should think about doing it with an Execootstrapper running something like hg pull ${path.to}/build.xml.
I have no idea what options are available to me in the mercurial tag.
You should determine the <taskdef .../> is used that loads the mercurial tag. This should be somewhere in build-tnl-default.xml or a file that is imported by it.